Raspberry Pi + USB MIDI = General MIDI Module

Discussion about old sound cards, MIDI devices and sound related accessories.

Raspberry Pi + USB MIDI = General MIDI Module

Postby PhilsComputerLab » 2016-12-20 @ 08:56

A while ago I documented this project of using a Windows notebook with a USB MIDI interface, running Munt and VirtualMIDISoft and turning it into a MIDI Module.

gdjacobs applied this idea to the Raspberry Pi and he got the Munt emulator fully working.

I've only just got the Raspberry Pi so it was a steep learning curve and at first I am focusing on General MIDI, will checkout MT-32 emulation at a later stage. All up in took me a day or so to figure everything out. I know a lot more about the Raspbian OS and Linux, although I'm still a noob but that's ok :blush:

Image

I have done a thorough write-up of steps required to get this going and put it on a page on my site. I couldn't figure out an easy way to copy / paste that contents to here I'm afraid.

I am using a Roland UM-ONE MKII as USB MIDI interface. No drivers are necessary, it was plug and play.

Image

You will need a MIDI coupler to connect everything together:

Image

If you are new to the Raspberry Pi and not familiar with Linux, don't worry. The entire project can be setup using Graphical User Interfaces. It's really straight forward:

Image

Qsynth is an easy-to-use front-end for FluidSynth.

Image

The only issue I had was distorted sound and it was required to change Audio Driver, Buffer Size, Buffer Count and Polyphony settings as per image below:

Image

With patchage we create a link between the USB MIDI interface and FluidSynth.

Image

And that's it! Knock yourself out with trying different SoundFont files. The Crysis font seems to be too large, but all the "standard" SoundFonts work great.

There is one more issue with the onboard analogue audio out. It's really poor. A USB sound card is needed. I've ordered it, but will update the guide once it arrives. I've been using the HDMI audio in the meantime. You could also use a HDMI audio stripper, but that costs quite a bit more.

Hopefully others have a go at this and develop it further. An enclosure? LCD display with buttons to select SoundFonts and reset the unit? Lots of things that can be done.
User avatar
PhilsComputerLab
Hardware Mod
 
Posts: 6179
Joined: 2014-9-28 @ 03:33
Location: Western Australia

Re: Raspberry Pi + USB MIDI = General MIDI Module

Postby c0keb0ttle » 2016-12-20 @ 09:14

Fantastic! Will there be a video on this in the near future?
c0keb0ttle
Member
 
Posts: 181
Joined: 2016-10-23 @ 22:07

Re: Raspberry Pi + USB MIDI = General MIDI Module

Postby PhilsComputerLab » 2016-12-20 @ 09:15

c0keb0ttle wrote:Fantastic! Will there be a video on this in the near future?


A video? From me? No way! :lol:

Of course :blush:
User avatar
PhilsComputerLab
Hardware Mod
 
Posts: 6179
Joined: 2014-9-28 @ 03:33
Location: Western Australia

Re: Raspberry Pi + USB MIDI = General MIDI Module

Postby BloodyCactus » 2016-12-20 @ 14:09

fluidsynth comes with a 128mb GM soundfont that is pretty awesome.

sudo apt-get install fluid-soundfont-gm fluid-soundfont-gs


and it appears in

/usr/share/sounds/sf2/FluidR3_GM.sf2


