Skip to content

Instantly share code, notes, and snippets.

import os.log
import Foundation
import PlaygroundSupport
let TREE = "#"
let SLOPES = [(1,1),
(3,1),
(5,1),
(7,1),
@coxevan
coxevan / convert_midi.py
Last active May 31, 2021 01:44
Python script that'll convert MIDI message strings to channel number (G#1 -> 44)
'''
Convert midi message into number
C-2 -> 0
G8 - 127
Supports Korg/Roland/synths with alternative starting octaves
* Example: In korg/roland synths, the low C is C-1(#0) and high G is G9(#127)
'''