aboutsummaryrefslogtreecommitdiff
path: root/examples/example1.csd
diff options
context:
space:
mode:
Diffstat (limited to 'examples/example1.csd')
-rw-r--r--examples/example1.csd32
1 files changed, 32 insertions, 0 deletions
diff --git a/examples/example1.csd b/examples/example1.csd
new file mode 100644
index 0000000..7108182
--- /dev/null
+++ b/examples/example1.csd
@@ -0,0 +1,32 @@
+<CsoundSynthesizer>
+<CsOptions>
+</CsOptions>
+<CsInstruments>
+
+sr = 44100
+ksmps = 1
+nchnls = 2
+0dbfs = 1
+seed 0
+
+/*
+ list the cues in the file, showing time in seconds and samples
+*/
+instr run
+ Sfile = "example1.wav"
+ icues[] cueextract Sfile
+ isr = filesr(Sfile)
+
+ index = 0
+ while (index < lenarray(icues)) do
+ prints sprintf("%f (%d)\n", icues[index] / sr, icues[index])
+ index += 1
+ od
+endin
+
+</CsInstruments>
+<CsScore>
+i"run" 0 1
+</CsScore>
+</CsoundSynthesizer>
+