File tree Expand file tree Collapse file tree
docs/spessa-synth-sequencer Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ The lists list properties of the object.
1313Called when a MIDI message is sent and externalMIDIPlayback is true.
1414
1515- message: number[ ] - the binary MIDI message
16+ - time: number - the synthesizer's current time when this event was sent.
17+ Use this for scheduling MIDI messages to your external MIDI device.
1618
1719### timeChange
1820
Original file line number Diff line number Diff line change @@ -436,7 +436,10 @@ export class SpessaSynthSequencer {
436436 ) ;
437437 return ;
438438 }
439- this . callEvent ( "midiMessage" , { message } ) ;
439+ this . callEvent ( "midiMessage" , {
440+ message,
441+ time : this . synth . currentSynthTime
442+ } ) ;
440443 }
441444
442445 protected sendMIDIAllOff ( ) {
Original file line number Diff line number Diff line change @@ -10,6 +10,12 @@ export interface SequencerEventData {
1010 * The binary MIDI message.
1111 */
1212 message : Iterable < number > ;
13+
14+ /**
15+ * The synthesizer's current time when this event was sent.
16+ * Use this for scheduling MIDI messages to your external MIDI device.
17+ */
18+ time : number ;
1319 } ;
1420 /**
1521 * Called when the time is changed.
You can’t perform that action at this time.
0 commit comments