Export Midi File Garageband Ipad

Export Midi File Garageband Ipad

Why no T-Bone?

Exporting midi from GB on iOS is something heard of lots of people wanting to do, including myself. So I ask, why should it be difficult? Why isn’t a feature?

But since it’s not a feature, why can’t we just reach in and take it for ourselves by force if we must?

Garageband and midi export - bionicsounds. One of the big weaknesses of Garageband is the lack of possibility to export midi tracks. An excellent script by Lars Kobbe (direct Download: GB2MIDI.ZIP) which the creator also makes available for free on his website, makes the export possible. Step one: Export GarageBand projects from iPad. The very easiest way to get projects from GarageBand on iOS to GarageBand on the Mac is to store those projects in iCloud Drive. If you do that, all.

I’ve searched the net, maybe I’ve missing it, but I have found any technique yet so let’s take a look at what’s known:

1. We can export an iOS GB project as a “.band” file to anywhere. Google Drive, whatever, using the standard iOS Share feature from within GB.

2. We can change the file extension to from “.band” to “.zip”, and extract the file and folders with a tool like 7-zip, simple one scale project looks like this:

Export Midi File Garageband Ipad

Interesting. Seems to almost make a little sense. So now what? It’s may be a bit wasteful for a project playing a single piano scale to be 1.2MB, but our notes have to be in there somewhere, right?!

A lot of the files are empty placeholders or unhelpful. However, notice there is a file called projectData.

If we open this file it looks like the file below. Getting a bit more interesting now. This looks like a plain ol’ xml file. Moreover it looks to have binary data directly included inside the file, see the <data> tag.

This image is clipped, the data section goes on a long way and probably accounts for a fair chunk of the 1.2MB size of the project.

Too bad that data section doesn’t have text like “You just used a Grand Piano to play the notes C, D, E, F, G, A, B”.

It’s in some kind of binary format Apple has chosen. We have to find a way to make sense of it. It could be fully encrypted, become impractical to see into, and game over folks.

XML Data

Ipad

However…encrypted files don’t usually look like that. The way encryption works usually requires it be very random looking.

Can you export garageband as midi

Noticed all the repeated characters? Maybe we’re not dead yet. It’s common for people to put binary data in XML by wrapping the binary data, say an image, in a standard textual encoding format. So we can at least take a shot. Let’s try base64. That gives us a file that look like

Looks like we’re still alive! You don’t have to be a developer to guess when you can see “Instrument Names”, we’re not dealing with some some kind of NSA super encryption.

With that layer of the onion peeled back, we still don’t know what it means, and I hate to break the bad news, but I’m new here and know nothing about the midi format details (I plan to look at examples or read the spec when I get a minute). But I’m already pretty sure that ain’t just midi because there’s all sorts of apple specific terms in it.

We can make some observations already. First, see all those scary looking black characters? Don’t be scared of those, that’s the easy part. They’re just control codes when you want to use a character that can’t be seen, but means something like, carriage return or whatever.

Export Midi File Garageband Ipad Pro

Where are we now?

Export

We started playing a single scale in GB iOS 12 latest versions of everything as of today

Export Midi File Garageband Ipad Download

Then wondered why the heck is there no midi export button?

Now we’ve peeled back several layers of a real project, are able to look around inside of it. It doesn’t appear to be encrypted at all and we’re seeing exactly the kind of stuff in the data we’d hope to see.

We can find music related words including “piano” used a bunch of times within this file and data nearby them in sub-sections that could have my scale notes buried in there somewhere.

I wish a had a few minutes to dig further right now but at the moment, I still haven’t hit any wall or seen any reason it shouldn’t be possible to with a little more poking around to get this done.

Interested in any feedback you have:

  • Do you agree it might be handy sometimes to have a .band to midi converter? I use other DAWs, some things I just prefer to do in GB iOS.
  • Is there already prior art on this effort for iOS, not desktop GB, or a free super utility I’ve missed?
  • If you look at the project data, maybe it’s obvious right away to where is is or how they’re storing it. I just ran out of time for but wouldn’t be surprised if others already know more.

Here’s a link to the decode project text file if anyone wants to take a look:

Comments are closed.