MBS AudioPlayer Kit Question

I have been writing some MIDI routines using MBS AudioPlayer Kit. I’m writing an app with some MIDI routines that has a property:

theSynth = new MidiPlayerMB(true)

I then do some MIDI stuff…

 myPlayMIDIStuff( myMIDIList )

… which can play polyphonic, multichannel MIDI, setting Channels and Instruments is all fine, but…

… this seemingly innocent method is causing problems:

SynthNameLabel.Text = theSynth.nameOfInstrument( InstID )    // InstID = Integer

… it seems that nameOfInstrument causes the program to crash most of the time. I have checked the documentation, but it is not really clear (to me) about the values that should be included or limits, so I assume that I am just feeding it the wrong values.

This is from the crash Info Box that appears after crash:

Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x000000006e616950

Oddly enough, on the rare time that it does not crash, nameOfInstrument returns only an empty string.

Anyone have any experience with the MBS AudioPlayer Kit?

Let me check that.

I fixed the function and uploaded a new archive AudioPlayerKit11pr1.zip which everyone using the Kit can download.
Please try.

That’s fixed it - thanks Christian!

Welcome

don’t mean to hijack the thread… but i logged in to post and saw this. Is this the plug in i need to be able to write an app that will send program change messages on a button click ? OS X not iOS

Thanks

The MidiPlayer class is part of the Kit (written in Xojo) and part of the MBS Plugins (written in C++).
Both can send commands to midi player including program changes.

ah and with PortMidi, Windows Midi or CoreMidi classes in our plugins you can send to devices those commands cross platform, Windows or Mac only.