First time here? Check out the FAQ!
x

How do I modulate TimeIndex within a limited range?

0 votes
140 views
Hi! I think this a somewhat simple question, but I haven't been able to figure out a solution.

I'm using a Morph2dKeymappedPsi sound and I want to modulate the TimeIndex parameter with an LFO that goes back and forth between the range of -1 to -0.9

What is the simplest way to do this? In the parameter assist helper it suggests "1 repeatingFullRamp: ('nameOfPsiFile' fileDuration)" but that will loop the entireTimeIndex range. I just want to loop the portion from -1 to -.9

Thanks in advance!
asked Oct 26, 2017 in General by brian-trifon (180 points)

1 Answer

+1 vote
 
Best answer

If you want to use CapyTalk, here is a little generic script:

"Loop back and forth within a given range"

| dur start end |
dur := 'nameOfPsiFile' fileDuration.
start := -1.
end := -0.9.

"Convert to Range01"
start := start * 0.5 + 0.5.
end := end * 0.5 + 0.5.

((1 repeatingTriangle: (dur * 2 * (end - start)))
 * 2 * (end - start)) + (start * 2 - 1)

It might be even simpler to use the TimeIndexForFilename or TimeIndex classes and paste them into the TimeIndex parameter field of the Morph2DKeymappedPsi.

Hope that helps :)

 

EDIT: In case you want to use the LFO Prototype you could use the SetRange class:

LFO -> SetRange -> TimeIndex parameter field

answered Oct 27, 2017 by kymaguy (Virtuoso) (10,580 points)
selected Oct 27, 2017 by brian-trifon
...