fader 0-127 to control pitch of buffer~ with play~

themagicwoodshed's icon

themagicwoodshed

1月 03 2011 | 6:52 午後

Hi
I have been creating a drum module and I have been using sfplay~ to play the samples.

However I found a thread on this forum while I was looking for a way to replace current sample in sfplay~ and every body was saying that buffer~ and play~ is a better choice. So I have decided to change all my sfplay~ to buffer~ and play~.

However on my drum module I had created a pitch control on each non cymbal channel using a 0-127 vertical fader, the fader went into a patcher I created which then went into the speed input of the sfplay~. The patcher was quite simple I just used a selector to separate the bangs from the fader, the bangs then triggered speed times with the 64th bang on the selector banging a message box with 1 in it. This meant that the middle of the fader was normal speed.

I have looked at the hints and help patches for using play~ and buffer~. it appears that the speed message has to be part of the start and end position message.

Was wondering if any body know of a easier way of achieving this for buffer~ and play~.

Thanks

Lee

brendan mccloskey's icon

brendan mccloskey

1月 03 2011 | 8:18 午後

Here's a simple patch showing how to get pitch and loopSize into [play~]:

Max Patch
Copy patch and select New From Clipboard in Max.

Brendan

Nikolas K's icon

Nikolas K

1月 03 2011 | 8:19 午後

hello magicwoodshed,
sorry for the awful interface in the presentation mode... did it just to get out of the mess of many objects around.
You can load a sample, and choose a transposition, min and maximum transpositions can be set by you. The way i do it is by dividing the sample time with the transposition ratio and feeding the [line~] with a the message (0, "sample duration" "sample duration divided by trans-ratio") so it plays the whole sample at the appropriate duration for the pitch-shifting.
Hope it is useful!
Nickolas

Max Patch
Copy patch and select New From Clipboard in Max.