aboutsummaryrefslogtreecommitdiff
path: root/examples/example1.csd
diff options
context:
space:
mode:
authorRichard <q@1bpm.net>2025-09-13 16:37:04 +0100
committerRichard <q@1bpm.net>2025-09-13 16:37:04 +0100
commit1376945b3d351ceeb3ac38210f66627d91f413fd (patch)
treed20593c6287ea024ce36c854c5a9244f20c1d917 /examples/example1.csd
downloadcsound-cueextract-master.tar.gz
csound-cueextract-master.tar.bz2
csound-cueextract-master.zip
initialHEADmaster
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>
+