Name | Description | Default value |
---|---|---|
amp | Maximum Amplitude. Linear from >0.0 to 1000 or in dB from 0 to -∞ (see Tutorial Getting Started 02 - Amplitude and Internal Editor for more details) | -6.0 |
freq | (Minimum) fundamental frequency of the oscillator [Hz] | 440.0 |
jtf | Frequency of the Random Amplitude Modulation [Hz] | 50.0 |
atk | Attack time of the amplitude envelope [sec] | 0.2 |
dec | Decay time/% of the total duration of the amplitude envelope [sec] | 0.3 |
The RAN-1 Class realizes a Random Amplitude Modulation of an Additive Synthesys with the following controls:
The example A focuses on the frequency of the fundamental.
The example B deals with the frequency of the Random Amplitude Modulation.
The example C collects 4 different attack times of the amplitude envelope.
The example D collects 4 different decay times of the amplitude envelope.
For the red patch C#ed and Synt see Appendix A
instr 1
idur = p3
iamp = (p4 > 0.0 ? (p4*0.001*0dbfs) : (ampdbfs (p4)))
ifq = p5
iran_fq = p6
imindec = 0.01 ; minimum allowed decay
iatk = p7
idec = p8
idec = (((iatk+idec)>idur) ? idur-iatk : idec)
if idec > imindec goto goon
; very short duration
iatk = idur/2
idec = idur/2
goon:
iaudiofun = 1
kenv linen iamp, iatk, idur, idec ; envelope
kran randi kenv, iran_fq ; random numbers
asound poscil kran, ifq, iaudiofun ; applied to amplitude slot
out asound
endin