Rbon [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=37845 Midi Controllers <h1>Midi Controllers</h1> <p>Hey all! Long time user, first time poster, yada yada...</p> <h2>The problem</h2> <p>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.</p> <h2>My solution</h2> <p>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.<br /> I made it following the advice from <a href="https://superuser.com/a/1170232">this Stack Exchange thread</a>. It requires a unix-like shell, as well as <code>aseqdump</code> and <code>xdotool</code>, to work.</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre>#!/usr/bin/env sh aseqdump -p &quot;YOUR_MIDI_DEVICE_HERE&quot; | \ while IFS=&quot; ,&quot; read src ev1 ev2 ch label1 data1 label2 data2 rest; do case &quot;$ev1 $ev2 $data1&quot; in &quot;Note on 48&quot; ) xdotool type z ;; &quot;Note on 49&quot; ) xdotool type s ;; &quot;Note on 50&quot; ) xdotool type x ;; &quot;Note on 51&quot; ) xdotool type d ;; &quot;Note on 52&quot; ) xdotool type c ;; &quot;Note on 53&quot; ) xdotool type v ;; &quot;Note on 54&quot; ) xdotool type g ;; &quot;Note on 55&quot; ) xdotool type b ;; &quot;Note on 56&quot; ) xdotool type h ;; &quot;Note on 57&quot; ) xdotool type n ;; &quot;Note on 58&quot; ) xdotool type j ;; &quot;Note on 59&quot; ) xdotool type m ;; &quot;Note on 60&quot; ) xdotool type q ;; &quot;Note on 61&quot; ) xdotool type 2 ;; &quot;Note on 62&quot; ) xdotool type w ;; &quot;Note on 63&quot; ) xdotool type 3 ;; &quot;Note on 64&quot; ) xdotool type e ;; &quot;Note on 65&quot; ) xdotool type r ;; &quot;Note on 66&quot; ) xdotool type 5 ;; &quot;Note on 67&quot; ) xdotool type t ;; &quot;Note on 68&quot; ) xdotool type 6 ;; &quot;Note on 69&quot; ) xdotool type y ;; &quot;Note on 70&quot; ) xdotool type 7 ;; &quot;Note on 71&quot; ) xdotool type u ;; &quot;Note on 72&quot; ) xdotool type i ;; &quot;Note on 73&quot; ) xdotool type 9 ;; &quot;Note on 74&quot; ) xdotool type o ;; &quot;Note on 75&quot; ) xdotool type 0 ;; &quot;Note on 76&quot; ) xdotool type p ;; esac done </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <h2>Questions for the community</h2> <p>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 <em>all the notes</em> 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.</p> https://www.lexaloffle.com/bbs/?tid=144629 https://www.lexaloffle.com/bbs/?tid=144629 Sun, 06 Oct 2024 21:45:44 UTC