Map samples to keys - play sample till end OR if new key is triggered... HOW

Eddie Russek posted Feb 7, 19:29:

So i want to use sampler box for triggering pads

I have samples that are WAV and about 35 minutes each, they are guitary-paddy pads and I have one for each note, major and minor

How could I make it so there is just one note polyphony and it plays the sample all the way through? and cuts off once anther note is triggered?

HansEhv posted Feb 10, 02:29:

Hi Eddie

This is an interesting way of using monophonic play.
So I intend to add it in a future release of my fork ( as an extra playing mode.

But as you may not be using that fork or don't want to wait for the future:

The quickest (and dirtiest) way is to remove / comment out the "elif messagetype == 8: # Note off" branch and add
playingsounds = []
playingnotes = {}
sustainplayingnotes = []
to the branch of
if messagetype == 9: # Note on

However this will cut off the playing sound very abrupt.
So you may want to loop through the playingsounds and perform some sort of sustainplayingnotes.append(m) to make use of the release processing.

Would you care to share your samples in some way as this opens a new direction of possibilities ?


  (not published)
  I want to post as guest