Loopy Pro: Create music, your way.
What is Loopy Pro? — Loopy Pro is a powerful, flexible, and intuitive live looper, sampler, clip launcher and DAW for iPhone and iPad. At its core, it allows you to record and layer sounds in real-time to create complex musical arrangements. But it doesn’t stop there—Loopy Pro offers advanced tools to customize your workflow, build dynamic performance setups, and create a seamless connection between instruments, effects, and external gear.
Use it for live looping, sequencing, arranging, mixing, and much more. Whether you're a live performer, a producer, or just experimenting with sound, Loopy Pro helps you take control of your creative process.
Download on the App StoreLoopy Pro is your all-in-one musical toolkit. Try it for free today.
Extract drum patterns from GarageBand on iOS (Python(ista) script)
I've been getting up to speed with making music on iOS in the last few months and this forum has been a very useful source of information.
To try and give something back, and to learn some more about Python, I have knocked together a little script which will parse GarageBand project files and extract drum patterns it finds as MIDI files:
https://github.com/MisplacedDevelopment/GBExtractorPublic
This is the first Python code I have written so may not be the most...elegant!
The following drum sources should be parseable (Accoustic and Electronic):
- Virtual Drummers
- Smart Drums
- "Tappity-tap the screen" Drums
- Beat Sequencer
The script was written to run as part of a native workflow on the iPad in Pythonista. v1.1 now allows you to run the script on desktop Python (tested 3.7 on Linux) if you do not want to purchase one of the iOS Python interpreters.
It seems to do what I need of it right now but there are a list of possible extensions in the GitHub readme which I may get to one day. I suspect splitting drum parts out into separate tracks will be something I want to do sooner rather than later.
Do read the GitHub readme for more information.
1st Sept 2020 - v1.1 - added support for running on desktop Python (tested on Linux with Python v3.7)
Comments
Wow, that’s cool
👍
Wow, it works really well, thanks for sharing 😊 👍
Thanks. Wonderful.
Wow thanks this is pretty cool
Nicely done. Keep up the great work.
Super-useful - thanks!
@MisplacedDevelopment
First of all, welcome to the forum! It's always great to see new coders here 😊👍🏼
In case you're interested, a few links for your entertainment here:
https://audeonic.boards.net/thread/734/adding-scripting-languages-using-midifire
https://wiki.audiob.us/pythonista_als_to_midifile_converter
https://forum.audiob.us/discussion/38749/drambo-graphicshaper-envelope-drawer-extension
https://forum.audiob.us/discussion/38383/released-a-new-shortcut-send-stems-from-zip-to-blocs-wave
https://forum.audiob.us/discussion/37985/created-a-beatmaker-3-kit-converter-that-works-on-ios-for-free
https://libraries.io/github/vsouza/awesome-ios
On the GB Extractor description, it's recommended we use the Pythonista app to run the script.
As someone who has little to no interest in coding, $9.99 seems like a steep price point for an app just to run this script.
I noticed a free program called Code Playground that runs Python and a plethora of other languages:
https://apps.apple.com/us/app/code-playground-learn-to-code/id1452106609
Would this work?
If it reads python code and it supports "open in..." then possibly yes.
Why not just try it?
This looks really great, got Pythonista but can’t download GB till tomorrow as on mobile data.
I suppose the next question is can this convert a whole project with smart guitar etc. to midi, would be awesome.
+1 great idea.
This works great in combination with LK, because each drum section in Garageband is extracted as seperate midi files.
So it's really easy to import the midi files into clips in LK 😊
I haven't used that app myself but it looks more like an educational tool rather than a full-blown interpreter/compiler.
I will update the script in the next few days so that you can run it using desktop Python as well as in Pythonista. This means you would be able to run it using your Windows/Mac/Linux machine and a free Python interpreter rather than using iOS.
Thanks for the warm welcome! Some interesting reading there, I did not realise there was a bridge available via MidiFire, could come in useful...
The initial focus of the script is to get the drum patterns out of GB. The data for other instruments such as smart guitar are likely to be stored in a similar way but there are extra complications around mapping the GB internal bytes to equivalent MIDI. How things like pitch bends and other articulations are represented by GB would need to be reverse-engineered.
It would be less challenging I think to get the simple note on/off and velocity data out for other instruments but you would lose some of the expressiveness that the extra MIDI data brings.
Thanks, good to see that someone has got it working! I've been doing similar with Zenbeats; it is kind of cool to hear the GB drummers playing using my choice of drum sounds.
Cool. I look forward to trying the linux version.
That's a pretty impressive first python script, I must say. Was the byte decoding of Garageband project files done by trial and error, or did you find the format documented somewhere?
I would be interested in getting midi for other instruments such as smart guitar, even if it's only note on/off and velocity 😊
+1
Got this working on a drum track this morning and it’s brilliant, would be more than happy with simple note data for other instrument types.
I reverse-engineered the format using a hex editor and could see that there were MIDI-like sequences of bytes. To get the tempo and time signature I resorted to before and after binary comparison.
Very interesting. So, the project data was encoded in hex? I thought it was UTF-8.
What resources helped you understand MIDI? I get the concept from a producers' perspective, but I'm trying to understand it from a programmers' perspective.
@MisplacedDevelopment Welcome, and congrats on the cool creation. So is the only option on iOS only setup Pythonista app? Has anyone Discovered anything free out there that will work?
The project data is encoded as base64 data inside the project file. One that has been decoded then you are left with the binary data.
I've done stuff with MIDI data in the past so it was really just a case of working out how GB represents note on, note duration and velocity. There are a lot of resources on the MIDI file format out there if you are interested.
As luck may have it, I have just now updated the script so that it runs outside of Pythonista. I have only tested on Linux with Python 3.7 but hopefully that will open it up to people who do not already have Pythonista.
Wow. That’s cool... now I wanna figure out this process.
Yeah, as a non-coder, I’m looking for an inexpensive way to easily utilize this script. I really love the GarageBand drummers and the ability to scrape that MIDI and use it in Lumbeats, DrumPerfect Pro, or Cubasis would be Awesome!
I’m not certain this app will work but it looks like it would. it’s currently on sale for FREE, it’s usually $.99 in app description it says it reads/supports Python Code and has “open in” so I think it might work. Haven’t tested...
https://apps.apple.com/us/app/python-3/id1262850648
Thanks!
Will give it a try!
Wow, the script has been updated, so it now can extract midi from all instruments in Garageband 😊
This is great, I just tried importing drum, bass, guitar and strings midi from Garageband into LK and it works really well 👍
Fantastic 😀 look forward to trying this out later on.
Looks interesting, will have a play on Linux later and see how I get on
@White Ah, you noticed it had been updated! There is another version along "soon" which has had a big rewrite and contains more features so keep in mind what is there at the moment is a bit of an alpha release. I'll do a proper announce once it is ready but feel free to play with the new features!
Suddenly, the devs at Pythonista head quarters are baffled why their app is having a sharp uptick in sales