In Swift, to produce a noteOn event, next sentence is used:
BASS_MIDI_StreamEvent(stream, channel, DWORD(MIDI_EVENT_NOTE), DWORD(makeWord(midiNote, Int(speed))))
However, when trying to use the MIDI_EVENTS_NOTE_OFF using next sentence:
let a = BASS_MIDI_StreamEvent(stream, DWORD(channel), DWORD(MIDI_EVENT_NOTESOFF), DWORD(0))
the note played in first sentence is not stopped as expected. Or if used after a MIDI_EVENT_SUSTAIN On event, notes are not stopping as expected. The previous approach is working in Android with no issues, and the return of MIDI_EVENT_NOTESOFF in this case is true. Simply, notes are not stopping. What can be happening? Thanks