Multiple Release Samples Triggered By Sustain Length

You're new to the LinuxSampler world? You don't know where to start and nothing works? Here's the place to ask for help.
Post Reply
pgcrowe
Newbie
Posts: 1
Joined: Wed Jul 15, 2020 5:13 pm

Multiple Release Samples Triggered By Sustain Length

Post by pgcrowe » Wed Jul 15, 2020 5:37 pm

Hello All,

I'm new to LinuxSampler, and excited for all of the wonderful possibilities of this software!

After reading documentation on GIG, SFZ, and NSKP, I'm wondering if there is a way to trigger separate WAV release samples (staccato and sustain) based on the held sustain length?

Example:
Note Held for 350 MS or Less --Triggers-- WAV Release Sample A
Note Held for 351 MS or Longer --Triggers-- WAV Release Sample B

Any examples of how I might go about this would be much appreciated.

Thanks!

User avatar
cuse
Developer
Posts: 366
Joined: Wed Jan 23, 2008 10:07 pm
Location: Germany

Re: Multiple Release Samples Triggered By Sustain Length

Post by cuse » Thu Jul 16, 2020 5:38 pm

Yes, that's possible.

Not sure if there was an easy way with SFZ itself, but you can always write an NKSP script to handle that in any precise way you might imagine.

To capture the current time (e.g. when a note is triggered) you would read the built-in NKSP variable $ENGINE_UPTIME. Then when the note is released, you read that variable again, calculate the difference and then decide what to do, e.g. playing a different sample by calling built-in NKSP function play_note().

Post Reply