vcopy

vcopy — Copies between two vectorial control signals

Description

Copies between two vectorial control signals

Syntax

vcopy  ifn, ifn2, ielements

Initialization

ifn - number of the table where the vectorial signal will be copied

ifn - number of the table hosting the vectorial signal to be copied

ielements - number of elements of the vector

Performance

vcopy copies ifn2 to ifn1. Useful to keep old vector values, by storing them in another table.

All these operators (vaddv,vsubv,vmultv,vdivv,vpowv,vexp, vcopy and vmap) are designed to be used together with other opcodes that operate with vectorial signals such as bmscan, vcella, adsynt, adsynt2 etc.

Note: bmscan not yet available on Canonical Csound

Examples

Here is an example of the vcopy opcode. It uses the files vcopy.csd.

Example 407. Example of the vcopy opcode.

<CsoundSynthesizer>
<CsOptions>
;use appropriate realtime flags
;-+rtaudio=jack -odac:alsa_pcm:playback_ -B256 -b256
</CsOptions>
<CsInstruments>


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

	instr 1 ;table playback
ar lposcil 1, 1, 0, 262144, 1
outs ar,ar
	endin    

	instr 2
vcopy 2, 1, 20000 ;copy vector from sample to empty table
vmult 5, 20000, 262144 ;scale noise to make it audible
vcopy 1, 5, 20000  ;put noise into sample
turnoff
	endin

	instr 3
vcopy 1, 2, 20000 ;put original information back in
turnoff
	endin

</CsInstruments>
<CsScore>
f1  0 262144   -1 "beats.aiff" 0 4 0
f2  0 262144   2  0

f5  0 262144   21  3 30000

i1 0 4
i2 3 1

s
i1 0 4
i3 3 1
s

i1 0 4

</CsScore>
</CsoundSynthesizer>

        

Credits

Written by Gabriel Maldonado.

New in Csound 5 (Previously available only on CsoundAV)