Emulating MT-32 on an RPi2

General information and assistance with Munt.

Re: Emulating MT-32 on an RPi2

Postby kiwa » 2017-8-25 @ 21:58

Hi,

So i compiled this on my orange pi one, seems to work, but i get high cpu usage and constant Output buffer underrun, idk if my device is just underpowered or i did something wrong compiling munt, can anyone give me some pointers?

Screen Shot 2017-08-25 at 6.56.37 PM.png


thanks
User avatar
kiwa
Newbie
 
Posts: 48
Joined: 2016-1-22 @ 19:44
Location: Santiago, Chile

Re: Emulating MT-32 on an RPi2

Postby gdjacobs » 2017-8-26 @ 06:28

kiwa wrote:So i compiled this on my orange pi one, seems to work, but i get high cpu usage and constant Output buffer underrun, idk if my device is just underpowered or i did something wrong compiling munt, can anyone give me some pointers?


It could be either one. This is typical behavior for a build of Munt which is either unoptimized or running on an underpowered platform. Please show what you get from uname -a, identify what processor the OPi in question runs, and what compiler version and compiler flags were used to build Munt.
User avatar
gdjacobs
l33t++
 
Posts: 5491
Joined: 2015-11-03 @ 05:51
Location: The Great White North

Re: Emulating MT-32 on an RPi2

Postby kiwa » 2017-8-26 @ 21:20

Thanks,

From uname i get:
Linux orangepipc 3.4.113-sun8i #16 SMP PREEMPT Tue Jun 13 14:15:57 CEST 2017 armv7l GNU/Linux

The cpu:
Architecture: armv7l
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 1
Core(s) per socket: 4
Socket(s): 1
CPU max MHz: 1536.0000
CPU min MHz: 480.0000

gcc version and my flags:
gcc version 4.9.2 (Debian 4.9.2-10)

export CCFLAGS="-Ofast -mcpu=cortex-a53 -mfpu=neon-vfpv4 -funsafe-math-optimizations”
export CXXFLAGS="-Ofast -mcpu=cortex-a53 -mfpu=neon-vfpv4 -funsafe-math-optimizations”
User avatar
kiwa
Newbie
 
Posts: 48
Joined: 2016-1-22 @ 19:44
Location: Santiago, Chile

Re: Emulating MT-32 on an RPi2

Postby gdjacobs » 2017-8-27 @ 01:47

That all looks in order. What does the OrangePi use for a power supply? Could it be downclocking because of low voltage? Could the cores be getting hot and the SoC downclocking to protect itself?
User avatar
gdjacobs
l33t++
 
Posts: 5491
Joined: 2015-11-03 @ 05:51
Location: The Great White North

Re: Emulating MT-32 on an RPi2

Postby mrau » 2017-8-27 @ 23:26

change the governor? in case you see low cpu clocks while under load of course; whats the performance when playing to a file or playing a simple file without emu? how is sound set up in general?
mrau
Oldbie
 
Posts: 995
Joined: 2015-11-28 @ 12:43

Re: Emulating MT-32 on an RPi2

Postby gdjacobs » 2017-8-28 @ 06:42

Excellent thought. What is your audio driver? How extensively have you tested it?
User avatar
gdjacobs
l33t++
 
Posts: 5491
Joined: 2015-11-03 @ 05:51
Location: The Great White North

Re: Emulating MT-32 on an RPi2

Postby mcobit » 2018-1-24 @ 16:45

gdjacobs wrote:I've got my LCD output going using a hacked version of the ALSA console application. It's not anything special, but if anyone wants a copy just ask.


Could you upload your changed sources or a patchfile somewhere please?
Maybe create a fork on github.

Thanks.
mcobit
Member
 
Posts: 123
Joined: 2017-11-15 @ 18:45

Re: Emulating MT-32 on an RPi2

Postby bjwil1991 » 2018-2-16 @ 17:21

Quick question to everyone: is there a way to program, for example, a 16x2 LCD kit for the Raspberry Pi to make it look like the Roland MT-32, such as, showing the instruments, channels, and titles/Easter eggs (SQ III INSERT BUCKAZOID) when starting a specific game? That'll be awesome, wouldn't it?
C64, WheelWriter 10 Series II QuietWriter 8, Pack-Mate 28 Plus, K6-2/300, Pavilion N3350, iMac G3 & G4, Socket 370, 2x Inspiron 600m, Athlon 64, Dimension 4550 & E510, ThinkPad R40, Presario C700, ASUS X54C, Raspberry Pi B+, 2B-3B+, Custom FX-6300
User avatar
bjwil1991
Oldbie
 
Posts: 1568
Joined: 2013-8-14 @ 03:10
Location: SE Michigan, USA

Re: Emulating MT-32 on an RPi2

Postby gdjacobs » 2018-2-16 @ 19:30

I modified mt32d to push SYSEX messages to the LCD. Instrument / channel information might be viable, but I'd prefer to ask Serge about it first as it would appear to require more in depth plumbing.
User avatar
gdjacobs
l33t++
 
Posts: 5491
Joined: 2015-11-03 @ 05:51
Location: The Great White North

Re: Emulating MT-32 on an RPi2

Postby mcobit » 2018-2-17 @ 16:58

bjwil1991 wrote:Quick question to everyone: is there a way to program, for example, a 16x2 LCD kit for the Raspberry Pi to make it look like the Roland MT-32, such as, showing the instruments, channels, and titles/Easter eggs (SQ III INSERT BUCKAZOID) when starting a specific game? That'll be awesome, wouldn't it?


I do something similar with my Raspberry Synthbox and an 20x2 char hd44780 display.
https://youtu.be/_VYdw-AfNGc

