Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not sending the last control/program in the array #312

Open
pistacchio opened this issue Feb 23, 2021 · 0 comments
Open

Not sending the last control/program in the array #312

pistacchio opened this issue Feb 23, 2021 · 0 comments

Comments

@pistacchio
Copy link

Hi,
Looking through past issues I've found this one #155 that describes my current problem. It seems strange, but seeing that another person has had it confirmed that what I'm seeing is real. The code is really straight forwards:

        let notesOff = []
        let notesOn = [
            MIKMIDINoteOnCommand(note: 60, velocity: 127, channel: 0, timestamp: Date()),
            MIKMIDINoteOnCommand(note: 65, velocity: 127, channel: 0, timestamp: Date()),
            MIKMIDINoteOnCommand(note: 70, velocity: 127, channel: 0, timestamp: Date()),
            MIKMIDINoteOnCommand(note: 75, velocity: 127, channel: 0, timestamp: Date()),
            MIKMIDINoteOnCommand(note: 80, velocity: 127, channel: 0, timestamp: Date()),
            MIKMIDINoteOnCommand(note: 85, velocity: 127, channel: 0, timestamp: Date()),
        ]
        
        try! MIKMIDIDeviceManager.shared.send(notesOn + notesOff, to: globalState.selectedMidiDestinationEndpoint!)

I intercept and record the sent notes in a DAW (Logic). Here I'm trying to send 6 notes and in Logic I see only 5. If I drop one (like note 85), Logic only records 5. I can confirm the same behavior in Cubase. The dropped event is always the last one of the array (so, in the provided example, note 85 is not played but note 80 is. If I comment out note 85, 80 is not played and so on).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant