Open monkeyswarm opened 2 years ago
Seems related to #23, it's the virual ports not working - I found the solution for MobMoPlatLink for virtualSources like that:
midi = [[PGMidi alloc] init];
midi.delegate = self; // move to init? --- yes, cut and pasted here
//init before setting virtualMidiEnabled: _connectedMidiSources = [NSMutableArray array]; _connectedMidiDestinations = [NSMutableArray array];
settingsVC = [[SettingsViewController alloc] initWithNibName:@"SettingsViewControllerCatalyst" bundle:nil];
// If iOS 5, then use non-auto-layout xib files.
if (SYSTEM_VERSION_LESS_THAN(@"6.0")) {
settingsVC = [[SettingsViewController alloc] initWithNibName:@"SettingsViewControllerIOS5" bundle:nil];
} else if (SYSTEM_VERSION_LESS_THAN(@"11.0")) {
settingsVC = [[SettingsViewController alloc] initWithNibName:nil bundle:nil];
} else {
settingsVC = [[SettingsViewController alloc] initWithNibName:@"SettingsViewController_new" bundle:nil];
}
[midi setNetworkEnabled:YES]; [midi setVirtualEndpointName:@"MobMuPlatLink"]; [midi setVirtualSourceEnabled:YES]; [midi setVirtualDestinationEnabled:YES]; //I think this line was missing: [midi.virtualDestinationSource addDelegate:self];
And for virtual destinations the destination returned after setting virtualDestinations YES has to be added to the _connectedMidiDestinations array in the delegate method:
From a user email:
My intention was to use a pd patch (running inside MobMuPlat) to send midi commands to another app, able to synthesize the notes. I have installed many such apps (Super MIDI Box, FluidSynth MIDI, MIDI Keyboard, MIDI Controller). All of these apps are able to listen to the others (they show up their names as input and/or output midi ports) except for the MobMuPlat app, which seems odd to me.