Thanks for pointing us in the right direction. What MIDI device were you connecting the Pi Pico to? (It sounded great!)
Jo and I are interested in connecting TuneScope to the MIDI device via the microcontroller (which we could do by using the Snap!-to-MicroBlocks bridge). This assumes that the latencies in response times would not be an issue.
Alternatively, is there a way to use a Snap! serial out command to control an external MIDI device directly via USB cable. (Inquiring minds want to know.)
I don't (any more) have any midi devices with 5 pin connectors so I used one of these
and plugged it into my Windows PC and then used the Anvil Studio program to act as a software synthesiser
(I'm trying to get hold of a real synth with 5 pin DIN connectors but even 2nd hand ones on Ebay are expensive!)
There will always be a way but I've not tried to do that
@bromagosa is currently working on MIDI stuff for Snap!
He tried to show it off to me at FOSDEM but something went wrong so it's not yet ready for prime time
I got MicroBlocks Boardie to send MIDI to the TuneScope's Snap! library via
USBConnection on a Macbook.
I have not yet been able to get a Pico-W plugged into a USB port to send MIDI to TuneScope. The IAC Driver in Audio MIDI Setup app does not recognize the Pico-W as a MIDI device.
However, the Raspberry Pi Pico and SAMD21 boards like the Metro M0 and MakerPort can send MIDI commands over a normal USB cable. From scspaeth's post, it looks as Snap! can receive MIDI commands via WebMIDI. scspaeth, you might need to send a MIDI command from Boardie (or from a physical board) to get the MIDI system to recognize the new MIDI source. You might also need to use your system's MIDI settings to route the MIDI source to Snap!, although It looks as though the block provides a drop-down menu of possible MIDI sources.
Also, you do not need a hardware synth to generate sound. There are a number of free sofrware synths such as Fluidsynth. There is even one that runs right the browser (midi.city). Midi.city needs to run in Chrome to accept input from external MIDI sources. So, in theory, you could have TuneScope drive on of those software synths and avoid the need for any external MIDI hardware.
@scspaeth That's fantastic that you were able to use MicroBlocks Boardie to send MIDI to the TuneScope Snap! library via a USB connection on a MacBook. We don't have a Boardie, but we will order one and try to replicate your results. Thank you!
@jmaloney Thanks for the suggestion of using a free software synth to generate the MIDI sound. We (ideally) would like to give folks the option of either a hardware approach (after the fashion of the great things that Bernat is doing) or a software solution. We're meeting with a CS student on Friday to discuss working on this as an independent study. Both approaches (hardware and software) seem worth exploring.
OTOH, don't hold your breath because I'm working on too many projects at the same time right now, and I don't know when (if ever) this will be done, but I got a basic proof of concept of the MIDI, Rhythm, and Scales&Chords libraries working on Snap!. The timing is pretty solid, although you experience tempo drops as soon as you do anything in the IDE. Music is extremely time sensitive.
Jens and I discussed a bunch of ideas to circumvent the issue, but I've had to move on to other things now (if you're curious, the Snap! 3D Beetle extension and turning Snap4Arduino into an extension), so I can't promise much.
In the meantime, here's a video showing a glimpse of what the future may look like:
I like this glimpse of the future. I also like the Boardie ... thanks so much for developing it and for bringing it to our attention. We'll begin using it immediately - there are several use cases. (Thanks!)
I believe -but I'm talking from memory- that you may have your 3.3v and signal wires in the wrong order. The article shows the connections for a female DIN-5 port, but this is a male connector you're soldering your wires to.
Additionally, these resistors are not as optional as the article may imply. I do need to revisit it and correct these things. You're not the first one who's had trouble with this
Our device is recognized by MicroBlocks and midi.city but we can't output anything. In particular, midi.city says no events received (unsuccessful). Do you have any suggestions on why this may be?
Your time and help is much appreciated, thank you!
Yes, we're connected to the IN adaptor plug. The adaptor doesn't flash the In LED when playing from Microblocks however. I'll continue trying out different things but please feel free to continue sharing any suggestions!
The MIDI Input Debugger from midi.city no longer receiving events is an unfortunate development but I recall there was never a light for MIDI In on that or Microblocks even when we had the old set up that could send events.
The values of the resistors (220 ohm) are valid for a 5V supply but not a 3.3V one
Now, I didn't mention this because I first used 220 ohms myself and if I'm remembering correctly, this worked fine with that adaptor but maybe I was just lucky
I only ran into problems when trying to connect to a "proper" midi device
Plan A
Try powering from the VBUS (pin40) instead of 3.3V (pin36) and see what happens (I can't remember what I used to do when I had it working with 220 ohm resistors)
Plan B
Get hold of 10 ohm and use that with pin 1 (Tx) connection
Use 33 ohm in series with pin 36 (3.3V)
(I've just checked with ohm meter and those are the values I'm using and they work for me)