Emulating MT-32 on an RPi2

General information and assistance with Munt.

Re: Emulating MT-32 on an RPi2

Postby FesterBlatz » 2016-12-15 @ 20:00

gdjacobs wrote:Eventually. I'm just testing for the moment. Once I'm happy with a circuit design I'll look into learning KiCAD.


I've done several designs in KiCAD so even if you had a paper sketch I'd be happy to draw up a formal schematic and do a PCB layout.

Not sure. My image doesn't have MT32 ROM files included. If you can point out the thread where he has his link, I can check it out.


Here's the post to the image I used. I had to add my own ROM images and make the two small changes I noted earlier but otherwise it's been working flawlessly on my Pi 3.

If you have any ideas, I'd be really interested! Serge at Serdashop might be able to help with some of the production details.


Well, since I have two DIY 3D printers at home I'm more inclined to design/print my own and share the STLs on Thingiverse for others to print too, but thanks for the heads up!
Last edited by FesterBlatz on 2016-12-15 @ 20:35, edited 1 time in total.
User avatar
FesterBlatz
Member
 
Posts: 166
Joined: 2016-12-05 @ 13:49

Re: Emulating MT-32 on an RPi2

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

That sounds great, a 3D printed MT-32 :)

Would it be possible to also do a very simple case? Like function over form, that is straight forward but has everything needed, like RCA and power at the back, LCD display and some buttons at the front?
User avatar
PhilsComputerLab
Hardware Mod
 
Posts: 6179
Joined: 2014-9-28 @ 03:33
Location: Western Australia

Re: Emulating MT-32 on an RPi2

Postby gdjacobs » 2016-12-15 @ 20:18

FesterBlatz wrote:I've done several designs in KiCAD so even if you had a paper sketch I'd be happy to draw up a formal schematic and do a PCB layout.


I can definitely do the circuit design digitally, it's just the PCB layout I'm unfamiliar with. :)

FesterBlatz wrote:Here's the post to the image I used. I had to add my own ROM images and make the two small changes I noted earlier but otherwise it's been working flawlessly on my Pi 3.


Looks like it got eaten by the kraken!
User avatar
gdjacobs
l33t++
 
Posts: 5480
Joined: 2015-11-03 @ 05:51
Location: The Great White North

Re: Emulating MT-32 on an RPi2

Postby FesterBlatz » 2016-12-15 @ 20:35

gdjacobs wrote:Looks like it got eaten by the kraken!


Oops! You're quite right! My apologies...

https://www.vogons.org/viewtopic.php?f= ... 60#p513439
User avatar
FesterBlatz
Member
 
Posts: 166
Joined: 2016-12-05 @ 13:49

Re: Emulating MT-32 on an RPi2

Postby FesterBlatz » 2016-12-15 @ 20:43

By the way, here's an MP3 recording of the entire QFG2 MT-32 soundtrack as played from my RPI3's analog audio port. Since it's over an hour long, I exported it using a pretty low bit-rate to keep to a reasonable size, but it still sounds tolerable.

https://docs.google.com/uc?id=0B4X2cVKW2B3sVGpMS2hQcGtCN3M&export=download

Enjoy!
User avatar
FesterBlatz
Member
 
Posts: 166
Joined: 2016-12-05 @ 13:49

Re: Emulating MT-32 on an RPi2

Postby gdjacobs » 2016-12-16 @ 00:09

FesterBlatz wrote:
gdjacobs wrote:Looks like it got eaten by the kraken!


Oops! You're quite right! My apologies...

https://www.vogons.org/viewtopic.php?f= ... 60#p513439


Ah, now I remember that conversation. Cool.

Phil, if you want to start messing with Munt on Linux, I recommend you use that as a starting point.
User avatar
gdjacobs
l33t++
 
Posts: 5480
Joined: 2015-11-03 @ 05:51
Location: The Great White North

Re: Emulating MT-32 on an RPi2

