First time here? Check out the FAQ!
x

How do I control the timeIndex of a SampleCloud to choose only from the recorded part of a MemoryWriter recording?

0 votes
289 views
Hi every one, I'm running a sort of glitch looper, the memory writer in shared by a sample reader and a sample cloud.

The sample reader have sound to global control in the End field, so that i can press a switch and the second time i press it a ramp determ the duration and set the end.

The End control have to control also the time index maximum of the sample cloud 'cause i've a memory reader that is 180s.

My End soundtoglobal have an amount from 0 to 1, the time index -1 to 1, so now when i record a loop the time index don't change and read all over the duration of the memory writer.

please help me, i'm kind of new !

Thank you,

Giacomo Tropea
asked Jul 19, 2016 in Using Kyma by giacomo-tropea (210 points)

1 Answer

+3 votes

Here is an example of how to set up the SampleCloud to pick grains from the recorded part of the looper's MemoryWriter recording: http://kyma.symbolicsound.com/qa/?qa=blob&qa_blobid=17118928681014959565

Since the SampleCloud's grain duration can be random and the grain playback frequency can also be random, it is important to make sure that the grains start early enough in the recording so that the grain playback does not fall in the unrecorded part of the recording.

The SampleCloud picks the starts of grains centered at the value of the TimeIndex parameter with a spread given by the TimeIndexJitter parameter. This means that the time index should be set to be the center of the range of start times and the spread should be half the range of the start times.

The steps involved in making these calculations can be found in the TimeIndex and TimeIndexJitter parameters of the SampleCloud in the example looper. (We have copied the TimeIndex parameter value below.)

| longestGrainDurationInSeconds latestEndIn01Units timeIndex01 |

"Duration of longest grain, taking into account the length of the maximum grain playing at the highest frequency:"
longestGrainDurationInSeconds := ((1 + !GrainDurJitter) * !GrainDur s) * ((1 + !FreqJitter) * !FreqScale).

"!LoopEnd (from the recording Sound) measures how much of the 3 minute recording is actually used, so the end of the latest start time of the grain must be earlier by the duration of the longest grain (converted to a fraction of the recording duration):"
latestEndIn01Units := !LoopEnd - (longestGrainDurationInSeconds / 180 s).

"The SampleCloud picks the start time of each grain using TimeIndex and TimeIndexJitter. The SampleCloud starts the grains between:
    TimeIndex - TimeIndexJitter
and:
    TimeIndex + TimeIndexJitter
that is, it picks start times in a range centered at TimeIndex and spread by the value of TimeIndexJitter.

To pick grains from between 0 and !LoopEnd, we use:"
timeIndex01 := (0 + latestEndIn01Units) / 2.
timeIndexJitter01 := (latestEndIn01Units - 0) / 2.

"Now convert from Sample's 0 to 1 range to SampleCloud's -1 to 1 range:"
timeIndex01 * 2 - 1

 

answered Jul 20, 2016 by ssc (Savant) (126,620 points)
...