vcomb

vcomb — Réverbération variable du signal d'entrée avec une réponse en fréquence « colorée ».

Description

Réverbération variable du signal d'entrée avec une réponse en fréquence « colorée ».

Syntaxe

ares vcomb asig, krvt, xlpt, imaxlpt [, iskip] [, insmps]

Initialisation

imaxlpt -- durée de boucle maximale pour klpt

iskip (facultatif, 0 par défaut) -- état initial de l'espace de données de la boucle de retard (cf. reson). La valeur par défaut est 0.

insmps (facultatif, 0 par défaut) -- valeur du retard, en nombre d'échantillons.

Exécution

krvt -- la durée de réverbération (définie comme le temps en secondes pris par un signal pour décroitre à 1/1000 ou 60 dB de son amplitude originale).

xlpt -- durée de boucle variable en secondes, comme ilpt dans comb. La durée de boucle peut aller jusqu'à imaxlpt.

Ce filtre répète l'entrée avec une densité d'écho déterminée par la durée de boucle xlpt. Le taux d'atténuation est indépendant et il est déterminé par krvt, la durée de réverbération (définie comme le temps en secondes pris par un signal pour décroitre à 1/1000 ou 60 dB de son amplitude originale). La sortie n'apparait qu'après ilpt secondes.

Exemples

Voici un exemple de l'opdoce vcomb. Il utilise le fichier vcomb.csd.

Exemple 955. Exemple de l'opdoce vcomb.

Voir les sections Audio en Temps Réel et Options de la Ligne de Commande pour plus d'information sur l'utilisation des options de la ligne de commande.

<CsoundSynthesizer>
<CsOptions>
; Select audio/midi flags here according to platform
; Audio out   Audio in
-odac           -iadc       -M0 ;;;RT audio I/O with MIDI in
</CsOptions>
<CsInstruments>

; Example by Jonathan Murphy and Charles Gran 2007
  sr	    =  44100
  ksmps	    =  10
  nchnls    =  2

        ; new, and important. Make sure that midi note events are only
        ; received by instruments that actually need them.

	; turn default midi routing off
	massign		0, 0
	; route note events on channel 1 to instr 1
	massign		1, 1

; Define your midi controllers
#define C1 #21#
#define C2 #22#
#define C3 #23#

; Initialize MIDI controllers
	    initc7    1, $C1, 0.5 		  ;delay send
	    initc7    1, $C2, 0.5 		  ;delay: time to zero
	    initc7    1, $C3, 0.5 		  ;delay: rate 

  gaosc	    init      0

; Define an opcode to "smooth" the MIDI controller signal
    opcode smooth, k, k
  kin       xin
  kport	    linseg    0, 0.0001, 0.01, 1, 0.01
  kin       portk     kin, kport
            xout      kin
    endop

instr   1  
 ; Generate a sine wave at the frequency of the MIDI note that triggered the intrument
  ifqc	    cpsmidi
  iamp	    ampmidi   10000
  aenv	    linenr    iamp, .01, .1, .01 	  ;envelope
  a1	    oscil     aenv, ifqc, 1
; All sound goes to the global variable gaosc
  gaosc	    =  gaosc + a1
    endin

    instr     198 ; ECHO
  kcmbsnd   ctrl7     1, $C1, 0, 1 		  ;delay send
  ktime	    ctrl7     1, $C2, 0.01, 6 		  ;time loop fades out
  kloop	    ctrl7     1, $C3, 0.01, 1 		  ;loop speed
; Receive MIDI controller values and then smooth them
  kcmbsnd   smooth    kcmbsnd
  ktime	    smooth    ktime
  kloop	    smooth    kloop
  imaxlpt   =  1 				  ;max loop time
; Create a variable reverberation (delay) of the gaosc signal
  acomb	    vcomb     gaosc, ktime, kloop, imaxlpt, 1
  aout	    =  (acomb * kcmbsnd) + gaosc * (1 - kcmbsnd)
	    outs      aout, aout
  gaosc	    =  0
    endin

</CsInstruments>
<CsScore>
f1 0 16384 10 1
i198 0 10000
e
</CsScore>
</CsoundSynthesizer>


Voir aussi

alpass, comb, reverb, valpass

Crédits

Auteur : William « Pete » Moss
Université du Texas à Austin
Austin, Texas USA
Janvier 2002