midifilepos
Gets/Sets the playback position of a MIDI file.
This opcode can be called from anywhere, the setting function is also a non-op if used in an instrument triggered by a MIDI event.
Requires the -F flag to operate. If a filename is passed to -F, it is open with id 0 and playback starts immediately.
Syntax
Initialization
pos -- playback position in seconds
id (optional, default=0) -- MIDI file id, defaults to 0, the id of any file passed to the -F flag.
Examples
Here is an example of the miditempo opcode. It uses the files midifilepos.csd.
See also
Sensing and Control: Tempo and Sequencing
Credits
Author: Victor Lazzarini
May 2025
New in Csound 7