![]() |
uvi-script
Musical event scripting with Lua
|
A Midi sequence that represent a midi file. More...
Public Member Functions | |
| int | getNumEventsForTrack (int trackIndex) |
| return the number of events in the track. | |
| MidiEvent & | getEvent (int trackIndex, int eventIndex) |
| get a MidiEvent | |
| int | findAt (int trackIndex, int songPosition) |
| return the index of the first event not less than songPosition, nil otherwise. | |
| int | findNextAt (int trackIndex, int songPosition) |
| return the index of the first event greater than songPosition, nil otherwise. | |
| int | findPreviousAt (int trackIndex, int songPosition) |
| return the index of the whose position is just before songPosition, nil otherwise. | |
| void | insertEvent (int trackIndex, MidiEvent event) |
| insert a MidiEvent into a track. | |
Public Attributes | |
| int | format |
| midi format type (0|1|2) | |
| int | numTracks |
| number of midi Tracks | |
| int | division |
| time division: number of ticks per beat | |
| int | ppq |
| alias for division (pulses per quarter note) | |
A Midi sequence that represent a midi file.
a Midi Sequence is a collection of tracks containing MidiEvents.
| int MidiSequence::findAt | ( | int | trackIndex, |
| int | songPosition ) |
return the index of the first event not less than songPosition, nil otherwise.
| trackIndex | index of the track (start at 1 and less or equal to numTracks) |
| songPosition | song position in ticks |
| int MidiSequence::findNextAt | ( | int | trackIndex, |
| int | songPosition ) |
return the index of the first event greater than songPosition, nil otherwise.
| trackIndex | index of the track (start at 1 and less or equal to numTracks) |
| songPosition | song position in ticks |
| int MidiSequence::findPreviousAt | ( | int | trackIndex, |
| int | songPosition ) |
return the index of the whose position is just before songPosition, nil otherwise.
| trackIndex | index of the track (start at 1 and less or equal to numTracks) |
| songPosition | song position in ticks |
| MidiEvent & MidiSequence::getEvent | ( | int | trackIndex, |
| int | eventIndex ) |
get a MidiEvent
| trackIndex | index of the track (start at 1 and less or equal to numTracks) |
| eventIndex | index of the track (start at 1 and less or equal to getNumEventsForTrack(trackIndex)) |
| int MidiSequence::getNumEventsForTrack | ( | int | trackIndex | ) |
return the number of events in the track.
| trackIndex | index of the track (start at 1 and less or equal to numTracks) |