09.12.2012 Views

The Kyma Language for Sound Design, Version 4.5

The Kyma Language for Sound Design, Version 4.5

The Kyma Language for Sound Design, Version 4.5

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

so that when a MIDI key is down, the duration jumps from 5 seconds to 105 seconds. Play this <strong>Sound</strong> and<br />

try to hit a MIDI key just at the start of one of the notes.<br />

Play and then take a look at warped time index. Instead of using a FunctionGenerator to generate a full<br />

ramp from -1 to 1, this example uses a WarpedTimeIndex to control the rate of the envelopes. <strong>The</strong> WarpedTimeIndex<br />

takes two arrays, each containing the same number of time points: the ideal time points<br />

and the actual time points. It creates a multi-segment envelope with different slopes corresponding to<br />

different rates of time: steeper slopes go through the envelopes faster, and shallower slopes go through<br />

the envelopes more slowly. <strong>The</strong> WarpedTimeIndex slows down or speeds up the resynthesis such that the<br />

actual times occur at the specified ideal times.<br />

Along these same lines, multiseg env on time index uses a MultiSegmentEnvelope generator to generate<br />

the time index. <strong>The</strong> total duration is broken down into ten segments, and the duration of each segment is<br />

hot, so you can control how long each segment should last using the faders in the virtual control surface<br />

or a MIDI fader box.<br />

Take a look at live freeze frame on key down(4). Look at the parameters of the <strong>Sound</strong> called capture frame<br />

and loop left. This is a DelayWithFeedback with the Feedback set to !KeyDown and the Scale set to 1<br />

- !KeyDown. Scale is an attenuator on the Input, so this means that when no key is being held down,<br />

the Input amplitude will be at the maximum of 1, and when a key is held down, the Input amplitude<br />

will be cut to zero. Notice, however, that whenever the Input amplitude is set to zero, the Feedback<br />

amplitude will be at its maximum (and vice versa); they are the opposites of one another. So when a key is<br />

held down, there is no new input, and the delay line is recirculating with no loss of amplitude on each<br />

feedback loop. In a way, the DelayWithFeedback is acting as an oscillator whose wavetable is whatever<br />

was captured in the delay line, and whose period is 256 samples — the size of one frame when the analysis<br />

frequency is 2 F (see the parameter settings in nonharmonic analysis). <strong>The</strong> length of the delay can be<br />

any multiple of the frame length (<strong>for</strong> example 4096 samp would also work). <strong>The</strong> left and right have to be<br />

delayed separately, because DelayWithFeedback does a mono mix if it gets a stereo input.<br />

Vocoder & RE Time Scaling<br />

Try the <strong>Sound</strong> called vocoder time-stretch, and then double-click on it to see how it is put together. First,<br />

look at the GenericSource. Its Frequency is set to<br />

60 nn hz * !Rate<br />

60 nn or middle C is the default frequency given to samples that do not have a single, identifiable pitch.<br />

60 nn (a pitch) is being converted to a frequency (by giving it units of hz). Scaling the frequency of a<br />

sample is the same as scaling its duration: a lower frequency means that you read through the sample at a<br />

slower rate, so the duration is longer.<br />

As you know, however, slowing down a sample also lowers the frequencies of its <strong>for</strong>mants. So this <strong>Sound</strong><br />

uses a Vocoder to compensate <strong>for</strong> that. Double-click on the Vocoder to see its parameters. Notice that<br />

SideFreq is set to !Rate. So whenever !Rate is made smaller (making the sample frequency and <strong>for</strong>mant<br />

lower in frequency), the analysis filter bank is also shifted lower in frequency. However, the<br />

resynthesis filter bank stays at its original frequency (because InFreq is set to 1). Thus, when the sound<br />

is “resynthesized” by passing noise through the Input filters, the <strong>for</strong>mants are at the normal frequencies,<br />

even though the sample is being played back more slowly.<br />

Note also, that the TimeConstant is also scaled by !Rate, because when the sample is slowed down,<br />

any changes in it happen more slowly, so the time constant controlling the amplitude follower can also be<br />

longer.<br />

Try playing 22-vocoder rate & freq scale, and experiment with the fader settings in the virtual control<br />

surface. This is similar to the previous example except that, instead of using Noise as the Input, this example<br />

uses an Oscillator on a buzz wave<strong>for</strong>m with 64 equal-amplitude harmonics.<br />

electric shaver mouth also uses a buzz-wave<strong>for</strong>m Oscillator, but this time as the Input to an RE filter. In<br />

this example !Rate controls the OnDuration of the TimeIndex controlling the rate at which the RE filter<br />

coefficients are updated.<br />

173

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!