μ-Scale Lab with MIDI Keyboard




Is it a great performance?

The Motive

The recently released μScaleLab allowed a virtual piano to be played on a PC keyboard.
However, those who want to play more like a musical instrument will want to use a full-fledged device.
So I thought that this tool would be even better if it were possible to connect and play a MIDI keyboard.
The PICO-8 does not currently have MIDI connectivity, as far as I know.
I had my eye on the fact that it would be possible to do this by "exporting once to the web and then using GPIO communication".

How did you make it up?

Distributing it as html is a little bit inconvenient. Therefore, we decided to create a native application.
The common webview apps using the Node.js libraries were all unsuccessful because the library support had expired and there were problems with the exporting part.
The one that finally worked well for exporting the app was Python. (version3.8)
The web rendering engine is MSEdge for windows apps.
It might be a good idea to update the MSEdge installed on your PC to the latest version, as it was failing to recognize MIDI before the latest version.

Additional code edits

Added script to access Pico8 GPIO.
It sends note ID and ON and OFF information output from the MIDI device to 4 addresses.
(The number of simultaneous notes is limited to 4.)
7 bits for note ID and 1 bit for ON-OFF, 255 is the state of no signal.

The Pico8 side performs NOTE processing at the ON/OFF trigger timing of the 4 addresses.
However, it seems that Pico8 needs to inform JS side that it has received a GPIO signal to synchronize with Pico8. So, use "set to 255".

Then we can modify the default HTML UI.

About the distribution

For now, only the windows version will be distributed.
Other versions may require a PC environment. We would like to prepare them possible.

Get μ-Scale Lab (Music Scale Reference)

Buy Now$5.00 USD or more

Leave a comment

Log in with itch.io to leave a comment.