diff options
author | Felipe Sateler <fsateler@gmail.com> | 2008-03-24 16:39:11 -0300 |
---|---|---|
committer | Felipe Sateler <fsateler@gmail.com> | 2008-03-24 16:39:11 -0300 |
commit | 2af72543872544f18b7e3812cb64d9fe5886c47b (patch) | |
tree | e35d9468794be891222d3ddc05e46e2810add952 /examples/scantable.csd |
Imported Upstream version 5.08
Diffstat (limited to 'examples/scantable.csd')
-rw-r--r-- | examples/scantable.csd | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/examples/scantable.csd b/examples/scantable.csd new file mode 100644 index 0000000..20340b9 --- /dev/null +++ b/examples/scantable.csd @@ -0,0 +1,54 @@ +<CsoundSynthesizer> +<CsOptions> +; Select audio/midi flags here according to platform +; Audio out Audio in No messages +-odac -iadc -d ;;;RT audio I/O +; For Non-realtime ouput leave only the line below: +; -o scantable.wav -W ;;; for file output any platform +</CsOptions> +<CsInstruments> + +; Initialize the global variables. +sr = 44100 +kr = 4410 +ksmps = 10 +nchnls = 1 + +; Table #1 - initial position +git1 ftgen 1, 0, 128, 7, 0, 64, 1, 64, 0 +; Table #2 - masses +git2 ftgen 2, 0, 128, -7, 1, 128, 1 +; Table #3 - stiffness +git3 ftgen 3, 0, 128, -7, 0, 64, 100, 64, 0 +; Table #4 - damping +git4 ftgen 4, 0, 128, -7, 1, 128, 1 +; Table #5 - initial velocity +git5 ftgen 5, 0, 128, -7, 0, 128, 0 + +; Instrument #1. +instr 1 + kamp init 20000 + kpch init 220 + ipos = 1 + imass = 2 + istiff = 3 + idamp = 4 + ivel = 5 + + a1 scantable kamp, kpch, ipos, imass, istiff, idamp, ivel + a2 dcblock a1 + + out a2 +endin + + +</CsInstruments> +<CsScore> + +; Play Instrument #1 for ten seconds. +i 1 0 10 +e + + +</CsScore> +</CsoundSynthesizer> |