Showing posts with label midi. Show all posts
Showing posts with label midi. Show all posts

Thursday, 5 January 2012

Installing Groove Agent 3 (Update from Version 1) on Mac OS Lion

It all seemed so simple. I wanted to install my trusty copy of Groove Agent 3 on a new Mac OS Lion box. The license is on my eLicenser already. So it should just be a quick insert-DVD-and-install job.

Shouldn't it?

Of course not.


#Fail...

I've been using Groove Agent for years now. My version 3 DVD was an upgrade disk from the original version 1. If you run that DVD's installer it says you have to have version 1 installed to upgrade. That seems fair enough.

Except you can't install Version 1 on Lion; it is an old PPC application, and Lion doesn't support Rosetta any more.

It's a deadly circle; I now legitimately own some (not inexpensive) software that I can't install. Pete is not a happy bunny.


Attempt 1: tech support

I sent a tech support email through my Steinberg account. Not with much hope, I have to admit.

That was ages ago. What do you think happened?

Yup, you're right. Not even got a "we've got your message and it's in a queue" reply.

Thanks, Steinberg. Thanks a bunch.

But where there's a will, there's a way...


Attempt 2: Check for updates on the website

The Groove Agent 3 support site has a few update installers available (which, naturally, need the full program installed first to be able to update).

There is also a new "full installer" for the Mac to replace the DVD's installer for first-time users. This shows great promise.

Once downloaded, I run the installer. "Insert the Content DVD" it asks (impolitely). OK, again this is fair enough. The content is enormous, and is on the DVD already so I shouldn't need to download that again. It also proves that I own the product I'm installing.

I insert my Groove Agent 3 DVD into the machine. The installer doesn't recognise it. No message. No hint. No continue button. It just sits there.

Of course, it's looking for the "Groove Agent Installation DVD" not the "Groove Agent Update Installation DVD". Swines.

Absolute swines.

But where there's a will, there's a way...


Attempt 3: Trick the installer

Being a techie I wonder. I wonder how rubbish they really are... Is the installer just looking for a DVD called a certain name?
ln -s "/Volumes/Groove Agent Update DVD"  "/Volumes/Groove Agent DVD"
Run the installer again.

Success!!!

The installer runs, it copies over the content from the DVD and there's my Groove Agent 3 sitting there, ready to run.

Goodliffe: 1, Steinberg: 0, (Steinberg Customer Support: -5)


But, we're not there quite yet

I fire up Cubase, pull in the virtual instrument, and a window pops up asking me to locate the content files. That's the content that the installer just installed. Into a standard place. Didn't it think to look there itself? Sheesh.

That's OK, I'll just use the file browser dialogue that appears to load it. Except that the content is automatically installed into "/Library/Application Support/Steinberg/Groove Agent".

Notice that first bit. Yes, "/Library". The folder that Apple now HIDES from users in Lion so they can't fry in innards of their OS. I physically can't navigate to the content. Genius.

The trick, of course, is to launch Finder, open the "Go" menu, and hold down the Command key. At this point "Library" magically appears in the middle of the menu's list of places you can go to. Select that folder. Navigate to the right directory in the Finder window that appears, and then drag the target directory into the patiently waiting application's file open dialogue.

What a palaver.

But that's it, I now definitely have Groove Agent 3 installed and running.


Whinge

Of course, I have a clue what's going on inside my computer, and was able to engineer this solution based on my experience and a selection of educated guesses. Goodness only knows what the average user would be able to make of this situation.

(Hopefully this blog post will help someone in time. Let me know if it does!)


Endnote

It seems that every time I want to sit down an use my computer to make music, the computer wants some love, wants its nappy changed, or wants feeding first.

 New driver required! Update available! Incompatibility detected!

Technology really can get in the way of being creative.

Thursday, 24 November 2011

PGMidi moved and updated

My popular PGMidi library for MIDI input/output on iOS has moved from Gitorious to a new location on GitHub. (This was requested many times, and who am I to disappoint?)

Please update your repos accordingly.

Over the next few days, I'll also be adding a few new tweaks and features to the project, so stay tuned.

Thanks for all the kind comments and feedback about the code - I'm really glad it's useful. Please do let me know if you've incorporated it in your own project.

Friday, 4 February 2011

PGMidi updated

Attention PGMidi users! I've updated my MIDI Monitor example project again, this time making PGMidi less of an example, and a lot more useful for general use.

Check it out on the GitHub project page (historical note: it was hosted on this gitorious project page, but that is now deprecated in favour of GitHub).

What's changed:
  • The PGMidi class now allows you to determine what MIDI sources and MIDI connections are currently available.
  • It allows you to determine whether the source/destination is a networked session, or a physically attached device.
  • The "events" PGMidi sends through the delegate interface are far more explicit.
  • I've added some useful tools to find a matching source/destination pair if you want to speak to one specific MIDI device.
The MIDIMonitor example application continues to show how to use the PGMidi API.

Thanks for all the comments and feedback I've received about this code. I hope you find these updates useful.

Wednesday, 5 January 2011