Postby PhilsComputerLab » 2016-12-16 @ 00:13

gdjacobs wrote:Ah, now I remember that conversation. Cool.

Phil, if you want to start messing with Munt on Linux, I recommend you use that as a starting point.


Cool, will do.

Though I'll focus on General MIDI SoundFont stuff first:)
User avatar
PhilsComputerLab
Hardware Mod
 
Posts: 6179
Joined: 2014-9-28 @ 03:33
Location: Western Australia

Re: Emulating MT-32 on an RPi2

Postby gdjacobs » 2016-12-16 @ 02:39

Yeah, I included that as well. I believe both Timidity and Fluidsynth are included, although Fluidsynth is a little bit more clunky to get running on a headless system.
User avatar
gdjacobs
l33t++
 
Posts: 5480
Joined: 2015-11-03 @ 05:51
Location: The Great White North

Re: Emulating MT-32 on an RPi2

Postby FesterBlatz » 2016-12-16 @ 15:45

I got a cheap C-Media based USB sound card working with my Rpi3 and as expected it sounds a lot better than the built in audio.

If anyone's interested, here's a recording I took with my laptop's line-in of the Rpi3 MUNT box playing the Space Quest 3 soundtrack through the USB sound card.

I should note that both the Rpi and daisy-chained USB sound card were only powered by my laptop's USB port, so the Rpi CPU clock was hovering around 900MHz and sometimes dipping even lower. Even at 900MHz mt32d only uses around 60-70% of the CPU, so it seems to handle MUNT quite a bit better than an Rpi2.

https://drive.google.com/file/d/0B4X2cVKW2B3saWRPeUZFckJqUlU/view

Here's what the little setup looks like at the moment.

Enjoy!
Attachments
IMG_1342.JPG
User avatar
FesterBlatz
Member
 
Posts: 166
Joined: 2016-12-05 @ 13:49

Re: Emulating MT-32 on an RPi2

Postby gdjacobs » 2016-12-16 @ 19:20

I've done the same, although I run the USB audio through a different supply to cut back the ripple from the Pi's onboard ports.
User avatar
gdjacobs
l33t++
 
Posts: 5480
Joined: 2015-11-03 @ 05:51
Location: The Great White North

Re: Emulating MT-32 on an RPi2

Postby FesterBlatz » 2016-12-16 @ 19:27

Messing around with General MIDI too, sounds pretty good with the FluidR3 Soundfont!

Here's the X-Wing Credits, the strings don't seem to sustain quite long enough for a few bars around the 0:28 mark but I think that's a function of this particular .mid not meshing well with the soundfont, but otherwise I think it sounds great.

https://drive.google.com/file/d/0B4X2cVKW2B3sb2ZZN1N6MmhuM1k/view?usp=sharing
User avatar
FesterBlatz
Member
 
Posts: 166
Joined: 2016-12-05 @ 13:49

Re: Emulating MT-32 on an RPi2

Postby gdjacobs » 2016-12-16 @ 22:47

I like Sierra titles, so I'm always looking for an improved Soundcanvas font.
User avatar
gdjacobs
l33t++
 
Posts: 5480
Joined: 2015-11-03 @ 05:51
Location: The Great White North

Re: Emulating MT-32 on an RPi2

Postby FesterBlatz » 2016-12-20 @ 13:58

My $4.99 USB to MIDI cable arrived yesterday and I got it working with my Rpi3 right away. I didn't even bother using it in stock form and added the "missing" optocoupler/220 ohm resistor before even testing it. I already had the needed parts on a scrap board, so it didn't cost me anything to do.

I did some testing and Timidity works flawlessly, but MUNT would spit out occasional errors usually when Sierra titles were programming custom sounds. It was late and I'm suffering from a head-cold so I didn't think to write down what the exact errors were, but they were something along the lines of a particular command not being for this vendor of MT-32 or something like that. For the most part the music and sound effects sounded fine anyway, but I could tell some of the sound were incorrect or not working at all. Quitting the game and restarting would sometimes help, sometimes make it worse.

