Recherche Google
OMChroma User ManualPredefined Classes > Random Amplitude Modulation > Random Amplitude Modulation Synthesys with RAN-1
page précédentepage suivante

Random Amplitude Modulation Synthesys with RAN-1

Tutorial RAN-1

Specific Slots

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

Class description

The RAN-1 Class realizes a Random Amplitude Modulation of an Additive Synthesys with the following controls:

  • The main amplitude,
  • The fundamental frequency of the oscillator,
  • Frequency of the Random Amplitude Modulation,
  • The attack time of the amplitude envelope,
  • The decay time of the amplitude envelope.
Patch description

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.

Common Red Patches

For the red patch C#ed and Synt see Appendix A

Inside the Class

Csound Orchestra of the RAN-1 Class.

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

page précédentepage suivante
A propos...Réalisé avec Scenari