GS sf2 is only like 3?mb, in same directory.
--/\-[ Stu : Bloody Cactus :: http://kråketær.com :: http://mega-tokyo.com ]-/\--
User avatar
BloodyCactus
Oldbie
 
Posts: 894
Joined: 2016-2-03 @ 13:34
Location: Lexington VA

Re: Raspberry Pi + USB MIDI = General MIDI Module

Postby Zup » 2016-12-20 @ 15:07

BloodyCactus wrote:fluidsynth comes with a 128mb GM soundfont that is pretty awesome.

sudo apt-get install fluid-soundfont-gm fluid-soundfont-gs


and it appears in

/usr/share/sounds/sf2/FluidR3_GM.sf2


GS sf2 is only like 3?mb, in same directory.


I guess that GS soundfont is "stacked" on top of GM sound font, so it can use instruments from GM without taking extra disk space.
I have traveled across the universe and through the years to find Her.
Sometimes going all the way is just a start...

I'm selling some stuff!
User avatar
Zup
Oldbie
 
Posts: 1278
Joined: 2003-10-04 @ 12:16

Re: Raspberry Pi + USB MIDI = General MIDI Module

Postby PhilsComputerLab » 2016-12-20 @ 15:40

BloodyCactus wrote:fluidsynth comes with a 128mb GM soundfont that is pretty awesome.


Yup, and it does sound nice.

I believe when I ran

sudo apt-get install fluidsynth


it prompted me and asked if I wanted the SoundFont. It also installed Qsynth automatically.
User avatar
PhilsComputerLab
Hardware Mod
 
Posts: 6179
Joined: 2014-9-28 @ 03:33
Location: Western Australia

Re: Raspberry Pi + USB MIDI = General MIDI Module

Postby Dominus » 2016-12-20 @ 16:07

Nice, thanks for the write up!
User avatar
Dominus
DOSBox Moderator
 
Posts: 7943
Joined: 2002-10-03 @ 09:54
Location: Ludwigsburg

Re: Raspberry Pi + USB MIDI = General MIDI Module

Postby PhilsComputerLab » 2016-12-20 @ 16:15

Dominus wrote:Nice, thanks for the write up!


No problem :happy:
User avatar
PhilsComputerLab
Hardware Mod
 
Posts: 6179
Joined: 2014-9-28 @ 03:33
Location: Western Australia

Re: Raspberry Pi + USB MIDI = General MIDI Module

Postby Ampera » 2016-12-20 @ 16:25

For some reason I am unable to find a single place where there is a gameport to MIDI cable. I have no clue where they are or how to buy them. Any tips? Communist Ralph on your videos btw.
User avatar
Ampera
Oldbie
 
Posts: 901
Joined: 2016-11-16 @ 22:31

Re: Raspberry Pi + USB MIDI = General MIDI Module

Postby PhilsComputerLab » 2016-12-20 @ 16:29

There are likely cheaper ones, but this is the first one I found: http://www.ebay.com.au/itm/Electric-Pia ... Sw0UdXtW1D
User avatar
PhilsComputerLab
Hardware Mod
 
Posts: 6179
Joined: 2014-9-28 @ 03:33
Location: Western Australia

Re: Raspberry Pi + USB MIDI = General MIDI Module

Postby Ampera » 2016-12-20 @ 16:39

PhilsComputerLab wrote:There are likely cheaper ones, but this is the first one I found: http://www.ebay.com.au/itm/Electric-Pia ... Sw0UdXtW1D


Thanks!

That one doesn't ship to the US, but these do.

http://www.ebay.com/sch/i.html?_from=R4 ... R0.TRC0.H0.XDB+15+to+MIDI.TRS0&_nkw=DB+15+to+MIDI&_sacat=0

I never searched using DB 15 to MIDI, and that's where they were hiding.
User avatar
Ampera
Oldbie
 
Posts: 901
Joined: 2016-11-16 @ 22:31

Re: Raspberry Pi + USB MIDI = General MIDI Module

Postby James-F » 2016-12-20 @ 17:10

This is a nice idea BUT:
To see something you still have to connect a monitor to it, mouse and keyboard are also necessary to control the PI.
You have to be a PhD in Computer Science do the simplest things in Linux, steep learning curve is a gigantic understatement. :neutral:

A small Windows based laptop is still a much simpler solution as a MIDI box, while the Raspberry PI (or Linux/Unix in general) is reserved for the extreme tweakers.
User avatar
James-F
Oldbie
 
Posts: 1448
Joined: 2015-11-30 @ 04:10

Re: Raspberry Pi + USB MIDI = General MIDI Module

Postby BloodyCactus » 2016-12-20 @ 17:23

James-F wrote:This is a nice idea BUT:
To see something you still have to connect a monitor to it, mouse and keyboard are also necessary to control the PI.


you can use putty on windows and ssh in. no extra keyboard/mouse/monitor required.
--/\-[ Stu : Bloody Cactus :: http://kråketær.com :: http://mega-tokyo.com ]-/\--
User avatar
BloodyCactus
Oldbie
 
Posts: 894
Joined: 2016-2-03 @ 13:34
Location: Lexington VA

Re: Raspberry Pi + USB MIDI = General MIDI Module

Postby James-F » 2016-12-20 @ 17:41

Remote controlling the Pi using a Windows PC still requires the Windows PC... why not just use that very same Windows PC?
User avatar
James-F
Oldbie
 
Posts: 1448
Joined: 2015-11-30 @ 04:10

Re: Raspberry Pi + USB MIDI = General MIDI Module

Postby Ampera » 2016-12-20 @ 17:49

James-F wrote:This is a nice idea BUT:
To see something you still have to connect a monitor to it, mouse and keyboard are also necessary to control the PI.
You have to be a PhD in Computer Science do the simplest things in Linux, steep learning curve is a gigantic understatement. :neutral:

A small Windows based laptop is still a much simpler solution as a MIDI box, while the Raspberry PI (or Linux/Unix in general) is reserved for the extreme tweakers.



Bullshatner. Linux is as easy to use for most functions as windows. Console use is a bit of a faff, but it's the same in windows.
User avatar
Ampera
Oldbie
 
Posts: 901
Joined: 2016-11-16 @ 22:31

Re: Raspberry Pi + USB MIDI = General MIDI Module

Postby brostenen » 2016-12-20 @ 18:09

This might interrest someone. There is startup/shutdown scripts in this toturial.
Been looking at this, alongside other information, for creating my version of a cheap synth.

http://www.instructables.com/id/PiMiDi-A-Raspberry-Pi-Midi-Box-or-How-I-Learned-to/
Don't eat stuff off a 15 year old never cleaned cpu cooler.
Those cakes make you sick....

My blog: http://to9xct.blogspot.dk

001100 010010 011110 100001 101101 110011

Jah ich will trynen... Die Leute wie macht scheisse in dem Grünen.
User avatar
brostenen
l33t++
 
Posts: 5367
Joined: 2014-5-07 @ 21:13
Location: Northern Jutland, Denmark.

Re: Raspberry Pi + USB MIDI = General MIDI Module

Postby brostenen » 2016-12-20 @ 18:11

Ampera wrote:Bullshatner. Linux is as easy to use for most functions as windows. Console use is a bit of a faff, but it's the same in windows.


CLI is like a Dos-prompt on steroids.
Don't eat stuff off a 15 year old never cleaned cpu cooler.
Those cakes make you sick....

My blog: http://to9xct.blogspot.dk

001100 010010 011110 100001 101101 110011

Jah ich will trynen... Die Leute wie macht scheisse in dem Grünen.
User avatar
brostenen
l33t++
 
Posts: 5367
Joined: 2014-5-07 @ 21:13
Location: Northern Jutland, Denmark.

Re: Raspberry Pi + USB MIDI = General MIDI Module

Postby Ampera » 2016-12-20 @ 18:14

brostenen wrote:
Ampera wrote:Bullshatner. Linux is as easy to use for most functions as windows. Console use is a bit of a faff, but it's the same in windows.


CLI is like a Dos-prompt on steroids.


Not entirely sure what your talking about...
User avatar
Ampera
Oldbie
 
Posts: 901
Joined: 2016-11-16 @ 22:31

Re: Raspberry Pi + USB MIDI = General MIDI Module

Postby brostenen » 2016-12-20 @ 18:26

Ampera wrote:
brostenen wrote:
Ampera wrote:Bullshatner. Linux is as easy to use for most functions as windows. Console use is a bit of a faff, but it's the same in windows.


CLI is like a Dos-prompt on steroids.


Not entirely sure what your talking about...


CLI = Command Line Interface.
Don't eat stuff off a 15 year old never cleaned cpu cooler.
Those cakes make you sick....

My blog: http://to9xct.blogspot.dk

001100 010010 011110 100001 101101 110011

Jah ich will trynen... Die Leute wie macht scheisse in dem Grünen.
User avatar
brostenen
l33t++
 
Posts: 5367
Joined: 2014-5-07 @ 21:13
Location: Northern Jutland, Denmark.

Re: Raspberry Pi + USB MIDI = General MIDI Module

Postby Ampera » 2016-12-20 @ 22:15

Yea I know that, but how is the relevant? Which CLI? Are you talking about bash, batch, what?
User avatar
Ampera
Oldbie
 
Posts: 901
Joined: 2016-11-16 @ 22:31

Next

Return to Sound

Who is online

Users browsing this forum: sinistar87 and 2 guests