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

Recording MIDI noteOn/Off commands to .mid file in Objective-c #317

Open
valnenov opened this issue Aug 26, 2021 · 3 comments
Open

Recording MIDI noteOn/Off commands to .mid file in Objective-c #317

valnenov opened this issue Aug 26, 2021 · 3 comments
Assignees
Labels

Comments

@valnenov
Copy link

Can someone please point me to a working sample code for recording MIDI noteOn/Off commands to .mid file in Objective-c?
I am struggling with putting together the correct sequence of commands from MIKMIDISequencer.m. Could not find any sample code in the iOS and macOS examples on GitHub. I am playing the notes from a slightly modified version of the "MIDI soundboard" iOS example.

@valnenov
Copy link
Author

Continuing my so far fruitless attempts to record noteOn/Off to a .mid file I stumbled across this comment in MIKMIDISequencer.h line 40:

/**

  • MIKMIDISequencer can be used to play and record to an MIKMIDISequence.
  • @note Recording and using the click track may not yet be fully functional, and should
  • be considered experimental in the meantime. Please submit issues and/or pull requests
  • when you find areas that don't work as expected.
    */

Question for @armadsen : Is recording still not fully implemented and tested?

Regards,

Val

@armadsen
Copy link
Member

Sorry, I know you've had several questions recently. I'm dealing with some serious family stuff after coming home from an extended international trip, which has left me badly behind. Recording should work fine (that comment needs to be updated). You can find a rough example in the (work-in-progress) MIDIPlayground sample app in MIDIPlayground branch of the repo. (See here: https://github.com/mixedinkey-opensource/MIKMIDI/tree/MIDIPlayground/Examples/iOS/MIDI%20Playground).

@armadsen armadsen self-assigned this Aug 27, 2021
@valnenov
Copy link
Author

Hi Andrew, thanks for the reply and sorry to hear about the trip and family related issues. I hope everything gets resolved soon.

As for my questions, no rush at all. I have been struggling with the MIKMIDI recording for a week now and have also some other questions about MIKMIDISynthesizer availableInstruments #if TARGET_OS_IPHONE but these can wait till you catch up and have more time.

BTW, there is no rough example of MIDI recording to sequence or file in the "(work-in-progress) MIDIPlayground sample app". I have been experimenting with your "Examples/iOS/MIDI Playground" project the last 4 days and didn't see any relevant code there.

I have zipped and loaded on Google Drive my modification of your "iOS/MIDI_Playground" project. I have added some iPhone GUI since there was only iPad GUI to start with. Also added a GeneralPurpose soundFont "weedsgm3.sf2" with tons of instruments. Please take a look when you have a chance. Here is the link:

https://drive.google.com/file/d/1exQzrfQxukWXZGqGJuA88WQMFzcjkMRS/view?usp=sharing

Best regards, and good luck!

Val

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

No branches or pull requests

2 participants