More iOS MIDI (using networked MIDI connections)

My iOS MIDI I/O example code has been incredibly popular. It's great to know that many music apps out there have incorporated my code to get their MIDI interfacing working.

Thanks for all the kind feedback.

I have been updating the MIDI code with a few structural tidy-ups, and an often requested feature - the ability to use networked MIDI sessions (connections).

Doing it manually: Using networked MIDI connections

iOS provides some a neat networked MIDI connection facility. However, despite being easy to set up, network MIDI sessions aren't initially obvious.

First, you must include:
#import <CoreMIDI/MIDINetworkSession.h>
Because network sessions are not included in the umbrella CoreMIDI.h include file. Sigh.

Next you must establish a network session by winking the (evil) singleton instance into existence:
MIDINetworkSession* session = [MIDINetworkSession defaultSession];
Then, merely turn it on:
session.enabled = YES;
session.connectionPolicy = MIDINetworkConnectionPolicy_Anyone;
Yes, that is all.

Documentation for MIDINetworkSession is available here.

The easy way: using PGMidi

If you're using my MIDI classes, then you can just call the PGMidi class' enableNetwork: method with YES or NO.

Get the code

The latest version of my MIDI interface code, and a sample project that shows it in action is available from the GitHub project page.

Feedback, as ever, is welcomed.

Tuesday, 2 November 2010

Sending MIDI through CoreMIDI

The 4.2 iOS GM seed is out. CoreMIDI is coming to the masses. So I've updated my CoreMIDI example to show how to send MIDI out through the USB port. (I've had a lot of people ask me for this.)

Go to the GitHub project page and check out the update. It's a simple addition, but shows the simplest way of getting MIDI data out of your application and through CoreMIDI.

Interestingly, the later - and the GM - versions of iOS 4.2 are far less forgiving of attached USB control devices. Most of the devices I test with are rejected by the iPad because they draw too much power. These are devices with LEDs, but that are certainly within USB power specifications. That's quite a shame.

As ever, I welcome feedback about this example project. Let me know if you find it useful.

Thursday, 21 October 2010

Using CoreMIDI in iOS (an example)

In iOS 4.2 the CoreMIDI framework is dropping into the standard operating system. MIDI connectivity using generic class-compliant USB MIDI hardware will be available to all.

It's not a big framework, with a handful of pure-C APIs. But its affect will be profound. What was previously only possible using Akai's AkaiConnect SDK (which is a very nice Objective-C API) or Line 6's MIDI Mobilizer SDK will be available to all.

From what I can see, the iOS CoreMIDI version is going to be the exact same API as the Mac OS desktop variant. I expect developer take-up of this API to be far faster than for the existing two (non-standard) iOS MIDI interface APIs. Pretty soon every iPhone synth app will support Apple's generic MIDI API.

That is, if they can work out how to.

CoreMIDI isn't the best documented API (this is all you get: a list of typedefs and functions). Fortunately, the headers are well-commented and the API is mercifully simple and sensible. However, with no compelling examples (that I could find) it takes a little digging to work out how to use CoreMIDI.

So here I present a very simple example project, with a reusable Objective-C MIDI interface class. With this code, you can get up to speed with CoreMIDI quickly. Indeed, if you just paste my MidiInput class into your synth app you'd be good to go.

Grab it from the GitHub project here. (Update note: the repo master used to be hosted on Gitorious here but we've moved to GitHub in these enlightened times)

Please let me know if you find it useful, or if you use it in your own projects.


Integrating CoreMIDI in your application

First, you need to decide if you want your app to support devices running iOS versions before 4.2. Since CoreMIDI is only introduced in 4.2, you have to jump through a few hoops to keep your app running on earlier versions:
  • Weakly link to the CoreMIDI framework, so on OS versions without it your application will still launch. (You do this by going to your application's target in the Xcode tree view, selecting "Get info", and in the "General" tab's "Linked libraries" section ensuring that CoreMIDI is set to "Weak" not "Required".)
  • Including CoreMIDI functionality conditionally. The best way to do this is inspect the kCFCoreFoundationVersionNumber variable and only initialise your MIDI handling if the value represents iOS 4.2 or later. (See the iOS version detection header file in my example project for an elegant way to do this).

A demonstration of all of this is available in my example project.


Using CoreMIDI

CoreMIDI itself isn't too complex if you're happy to read the headers and work out what's going on. You need a basic grasp of how Mac OS's Core Foundation works, to understand lifetime management issues and to access string properties, etc.

CoreMIDI has a few basic concepts: most importantly clients, devices (with endpoints) and ports. The C APIs let you enumerate these, and register a notification to keep abreast of changes in MIDI connection state.

MIDI inputs are "sources" in CoreMIDI. MIDI outputs are "destinations".

Given those basic facts, you should be able to read through my MidiInput class and figure out what's going on.


Parsing MIDI

My example program just spits out a stream of binary MIDI data. I'm not showing any parsing of the MIDI data stream here. This parsing isn't rocket science, but is another step you have to perform.

Contact me if you want to know more about parsing MIDI.