outch

outch — Ecrit des données audio multi-canaux sous contrôle de l'utilisateur, vers un périphérique externe ou un flot.

Description

Ecrit des données audio multi-canaux sous contrôle de l'utilisateur, vers un périphérique externe ou un flot.

Syntaxe

outch kchan1, asig1 [, kchan2] [, asig2] [...]

Exécution

outch envoie asig1 sur le canal déterminé par kchan1, asig2 sur le canal déterminé par kchan2, etc.

[Note] Note

Le plus grand numéro de paramètre kchanX pour outch dépend de nchnls. Si kchanX est supérieur à nchnls, asigX sera silencieux. Noter que outch donnera dans ce cas un avertissement mais pas d'erreur.

Exemples

Voici un exemple de l'opcode outch. Il utilise le fichier outch.csd.

Exemple 554. Exemple de l'opcode outch.

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
-odac    ;;;realtime audio out
;-iadc    ;;;uncomment -iadc if realtime audio input is needed too
; For Non-realtime ouput leave only the line below:
; -o outch.wav -W ;;; for file output any platform
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 32
nchnls = 5
0dbfs  = 1

instr 1

asig vco2 .05, 100	; sawtooth waveform at low volume

kcut line 100, p3, 30	; Vary cutoff frequency
kresonance = .7
inumlayer = 3
asig lowresx asig, kcut, kresonance, inumlayer

klfo lfo 4, .5, 4	
klfo = klfo+1		; offset of 1
printks "signal is sent to channel %d\\n", .1, klfo
      outch klfo,asig

endin
</CsInstruments>
<CsScore>

i 1 0 30
e
</CsScore>
</CsoundSynthesizer>


signal is sent to channel 5
signal is sent to channel 4
signal is sent to channel 3
signal is sent to channel 2
signal is sent to channel 1
signal is sent to channel 5
........

Voici un autre exemple de l'opcode outch. Il utilise le fichier outch-2.csd.

Exemple 555. Un autre exemple de l'opcode outch.

<CsoundSynthesizer>
<CsOptions>
; Select audio/midi flags here according to platform
-odac      ;;;realtime audio out
;-iadc    ;;;uncomment -iadc if realtime audio input is needed too
; For Non-realtime ouput leave only the line below:
; -o outch-2.wav -W ;;; for file output any platform
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 32
nchnls = 4
0dbfs  = 1

seed     0

instr 1 ;random movements between 4 speakers with outch

ichn1     random    1, 4.999 ;channel to start
ichn2     random    1, 4.999 ;channel to end
          prints    "Moving from speaker %d to speaker %d%n", int(ichn1), int(ichn2)
asamp     soundin   "fox.wav"
kmov      linseg    0, p3, 1
a1, a2    pan2      asamp, kmov
          outch     int(ichn1), a1, int(ichn2), a2
endin

</CsInstruments>
<CsScore>
r 5
i 1 0 3
e
</CsScore>
</CsoundSynthesizer>


Voir aussi

out32, outc, outx, outz

Plus d'information sur cet opcode : http://www.csounds.com/journal/issue16/audiorouting.html, érit par Andreas Russo.

Crédits

Auteur : John ffitch
Université de Bath/Codemist Ltd.
Bath, UK
Mai 2000

Nouveau dans la version 4.07 de Csound