kyma•tweaky . How . LoopWhenFrequencyChanges

Question (or Task)

I have a sample I want to loop seamlessly at a random frequency/pitch every time the sample loops again. So I use the SampleFileDuration? to generate a random number that I multiply by the frequency of my sample. But the duration (length) of my sample changes according to its frequency and so when it triggers the sample again with a different pitch, my sample has either already looped again or it's still playing...

-- JeanEdouardMiclot - 21 Apr 2010

Solution(s)

In this example, I used SoundToGlobalControllers to generate the random duration scale factor and !Gate for the Sample.

The random duration scale factor is:

!Gate nextRandom abs

which gives a scale factor between 0 and 1. To get a scale factor between 0 and 2, you could instead use

!Gate nextRandom + 1

Instead of checking the Loop box, I generate a !Gate using:

('count.aif' sampleFileDuration * !DurScale) s tick

This generates a gate once every (scaled) duration of the sample.

-- CarlaScaletti - 16 May 2010

WebForm
Question: How do I loop when the frequency changes?
Keywords: Sample Loop Random Frequency Duration Length SampleFileDuration?

----- Revision r1.2 - 16 May 2010 - 18:29 GMT - CarlaScaletti
Copyright © 1999-2014 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding kyma•tweaky? Send feedback.