Topic: Help with midi programming in swift to send midi commands to pianoteq

Hi I have written a program that takes a midi file of say a Chopin waltz. The program makes sure the right notes (pitch) are played in the right order but I control when the notes start/stop and their volume and sustain pedal. Basically I cannot play a wrong note (pitch). This can either be played from a touch screen on an iphone or ipad or with a midi keyboard plugged into the iphone or ipad. So far the sound output has used different piano soundfonts. Clearly these are of terrible quality compared to Pianoteq. I have browsed the forum but not found what I am looking for.
I am a very amateur programmer and am struggling to know how to write the simplest code in Swift for a program running on my Mac to output a midi noteon, pitch, volume message to pianoteq running on the same Mac will pick up and play. If someone could give me a few snippets of code to start me off I would be immensely grateful. I have browsed the forum but not found what I am looking for. Many thanks.

Re: Help with midi programming in swift to send midi commands to pianoteq

I only program on Windows and Linux, so I don't have any experience with recent Mac programming, but I do know that OSX has an IAC Bus for inter-application MIDI communication.  You'll need to turn it on in the settings for your Mac.  Once it's on, you can use something like the MIKMIDI library (which is well-maintained and well-documented) to pass the signal to the IAC bus, and--as long as the IAC and all other MIDI ports are open in Pianoteq settings, you should be basically where you need to be.

https://github.com/mixedinkey-opensource/MIKMIDI
http://cocoadocs.org/docsets/MIKMIDI/1.6.1/

Spotify: https://open.spotify.com/artist/2xHiPcCsm29R12HX4eXd4J
Pianoteq Studio & Organteq
Casio GP300 & Custom organ console

Re: Help with midi programming in swift to send midi commands to pianoteq

Thanks very much. That worked very straight forwardly. I have been using PGMidi but will also look at MIKMIDI
Great when a simple suggestion solves something you have wrestled with unsuccessfully!

tmyoung wrote:

I only program on Windows and Linux, so I don't have any experience with recent Mac programming, but I do know that OSX has an IAC Bus for inter-application MIDI communication.  You'll need to turn it on in the settings for your Mac.  Once it's on, you can use something like the MIKMIDI library (which is well-maintained and well-documented) to pass the signal to the IAC bus, and--as long as the IAC and all other MIDI ports are open in Pianoteq settings, you should be basically where you need to be.

https://github.com/mixedinkey-opensource/MIKMIDI
http://cocoadocs.org/docsets/MIKMIDI/1.6.1/

t

Re: Help with midi programming in swift to send midi commands to pianoteq

Great!  I'm glad it worked!

Spotify: https://open.spotify.com/artist/2xHiPcCsm29R12HX4eXd4J
Pianoteq Studio & Organteq
Casio GP300 & Custom organ console