|
Hi,
with foutir it is possible to "record" midi events because it tracks the
duration of the note on a midi keyboard. For example the result i get is
this:
i 1 1.435000 2.677667 659.217924 0.992188
i 1 4.517667 0.117667 349.218380 0.992188
i 1 5.701667 3.189667 174.609190 0.992188
means:
instr, starttime, duration, freq, amp
That all works, here is the csd:
; Select audio/midi flags here according to platform
-odac -+rtmidi=virtual -M0 ;;;realtime audio out
;-iadc ;;;uncomment -iadc if realtime audio input is needed too
; For Non-realtime ouput leave only the line below:
; -o foutir.wav -W ;;; for file output any platform
sr = 44100
ksmps = 32
nchnls = 2
0dbfs = 1
gihand fiopen "/media/ManualUSB/foutirmidiIV.txt", 0
instr 1
inot notnum ;just for priting
icps cpsmidi ;used for pitch
iamp ampmidi 1
foutir gihand, 0, 1, icps, iamp
prints "WRITING:\n"
prints "note = %f,velocity = %f\n", icps, iamp ;prints them
ficlose gihand
asig pluck iamp, icps, 1000, 0, 1
outs asig, asig
endin
f 0 10
e
What i would like to know: is there an opcode that reads out all the values
in this list in their order - but all once?
When there is, it should be possible to have a loop assign these numbers to
p-fields and so let it play back the midi events in the right order.
Anyone?
thank you,
menno
|