How Sonic Pi upload Midi Files From My Computer?

How Sonic Pi upload Midi files from my computer?

I am a Los-Angeles based composer and really enjoyed my Sonic Pi experience so far. I want to see if I can upload some midi files into Sonic Pi workstation so I can code/play with my existing music. For example, the midi file I exported from Logic. (not audio file) I would greatly appreciate it if I can get assistance from this community.

Hi here
YOu can’t load a midi file directly into Sonic Pi. However if you are using Logic I wonder if you are using a Mac? That has a nice little app called MidiPlayer-X which you can buy (£1.99 GBP) on the App Store and this enables you either to play midi-files in the MidiPlayer-X app, or to send them as a stream of midi commands to Sonic Pi where they can be used to trigger built in Synths in Sonic Pi. I mentioned it in this article

1 Like

Hi @yangzhang8805 welcome to in_thread, and hello also from LA (County)!

Sonic Pi doesn’t have any built-in support for loading MIDI files. I have a similar interest to be able to use a bunch of my own MIDI files and have explored this a little bit.

There are some tools out there that can help. At the top of my list to evaluate is Midiot (link below). I stumbled across this recently and looks like it has all the features needed. I haven’t had time to test beyond confirming that the base file appears to load OK but I’ll report back soon. The code hasn’t been updated in a few years so there may be things in there no longer compatible, but I’d be willing to hack at some fixes since this seems usable for me and possibly others.

A few months ago I hacked together a proof of concept Python script to convert a basic (drum-based) .mid to Sonic Pi code. I don’t expect it’s usable outside my hacking at the moment, but it’s a problem I want to solve… The Midiot approach seems good so I’m hoping it works out of the box or with a little nudging. :slight_smile:

My hack:

1 Like

@robin.newman: and yes, I am using Mac. Okey, I will try MidiPlayer-X app to see how it can send those Midi events to Sonic Pi.
@perpetual_monday: Greeting from LA as well! I am interested in experimenting something. The purpose of using Midi file rather than Audio file is to change those notes, scale freely from the existing score/production. Certainly I can do everything in the traditional music production world, but it would be cool to mingle everything by coding/re-coding. :slight_smile: I will check out those links and let’s keep updated. Anyway, many thanks!

1 Like