right now the MidiFileSequencer object can only play and stop. Also the Render() method gives no indication of how many non-zero samples were written before reaching the end of the file. I would be interested in the following:
a Length() or Duration() method that indicates the length of the file
a Tell() or Pos() method that indicates the current position in the file
a Seek() method to seek into the file (block granularity would be OK)
To avoid accuracy issues, I would also suggest that these methods handle a number of samples rather than a duration, so that the client application can directly use the data with Render().
Also note that seq.LoopIndex is not updated (and is currently unused).
What do you think? All these changes are fairly easy and I will gladly submit a PR, but I’d like to get your opinion first.
Hello,
right now the
MidiFileSequencer
object can only play and stop. Also theRender()
method gives no indication of how many non-zero samples were written before reaching the end of the file. I would be interested in the following:Length()
orDuration()
method that indicates the length of the fileTell()
orPos()
method that indicates the current position in the fileSeek()
method to seek into the file (block granularity would be OK)To avoid accuracy issues, I would also suggest that these methods handle a number of samples rather than a duration, so that the client application can directly use the data with
Render()
.Also note that
seq.LoopIndex
is not updated (and is currently unused).What do you think? All these changes are fairly easy and I will gladly submit a PR, but I’d like to get your opinion first.