kyma•tweaky . How . LoopMultisegmentEnvelope

Question (or Task)

The loop option of the MultisegmentEnvelope doesn't seem to work, or at least I couldn't get it to.... What would be the easiest workaround? I need hot values for both, times and values. Maybe a script? Setting up an array for the values is no problem, but I didn't find a solution for the timing...

-- FlorianPrestel - 29 Feb 2004

Solution(s)

The key to getting the loop to work properly is that the value of the first point of the loop and the value of one beyond the end of the loop must be the same. The points inbetween can have any value and can be used to add vibrato to the envelope. If the points are not equal, then each repetition will have larger or smaller values depending on whether the point beyond the endloop is larger or smaller than the first point of the loop.

You can test out the loop in MultisegmentEnvelope easily. Locate the MultisegmentEnvelope in the Prototypes (use Ctrl+B), choose Oscilloscope from the Info menu, and use the VCS to set !Val1 to 0, !Val2 to 1, and !Val5 to 0. Leave !Val3 and !Val4 at the default value of 0.5. Now, play the MIDI keyboard and observe the envelope in the oscilloscope display.

-- KurtHebel - 02 Mar 2004


The problem is: it doesn't loop at all.

Here's what I do

Open MultisegmentEnvelope by doubleclicking in the Prototypes, set StartLoop? to 1 , choose Oscilloscope from the Info menu. Trigger by pressing a key, the envelope plays through once and at the end jumps to a value of 1, until triggered again, no matter what values are set in the VCS. I tried different settings for StartLoop / EndLoop, different trigger sources. I tried retriggering with something like 1 repeatingRamp: {!Dur1 s} + {!Dur2 s} ... It does repeat then but the results are pretty unpredictable, different each time...and there is a pause between the repeats. (That's probably not the right way to achieve, what I'm looking for. I'm pretty new to this CapyTalk thing...)

-- FlorianPrestel - 02 Mar 2004


You cannot use the first segment as the start of the loop. Try the following:

  1. Edit a MultisegmentEnvelope by double clicking in the Prototypes.
  2. Change the StartLoop parameter to 2, but do not change any other parameters.
  3. Choose Oscilloscope from the Info menu. Do not change anything in the VCS yet!
  4. Trigger the Sound using the MIDI keyboard. You will see that the envelope jumps immediately to 0.5 and sticks there. Every time you trigger the envelope, you will see it rapidly slope down to 0 and immediately jump back to 0.5 -- this is used to eliminate clicks when voice-stealing.
  5. Important: Set !Val5 to 0. This sets the value at the end of the envelope. Now, when you hold down a key, the envelope stays at 0.5, and when you let go of the key, the envelope decays to 0 over 0.5 seconds.
  6. Next, set !Val1 to 0. This sets the value of the beginning of the envelope. Now, when you press down a key, the envelope begins at 0 and moves to 0.5 over 0.5 seconds, stays at 0.5 for as long as the key is held, and when you let go of the key, the envelope decays to 0 over 0.5 seconds.
  7. Next, set !Val3 to 1. This sets the value of the middle of the loop. Now, when you press down a key, the envelope begins at 0 and moves to 0.5 over 0.5 seconds, oscillates between 0.5 and 1 for as long as the key is held, and when you let go of the key, the envelope decays to 0 over 0.5 seconds.

By the way, you can change the number of envelope segments by adding more durations and breakpoints to the parameter fields. Or, you can have some of the values fixed. For example, you could set Durations to {!Dur1 s} {!Dur2 s} {!Dur3 s} {!Dur4 s} {!Dur5 s} {!Dur6 s} and BreakPoints to 0 !Val1 !Val2 !Val3 !Val4 !Val5 0. This would make an envelope that always begins and ends at zero (like a normal amplitude envelope), gave you 5 changeable envelope breakpoint values, and lets you control all 8 envelope segment durations.

-- KurtHebel - 04 Mar 2004


Thank You!

Seems like I did not try loopstart points other than 1. (Although I thought, I did....)

Everything's up and running like expected now.

Btw what's the reason for this behaviour? Why can't the first segment of the envelope be part of the loop and why do I need more Breakpoints, than Durations?

-- FlorianPrestel - 04 Mar 2004


You need more Breakpoints because the Durations indicate the times between Breakpoints. That is, there is one duration between every two breakpoints.

-- KurtHebel - 04 Mar 2004

WebForm
Question: How do I make the MultisegmentEnvelope loop?
Keywords: MultisegmentEnvelope, loop, envelope

----- Revision r1.7 - 04 Mar 2004 - 22:23 GMT - KurtHebel
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.