My next project will include a combined MIDI/OSC controller for iPad as well as a SysEx Editor/Bank Manager for my DSI Evolver. Since we don't really want another 3rd party application to be involved with the MIDI data, I will make use of Network MIDI.
You get the Network session simply by accessing the default session and activating it. Like this:
But now you still don't have any connections, so you will have to listen for them until your host has connected to your application. The best way to do this, is by using a thread:
Now you will have to create the waitForConnections: method:
- (void) waitForConnections:(id) argument {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
MIDINetworkSession *session = (MIDINetworkSession *)argument;
BOOL found = NO;
while (!found) {
NSSet *connections =[session connections];
if ((cons = [connections count]) > 0) {
found = YES;
} else {
[NSThread sleepForTimeInterval:1];
}
}
[... do something with connections ....]
[pool release];
}
To use Network MIDI on a PC, you will have to install rtpMIDI, works just like Network MIDI on the Mac.
I will post more on handling the MIDI part when I get there later.
I have turned to iOS programming and shall posting my notes mainly on this subject.
I'll start out with a little tutorial on reading data from a SQLite Database.
My objective is to read a list of points in a route containing geographical information. This is the Method for reading this data.
The Novation Website lists as one of the key features for their Launchpad, that it can be used by Max/MSP and Reaktor as a Trigger-Platform. As a Reaktor user I was very interested in using the Launchpad to control step sequencers. Thankfully Novation has published a Launchpad Programmers Reference, which enables the Developer to create their own applications for the Launchpad. There are 2 important things you have consider when developing a Launchpad control:
Launchpad communicates only via MIDI
There is no way of requesting the current state of the Launchpad
Basically you tell Launchpad via MIDI Note and CC Message, which buttons you want to light up in which color. On the other side the Launchpad transmits a Note On message when a button is pressed, transmitting the location of the button (as note number) and if the button was pressed (velocity = 127) or released (velocity = 0). This way you can also use the Launchpad as Keyboard/Drumpad.
We will be considering several options for controlling a Reaktor ensemble, preferably a Step Sequencer like the DSQ32 or my Own Scale Step Sequencer.
The bottom line is, making Launchpad work properly with Reaktor is a bitch.The problem is, that Reaktor currently (current Version 5.5) does not support OSC in host mode. As far as i am concerned, it doesn't even make sense in trying to create anything using OSC until NI comes around to implementing OSC in host mode. Don't quite understand what the problem is for them. In any case we need an intermediate process/application/plugin that stores the current state of our Launchpad and sends the right data to the ensemble that we want to control.
To get proper control of an ensemble in an host environment, you have to resort to MIDI messages. These messages have to be routed to the ensemble in some way and the best way to accomplish this is by sending Midi message via a virtual MIDI Port. On the PC you have to resort to MIDI Yoke, which I found only partly reliable. On the Mac you can easily create a virtual MIDI Port with the Audio-Midi-Setup using the IAC Driver.
I wrote an Application in Java, that stores the different Launchpad states I conceived to control the DSQ-32. It used MIDI Yoke on the PC to send the MIDI Data through the host, i.e. Ableton Live. I modified DSQ-32 in such a way that the Buttons would respond to a sequence of MIDI CCs. After some trouble got my results and posted a short performance with my Launchpad <-> Java Application <-> Ableton Live <-> Reaktor DSQ-32 on Youtube:
I chose the DSQ-32 because of all the tiny buttons. Unfortunately the result was not 100% satisfying because the bidirectional communication did not quite work as well as I had hoped for. This was mainly due to some limitations in which way Live handles (it filters duplicate CC Values!!) midi messages.
In the meanwhile I purchased an iPad and Max4Live and will abandon developing for the Launchpad and Reaktor. Let's hope the next version of Reaktor will be able to handle OSC in the the future.
This Blog will be used as a notebook for general problem solving. It will mainly be covering subjects in Java Developement & Synthesis Midi Programming. In Java current key points of interest are:
Spring
JSF / Web
Enterprise Messaging (Open Source Messaging)
My other main subject will be programming with Native Instruments Reaktor 5. Eventually I will also have to turn to Max4Live and deal with learning Max. I am however not ready to purchase Max4Live yet. Other points of interest are: