CCRMA

CLM instruments: Sampling Rate Conversion

Here's the "one-cut" instrument, a soundfile mangling machine... (cut.ins). The included "one-cut" instrument can cut portions of an input soundfile and sample rate convert them. The sampling rate conversion is not limited to being a number, but can be affected by an envelope and sinusoidal and noise modulation components (periodic and random vibrato). The amplitude and frequency of the vibrato can be controlled through envelopes. Here are some parameter examples you can paste into a with-sound.

Mandatory parameters

start-time
starting time in seconds
amp
global amplitude multiplier
the duration of the output soundfile will be determined by the duration of the segment that is extracted from the input soundfile and the average sampling rate conversion factor over the duration of the segment.

Some of the optional parameters

After the name of the parameter I specify the type of parameter.

soundfile [string]
name of the input soundfile
sound-start [number]
start time of the segment of the input file to process, expressed as a fraction of the duration of the input file (0 = start of file, 1 = end of file)
sound-end [number]
end time of the segment of the input file to process, expressed as a fraction of the duration of the input file (0 = start of file, 1 = end of file)
sound-start-time [number]
start time of the segment of the input file to process, expressed in seconds (use instead of sound-start if you want to "think" in seconds)
sound-end-time [number]
end time of the segment of the input file to process, expressed in seconds (use instead of sound-end if you want to "think" in seconds)
duration [number or nil]
duration can be used to shorten the time of the output soundfile. If duration is less than the expected duration of the output soundfile then the output is forced to be shorted (the end is but). The default is "nil" (ie: don't force anything)
sample-rate [number]
sampling rate conversion ratio, 2.0 will play soundfile segment twice as fast as normal, 0.5 twice as slow and oso on and so forth
amp-func [envelope]
amplitude envelope
vib-osc-freq [number]
sinusoidal sampling rate conversion modulation (ie: vibrato) frequency. Numbers from 2 to 8 Hertz for best effect. No real limits for weird effects
vib-osc-freq-dev [number]
deviation in Hz of the amount of modulation
vib-osc-amp [number]
amplitude of the sinusoidal modulation
vib-osc-amp-func [envelope]
envelope for the frequency of the sinusoidal vibrato component
vib-noi-freq [number]
bandwidth of the random noise component for sampling rate conversion modulation
vib-noi-amp [number]
amplitude of random sampling rate conversion modulation
vib-noi-amp-func [envelope]
amplitude envelope for random sampling rate conversion modulation
vib-osc-freq-func [envelope]
frequency envelope for the sinusoidal component of the modulation
degree [number]
"locsig" angle between speakers (0 = left speaker, 90 = right speaker in two channel environments)
distance [number]
"locsig" distance parameter (1 = original amplitude, >1 = attenuated signal)
reverb-amount [number]
amount of sound to be sent to the reverb output stream.

©1998,2001-2005 Fernando Lopez-Lezcano. All Rights Reserved.
nando@ccrma.stanford.edu