The sound card I'm using for the MPU-401 interface is an Ensoniq Soundscape OPUS variant called the NEC Harmony. It's basically an OPUS with a modem on-board. Ensoniq's MPU-401 implementation emulates intelligent mode in that it responds to SYSEX commands with an ACK to fool games requiring it into working, but I'm not certain it passes everything on to the external MPU-401 port. I tried with and without SoftMPU running, and my results were definitely better with the SoftMPU TSR present.

Anyway, that's my progress so far! Pretty neat to have a Raspberry Pi connected to my old PC and (mostly) emulating an MT-32...

IMG_1346.JPG
Last edited by FesterBlatz on 2016-12-20 @ 14:47, edited 1 time in total.
User avatar
FesterBlatz
Member
 
Posts: 166
Joined: 2016-12-05 @ 13:49

Re: Emulating MT-32 on an RPi2

Postby gdjacobs » 2016-12-20 @ 14:23

Well done on the soldering. Nice and clean!
User avatar
gdjacobs
l33t++
 
Posts: 5480
Joined: 2015-11-03 @ 05:51
Location: The Great White North

Re: Emulating MT-32 on an RPi2

Postby FesterBlatz » 2016-12-20 @ 16:13

Thanks! Funny you should say that, I was sort of ashamed to post that picture since I was too lazy to clean up the flux mess.

I do electronics work all the time, this is a far better depiction of how my work usually looks...

IMAG0847_1.jpg


This is a little CPLD circuit that accurately emulates the famous Commodore 64 PLA chip that fails so often with no "NOS" replacements available. It wasn't my design, but I had the PCBs manufactured (used KiCad) and hand-assembled a small batch of them. W3DRK is my amateur radio call sign... ;)
User avatar
FesterBlatz
Member
 
Posts: 166
Joined: 2016-12-05 @ 13:49

Re: Emulating MT-32 on an RPi2

Postby Darklord42 » 2017-1-21 @ 04:40

I always admire someone who can do good soldering work. I'm total rubbish with a soldering iron.
Darklord42
Newbie
 
Posts: 49
Joined: 2007-9-18 @ 00:26

Re: Emulating MT-32 on an RPi2

Postby McCarthy » 2017-3-27 @ 07:13

Hi guys,
I have a little problem with my prototype. I soldered everything together, but the notes seem to be way off. I used 270 ohm resistors, if that's important. The hex inverter is the sn74ls06n and the coupler is the SFH618A-4.
I'll upload a sketch later.
Thanks in advance.
Daniel
McCarthy
Newbie
 
Posts: 6
Joined: 2017-3-27 @ 07:07

Re: Emulating MT-32 on an RPi2

Postby gdjacobs » 2017-3-27 @ 13:07

Okay, could you let us know what the prototype is for please?
User avatar
gdjacobs
l33t++
 
Posts: 5480
Joined: 2015-11-03 @ 05:51
Location: The Great White North

Re: Emulating MT-32 on an RPi2

Postby McCarthy » 2017-3-27 @ 13:32

It's my first version. I don't want to earn money with it. It's just for me. I always call my first tries prototype. I will make a photo of it, to show you my awesome soldering skills. :D
McCarthy
Newbie
 
Posts: 6
Joined: 2017-3-27 @ 07:07

Re: Emulating MT-32 on an RPi2

Postby gdjacobs » 2017-3-27 @ 13:51

Sorry, not what I meant. From your BOM, it sounds like you're making a converter from MIDI current loop to TTL voltage, but it's unclear what it will be connected to. RPi UART? AVR microcontroller?
User avatar
gdjacobs
l33t++
 
Posts: 5480
Joined: 2015-11-03 @ 05:51
Location: The Great White North

PreviousNext

Return to MT-32 General

Who is online

Users browsing this forum: wunderklaus and 1 guest