Page 1 of 1

Mbed USB to Flowstone

PostPosted: Thu Mar 01, 2012 3:50 am
by fixstuff555
Hi all,

I saw an interesting video of a USB slingshot on the Mbed site here http://mbed.org/cookbook/Slingshot, and it brought to mind the demo done way back with flowstone and a gyroscope tied to a synth. Although I was initially looking at the USB keyboard and Mouse emulation, I also was happy to see a USB Midi implemented as well!

I thought this may be of some interest to folks here, particularly anyone with a music leaning and who may be thinking of building a hardware synth around Flowstone or something. The libraries can even be used for normal usb keyboard or mouse emulation as well. The screenshots I've attached are for the USBMidi library functionality. Basically, it works out of the box. Run the USB Midi demo located on the Mbed site here http://mbed.org/handbook/USBMIDI, and the Mbed Audio MIDI device is now an option in Flowstone in the MIDI IN and OUT primitive. The demo basically cycles through code 48 through 83 over and over. It does illustrate something that may be of extreme interest to folks here, particularly Synthmaker folks. I could easily see this Mbed chip being used to build a custom keyboard. The interesting thing here is the flexibility of designing your own hardware. With this hardware, you could basically incorporate USB keyboard codes and Mouse movements, along with the note generation into a custom synth. I'm not a music guy, so I am unsure whether this hardware would be of interest to anyone. Theoretical Music machine concept: HTPC with Digital Audio as a computer running Flowstone, an LCD with the Synth Visuals, a hardware panel with various custom switches, knobs, sliders, etc linked via an MBed MIDI interface.... Hmmm...

This chip is actually what prompted me to post a question on the General forum. It also has USB HID libraries, which basically gives you a method of interfacing to Flowstone FAST, without having to deal with Serial COM ports. Hopefully someone who is a better programmer on here than me can take some ideas from this and run with it. The Ruby element to me is a real plus, since the USB can be tied in through existing Ruby code theoretically.

I will next test the USB Serial speed capability. According to Mbeds website its able to handle 9000 packets of 64bytes/s. That's somewhere in the 4-5Mbps speed....

This is what the libraries can be set up to do:

USBMouse - Emulate a USB Mouse with absolute or relative positioning
USBKeyboard - Emulate a USB Keyboard, sending normal and media control keys
USBMouseKeyboard - Emulate a USB Keyboard and a USB mouse with absolute or relative positionning
USBHID - Communicate over a raw USBHID interface, great for driverless communication with a custom PC program <-- Flowstone!
USBMIDI - Send and recieve MIDI messages to control and be controlled by PC music sequencers etc
USBSerial - Create a virtual serial port over the USB port. Great to easily communicate with a computer.
USBAudio - Create a USBAudio device able to receive audio stream from a computer over USB.
USBMSD - Generic class which implements the Mass Storage Device protocol in order to access all kinds of block storage chips

Anyways, below are the screenshots. Sorry if theyre too big. Let me know if anyone is interested, I could post a short video to Youtube for it also.

Cheers!

Re: Mbed USB to Flowstone

PostPosted: Thu Mar 01, 2012 3:45 pm
by MyCo
Actually, it's not hard to implement the real Midi Protocol on any Micro, I've done it years ago on an AVR.

Re: Mbed USB to Flowstone

PostPosted: Thu Mar 01, 2012 5:31 pm
by fixstuff555
Yeah, I figured it would be something like that. I guess the only interesting thing is the USB part, if you didn't have MIDI into the PC. Oh well.

Re: Mbed USB to Flowstone

PostPosted: Thu Aug 30, 2012 5:06 pm
by fixstuff555
As a follow up to this, now that Flowstone will incorporate Synthmaker and VST support, the previous synth could be done using flowstone versus an AVR.

Think:

HTPC equivalent (FitPC, Zotac Nano Etc, Intense PC-mmmmm)
USB powered HMI touchscreen GUI interface
USB port for exporting VST to a flash drive
USB Midi Keyboard (Think M-Audio or similar)