Added substitute function. I think it will be useful in simulating how an instrument sounds when playing a sequence. Successive notes dont sound like discrete steps, but steps that overwelm the previous