Midi Controllers
Hey all! Long time user, first time poster, yada yada...
The problem
I'm really slow at typing out notes using my computer keyboard, so I want to use my midi controller to speed up the process of inputting notes into Picotron's tracker.
My solution
I wrote up a quick shell script to allow me to use my midi controller within Picotron's (and by extension Pico-8's) tracker. You can run it in the background, and it just looks for input from my midi controller and simulates the appropriate keypress to input the note in the tracker.
I made it following the advice from this Stack Exchange thread. It requires a unix-like shell, as well as aseqdump
and xdotool
, to work.
#!/usr/bin/env sh aseqdump -p "YOUR_MIDI_DEVICE_HERE" | \ while IFS=" ," read src ev1 ev2 ch label1 data1 label2 data2 rest; do case "$ev1 $ev2 $data1" in "Note on 48" ) xdotool type z ;; "Note on 49" ) xdotool type s ;; "Note on 50" ) xdotool type x ;; "Note on 51" ) xdotool type d ;; "Note on 52" ) xdotool type c ;; "Note on 53" ) xdotool type v ;; "Note on 54" ) xdotool type g ;; "Note on 55" ) xdotool type b ;; "Note on 56" ) xdotool type h ;; "Note on 57" ) xdotool type n ;; "Note on 58" ) xdotool type j ;; "Note on 59" ) xdotool type m ;; "Note on 60" ) xdotool type q ;; "Note on 61" ) xdotool type 2 ;; "Note on 62" ) xdotool type w ;; "Note on 63" ) xdotool type 3 ;; "Note on 64" ) xdotool type e ;; "Note on 65" ) xdotool type r ;; "Note on 66" ) xdotool type 5 ;; "Note on 67" ) xdotool type t ;; "Note on 68" ) xdotool type 6 ;; "Note on 69" ) xdotool type y ;; "Note on 70" ) xdotool type 7 ;; "Note on 71" ) xdotool type u ;; "Note on 72" ) xdotool type i ;; "Note on 73" ) xdotool type 9 ;; "Note on 74" ) xdotool type o ;; "Note on 75" ) xdotool type 0 ;; "Note on 76" ) xdotool type p ;; esac done |
Questions for the community
As far as I know, Picotron (and Pico-8) only has keyboard shortcuts to input notes from C3 to E5, so I still have to manually adjust octaves if I'm composing outside of that range. Is there anyone out there more informed than I, who knows of any way to input all the notes using a keyboard? Or better yet, is there a way to have Picotron itself listen for midi input? Because if so, then the gates would be wide open to hack on the tracker itself.
This is so cool! I've been wanting to make this put I never sat down and actually did it. Thank you so much for sharing! I was also postponing switching to back to linux, so now I have two good reasons :)
[Please log in to post a comment]