0

MakeCode MIDI - Error with Circuit Playground Express
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

MakeCode MIDI - Error with Circuit Playground Express

by peterserano on Sat Feb 09, 2019 4:57 pm

I'm trying to use the MakeCode blocks for MIDI using this github repository: https://github.com/Microsoft/pxt-midi

These MIDI function work great on the Micro-bit; however they cause the Adafruit Circuit Playground Express to output these errors (see attached screenshot) when trying to generate the final code.

Has anyone tried using these MIDI blocks on a Circuit Playground Express and got it working? If not, does anyone know how I can debug the code further? The error messages generated are not too helpful.

Thanks!
Attachments
adafrit_midi_error.png
adafrit_midi_error.png (105.13 KiB) Viewed 57 times

peterserano
 
Posts: 3
Joined: Wed Apr 18, 2018 7:58 pm

Re: MakeCode MIDI - Error with Circuit Playground Express

by johnpark on Mon Feb 11, 2019 5:50 pm

That would be great to get it working on CPX. Currently the MIDI extension is only supported on Micro:bit and Calliope. I'll check with the Microsoft MakeCode team to see what they think about porting it to CPX.

johnpark
 
Posts: 353
Joined: Wed Mar 25, 2009 2:15 pm

Re: MakeCode MIDI - Error with Circuit Playground Express

by peterserano on Mon Feb 11, 2019 6:44 pm

Thanks John!

I tried to write my own MIDI function-blocks that would use serial commands but I noticed that the CPX doesn't have 'serial' blocks either.

I found this article that shows how to enable some serial blocks still under beta testing, but it uses the hardware UART on A6/A7 as opposed to serial over USB which would be ideal for the project I'm working on: https://learn.adafruit.com/circuit-play ... s/makecode

I have code all up and running that can talk MIDI over USB, UART/DIN, and/or BLE (with the Adafruit UART friend) with the CPX - but it's all done using the Arduino IDE. - I'm going to be teaching a workshop on DIY MIDI Controllers in a few weeks and would love to get something working with MakeCode for the attendees new to programming!

https://withfriends.co/event/1194423/wo ... controller

Thanks again!

peterserano
 
Posts: 3
Joined: Wed Apr 18, 2018 7:58 pm

Re: MakeCode MIDI - Error with Circuit Playground Express

by johnpark on Mon Feb 11, 2019 8:23 pm

Right on! I taught my Circuit Python pizza box DJ controller workshop at Hackaday Supercon a few years ago using Circuit Playground Classic and Arduino -- boy I'd love to do that again now w CPX and CircuitPython or MakeCode! The Arduino setup portion of the workshop for a lot of people getting laptops going takes much more time than I'd have liked :)

Peli at MS MakeCode team said they don't currently have USB MIDI. They're using MIDI > Serial > Hairless app on PC or on micro:bit MIDI > BLE MIDI > Garage Band.

He may be able to help get something like that going for CPX.

johnpark
 
Posts: 353
Joined: Wed Mar 25, 2009 2:15 pm

Re: MakeCode MIDI - Error with Circuit Playground Express

by johnpark on Mon Feb 11, 2019 8:26 pm

Oh, another thought (I haven't tested this yet) is to use EduBlocks GUI to generate Circuit Python code and do USB MIDI on CPX. Here's a guide on EduBlocks with CPX https://learn.adafruit.com/using-edublo ... nd-express

UPDATE: EduBlocks doesn't have a USB MIDI out block, but you could definitely do it in straight CircuitPython or maybe a combination of EduBlocks to get people started and then paste in some CircuitPython MIDI code as done here: https://learn.adafruit.com/grand-centra ... cuitpython

johnpark
 
Posts: 353
Joined: Wed Mar 25, 2009 2:15 pm

Please be positive and constructive with your questions and comments.