Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > core-release > by-pkgid > b707d9a4ee443103660a75ccb6e51334 > files > 1480

csound-doc-5.19.01-10.mga5.noarch.rpm

<CsoundSynthesizer>
<CsOptions>
; Select audio/midi flags here according to platform
-n    ;;;no sound output
;-iadc    ;;;uncomment -iadc if realtime audio input is needed too
</CsOptions>
<CsInstruments>
;example by Joachim Heintz

  opcode FilNam, S, S
;returns the name of a file path
Spath  xin
ipos   strrindex Spath, "/"	;look for the rightmost '/'
Snam   strsub    Spath, ipos+1	;extract the substring 
       xout      Snam
  endop
  
instr name
       prints    "Printing name:\n"
Snam   FilNam    "/my/dir/my/file.WAV"
       puts      Snam, 1  

endin 
</CsInstruments>
<CsScore>
i "name" 0 0
e
</CsScore>
</CsoundSynthesizer>