MIDI Mapping System for Sonic Pi (GitHub repo)

MIDI Mapping System for Sonic Pi (GitHub repo)

Hi everyone,

I’ve been working on a small system to map MIDI controls (0–127) to synth and FX parameters in Sonic Pi.

I originally built this to reuse an old MIDI controller that didn’t work properly with my DAW anymore. Instead of fixing drivers, I routed everything through Sonic Pi and turned it into a simple control layer for live performance.


What it does

  • Maps MIDI knobs/buttons to Sonic Pi parameters
  • Normalizes values (0–127 → usable ranges)
  • Uses a consistent set / get system
  • Includes ready-to-use mappings for synths and FX

Example

live_loop :midi do
  use_real_time
  control_num, value = sync "/midi:your_device:1/control_change"

  if control_num == 13
    set :c1, value / 127.0
  end
end

live_loop :test do
  with_fx :bitcrusher, amp: get(:c1) || 0.5 do
    sample :loop_amen
    sleep 1
  end
end

Repo

You can find everything here (README + full synth/FX mappings):

:backhand_index_pointing_right: GitHub - LapoCipriani/sonic-pi-midi-mapping: A small system to map MIDI controls (0–127) to synth and FX parameters in Sonic Pi. · GitHub


Feedback

I’d really appreciate feedback, especially on:

  • readability of the mapping system
  • better ways to structure MIDI control in Sonic Pi
  • possible improvements for live performance use

This is my first project like this, so any suggestions are welcome :slightly_smiling_face:

Thanks!

1 Like