First time here? Check out the FAQ!
x

Different LFO scaling for a Multisample

0 votes
460 views
I have about 50 samples in a Multisample KBD, controlled by a script-driven StepSequencer; an LFO is controlling the Frequency field of Multisample KBD, like this:

default hz * (!KeyDown sampleAndHold: ( |SoundToGlobalController| L * 2 + 0.85))

It goes up and down quite a bit, which is what I want. But for some of the samples, I'd like the LFO not to be so extreme. Is there a way to tell Multisample to use a less drastic LFO on samples above, say, the 25th sample in the folder of samples?

Thanks for any ideas!
asked Jul 20, 2016 in Capytalk & Smalltalk by stephen-taylor (Adept) (1,620 points)
Could you make your LFO rate dependent on !Index (if that's what you're using to select the sample)?
Thanks! I'm trying it now and it sounds neat, but it's not exactly what I had in mind, which is more of a discontinuity: sounding as is below !Index = 25, and then less modulation above. I was wondering about just using two Multisample Sounds, but from what I can tell a StepSequencer only takes one input.

The StepSequencer is driven by a Script, which reminds me of the CSound Score to Midi Script172 in MidiVoice Scripts. Maybe I could try different StepSequencers, each with its own Multisample, and then syncing them in a Script? Is that possible? Thanks again!

1 Answer

0 votes
 
Best answer

One way to reduce the LFO rate for indexes larger than 25 would be to use the Capytalk test

(!Index lt: 25)

This would evaluate to 1 when !Index is less than 25 and to 0 when it is 25 or larger.  Then you could use that as a scale factor on the LFO rate, for example

( |SoundToGlobalController| L * (1 + (!Index lt: 25)) + 0.85)

That would multiply the rate by (1 + 1) for indexes less than 25, and by (1 + 0) for indexes 25 or larger.  

answered Jul 21, 2016 by ssc (Savant) (128,080 points)
selected Jul 21, 2016 by stephen-taylor
Thanks! I didn't know about the lt test, that is terrific - I am trying it out now and with some tweaking I will get there!
...