next up previous contents
Nächste Seite: Ein eigenes Hallgerät Aufwärts: Anwendungsbeispiele Vorherige Seite: Filterbank   Inhalt

Demonstration von Comb, Allpass und Reverb

Die zeigt das Verhalten der entsprechenden eingebauten Unitgeneratoren und demonstriert die Kommunikation über globale Signale. Der Operator init erlaubt es, ein a-rate Signal zur Initialisierungszeit mit einem Wert vorzubesetzen.


; reverb.orc reverb,comb,alpass Beispiel

sr = 44100
kr = 4410
ksmps = 10
nchnls = 2

galpass init 0
gacomb   init 0
gareverb init 0


instr 1 ; das den Klang macht

iamp = p4
ifreq = p5

kamp    linseg 0,0.01,iamp,0.1,iamp/4,p3-0.21,iamp/4,0.1,0
asig0   rand    kamp
asig1   reson   asig0,ifreq,ifreq/30
asig    balance asig1,asig0
        outs    asig,asig
        
gareverb = gareverb + asig/3
gacomb   = gacomb + asig/3
galpass  = galpass + asig/3

endin



instr 100; allpass
galpass init 0
irevtime  = p4
ilooptime = p5

asig alpass galpass,irevtime,ilooptime
        outs asig,asig
galpass = 0
endin


instr 101; comb

gacomb init 0
irevtime  = p4
ilooptime = p5

asig comb gacomb,irevtime,ilooptime
        outs asig,asig
gacomb = 0      
endin

instr 102; reverb

gareverb init 0
irevtime  = p4

asig reverb gareverb,irevtime
        outs asig,asig
gareverb = 0
endin


;reverb.sco demonstrate allpass,comb,reverb

i 1 0 .5 5000 100
i 1 1 .5 5000 200
i 1 2 .5 5000 300
s
i 100 0 7 2 .2

i 1 0 .5 5000 100
i 1 1 .5 5000 200
i 1 2 .5 5000 300

i 100 7 7 5 .02

i 1 7.01 .5 5000 100
i 1 8    .5 5000 200
i 1 9    .5 5000 300
f 0 15
s
i 101 0 7 2 .2

i 1 0 .5 5000 100
i 1 1 .5 5000 200
i 1 2 .5 5000 300

i 101 7 7 5 .02

i 1 7.01 .5 5000 100
i 1 8    .5 5000 200
i 1 9    .5 5000 300
f 0 15
s
i 102 0 7 2

i 1 0 .5 5000 100
i 1 1 .5 5000 200
i 1 2 .5 5000 300

i 102 7 7 5

i 1 7.01 .5 5000 100
i 1 8    .5 5000 200
i 1 9    .5 5000 300
f 0 15
e



Thomas Neuhaus
2001-01-14