I made the sampler in the "Programming Electronic Music" PD book, and am trying to modify it. I gave it a pause and continue button, and am trying to give it a button to have it play the sample at the natural speed (1). I'm running into an issue where, when you load a second sample, the Natural button returns the speed slider to 1, but plays the sample at the wrong speed. I'm not sure how to fix this. Any advice would be welcome! Here's the patch. It's intended to be a one-stop-shop for noisy nonsense when it's finished, but right now it's quite basic, as I learn more.
-
"Programming Music" sampler question.
-
Your multiplication object
- after the two [expr] objects doesn't output the new samples playback value until you change the start or end points of the loop, so the [phasor~] is still receiving the previous sample's playback frequency. If the samples are of different length then the new one will be at the wrong speed! Try banging the start/end point value out again once the new sample is loaded to make [expr 1 /$f1] calculate the new [phasor~] frequency. Or reset the sample playback points to zero, which will also send the value out again. Make sure you use a [trigger] to determine execution order.
-
Thanks! I was trying something along that idea, but didn't think to try using [trigger]. Still learning the super basics.