[Csnd] controlling MIDI file playback
Date | 2008-08-01 22:54 |
From | victor |
Subject | [Csnd] controlling MIDI file playback |
This has been an open question, which I think I
have answered
now. It is possible to control the playback
position of a MIDI file
(passed to csound using -F) with the API functions
csoundSetScoreOffsetSeconds()
and csoundRewindScore().
For some reason, I never thought that this was
possible, but I had
a look at the code and tested it with a Python
script and it works
well.
So with the sfplay or fluid opcodes, it is possible
to create a fully-featured
MIDI file player.
I am thinking here whether a couple of i-time
opcodes that call those functions
could be useful, so that MIDI playback can be
controlled from the
orchestra (without any need to use a script
or custom host). I suppose
care with inifinite recursion must be one of the
things to consider.
Regards
Victor
|