Csound Csound-dev Csound-tekno Search About

[Csnd] setscorepos and scorerewind

Date2008-08-02 10:00
Fromvictor
Subject[Csnd] setscorepos and scorerewind
I have added a couple of opcodes to control the score readout position,
these are experimental and should be used with care. They simply wrap
up API calls,
 
setscorepos  isecs
scorerewind
 
Both are init-time only.
 
My main aim was to use it with MIDI files, but they seem to work with the
standard numeric score. However, I had the
occasional problem in different experiments which I was not able to locate,
so it is not fool-proof.
 
Here is an example that loops forever.
 
<CsoundSynthesizer>
<CsInstruments>
sr     = 44100
ksmps  = 10
nchnls = 2
 
instr 100
setscorepos p4
turnoff
endin
 
instr 1
i1 cpsmidi
k1 linsegr  1, 0.5, 0.1, 0.01, 0.02
k2 expon  1,p3,0.0001
a1 phasor cpspch(p4)
aout = -k2*10000*cos((a1^k1)*$M_PI)
   outs aout,aout
endin
 
</CsInstruments>
<CsScore>
f0 6000
f1 0 4096 10 1
i1 0 1 8.00
i1 + 1 8.03
i1 + 1 8.04
i1 + 1 8.07 
i1 + 1 8.09
i1 + 1 8.10
i1 + 1 8.09
i1 + 1 8.07
i1 + 1 8.03
i100 9 1 0
e
</CsScore>
</CsoundSynthesizer>
 
In CVS now, documentation to follow.

Date2008-08-02 19:37
From"Oeyvind Brandtsegg"
Subject[Csnd] Re: setscorepos and scorerewind
AttachmentsNone