I can come up with a way to display the channels on the screen like the original mt32, but right now the channels and even notes are visualized with rgb leds in my setup.

Thread here: viewtopic.php?f=9&t=58174

Edit: 16x2 will not work as the mt32 had a 20x1 lcd.
mcobit
Member
 
Posts: 123
Joined: 2017-11-15 @ 18:45

Re: Emulating MT-32 on an RPi2

Postby gdjacobs » 2018-2-17 @ 20:22

It does in my case, only the last few letters can be cut off. 20x2 is desired as you point out, but there's really no change in terms of the hardware interface as it's all serially encoded.

Do you have a separate decoder for messages and the channel indicator LEDs or have you plumbed into the synthesizers?
User avatar
gdjacobs
l33t++
 
Posts: 5491
Joined: 2015-11-03 @ 05:51
Location: The Great White North

Re: Emulating MT-32 on an RPi2

Postby mcobit » 2018-2-18 @ 03:40

You can see the python code for the leds in the other thread.

The sysex messages for munt come from the mt32d. I modified it to write them to a file that I can then read in python.
mcobit
Member
 
Posts: 123
Joined: 2017-11-15 @ 18:45

Re: Emulating MT-32 on an RPi2

Postby MKT_Gundam » 2018-3-22 @ 00:49

How bad is the analog audio of Pi2/3?
User avatar
MKT_Gundam
Newbie
 
Posts: 72
Joined: 2017-11-01 @ 00:52

Re: Emulating MT-32 on an RPi2

Postby bjwil1991 » 2018-4-04 @ 03:29

I attempted to run mt32emu-qt to no avail as it states Open failed :( for some odd reason. And this is with the custom image you made a while back. It's a Raspberry Pi 3 Model B, and I believe it might be the coding gone wrong, or the Munt revision is too old.
C64, WheelWriter 10 Series II QuietWriter 8, Pack-Mate 28 Plus, K6-2/300, Pavilion N3350, iMac G3 & G4, Socket 370, 2x Inspiron 600m, Athlon 64, Dimension 4550 & E510, ThinkPad R40, Presario C700, ASUS X54C, Raspberry Pi B+, 2B-3B+, Custom FX-6300
User avatar
bjwil1991
Oldbie
 
Posts: 1568
Joined: 2013-8-14 @ 03:10
Location: SE Michigan, USA

Re: Emulating MT-32 on an RPi2

Postby gdjacobs » 2018-4-04 @ 04:41

Sounds like some library has broken ABI compatibility. Maybe it's time to write a DH build patch...
User avatar
gdjacobs
l33t++
 
Posts: 5491
Joined: 2015-11-03 @ 05:51
Location: The Great White North

Re: Emulating MT-32 on an RPi2

Postby mcobit » 2018-4-04 @ 06:11

MKT_Gundam wrote:How bad is the analog audio of Pi2/3?


I'd say it's fine for playing games. There is noticeable hiss and a bit of a small dynamic range but all in all it is ok.
You shouldn't record any music for production with it though.
mcobit
Member
 
Posts: 123
Joined: 2017-11-15 @ 18:45

Re: Emulating MT-32 on an RPi2

Postby gdjacobs » 2018-4-04 @ 16:02

It's a PWM output (like class D amplification), so the THD stats are pretty awful.
User avatar
gdjacobs
l33t++
 
Posts: 5491
Joined: 2015-11-03 @ 05:51
Location: The Great White North

Re: Emulating MT-32 on an RPi2

Postby Samiscool51 » 2018-5-18 @ 22:45

gdjacobs wrote: -snip-

hey gdjacobs, you may want to update this in the post
for those who want to try this themselves access the rasbian archive images and get the last version of Jessie, if the image you downloaded from rasbberypi.org says "stretch" it won't work as some of the required library's are not in the stretch repository for some reason (probably outdated and are no-longer needed on newer versions)
http://downloads.raspberrypi.org/raspbi ... 017-07-05/
use this link, it's the last version of Jessie and should work with the current line up of rasberry pi's:
Code: Select all
Raspberry Pi Zero W   
Raspberry Pi Zero WH
Raspberry Pi Zero   
Raspberry Pi B   
Raspberry Pi A+   
Raspberry Pi 3 B+
Raspberry Pi 3      
Raspberry Pi 2

(as of the 19/05/2018, newer revisions probably wont work with it, just a heads up)
after this the guide should now work

OK scratch that, jessie is also having problems building, i thought using an older version would give the correct dependices, i was wrong
the requirements for building munt have changed and this means that this guide no-longer works, hey gdjacobs do you think to try and start updating the guide? i really want to get this working on my PI zero
Samiscool51
Newbie
 
Posts: 5
Joined: 2018-5-18 @ 22:31

Re: Emulating MT-32 on an RPi2

Postby gdjacobs » 2018-5-19 @ 04:23

Sounds like a weekend project! I'll get on it.
User avatar
gdjacobs
l33t++
 
Posts: 5491
Joined: 2015-11-03 @ 05:51
Location: The Great White North

Re: Emulating MT-32 on an RPi2

Postby Samiscool51 » 2018-5-19 @ 23:43

gdjacobs wrote:Sounds like a weekend project! I'll get on it.

Awesome, really want to do this, also since munt hasn't been updated for a while i will try and provide a way so people can use it in the future without worry about missing the library's or having to go though the guide and having it not work
although i have no idea how to do it....
but hey, it will be a learning experience!
Samiscool51
Newbie
 
Posts: 5
Joined: 2018-5-18 @ 22:31

PreviousNext

Return to MT-32 General

Who is online

Users browsing this forum: No registered users and 2 guests