How to trigger a sample with velocity
Hi Max forum,
I'm making a drum sequencer and so far i have been playing back my samples by routing midi to ableton live and triggering these samples with sampler in a drumrack.
Next step in what I want is to skip this whole thing going through ableton live, making it possible to play all samples within max alone.
I'm so far that i can trigger the samples within max using an [sfplay~] (I don't know if this is the best choice), but when it comes to velocity I don't know what to do. I've tried to send the velocity to a [gain~] where the steps of the gain goes from 0-127, but this gives weird playback where velocity 120 totally distorts and velocity 50 is way too soft in volume.
My question is:
Is there a way to trigger a sample the same way as sampler in a drum rack works in ableton live? I mean, if you have a drumrack and on midinote 60 you load in a kick drum, then this drum gets played back loud or soft depending on velocity.
I have a simplified version of what I want to achieve here:
Thanks!
Many thanks, It works!