Previous Thread
Next Thread
Print Thread
Adding MIDI input to VGM player #115733 08/23/19 08:11 AM
Joined: Aug 2019
Posts: 3
C
cyberic Offline OP
Member
OP Offline
Member
C
Joined: Aug 2019
Posts: 3
Hi

I'd like to add MIDI input support to the VGM player

I have successfully added a MIDI in port.

I can enable it in options.

But I do not know how to read a byte from the MIDI port.

Do I have to add a serial slave device, or is there a simpler way?

For now, I have a function declared as WRITE_LINE_MEMBER, which seems to be called each time a bit is received...

But I only get access to a 'state' variable, which is either 0 or 1...

Could you please give me some hints or point me to some doc or code?

Thank you

Re: Adding MIDI input to VGM player [Re: cyberic] #115734 08/23/19 10:44 AM
Joined: May 2009
Posts: 1,804
J
Just Desserts Offline
Very Senior Member
Offline
Very Senior Member
J
Joined: May 2009
Posts: 1,804
How do you plan to play back the MIDI files?

Re: Adding MIDI input to VGM player [Re: cyberic] #115735 08/23/19 12:01 PM
Joined: Mar 2001
Posts: 16,300
R
R. Belmont Online Content
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,300
Yeah, I'd like to hear how they plan to go from MIDI Note On messages to the necessary register writes to chips. There's a *lot* of missing steps there.

Re: Adding MIDI input to VGM player [Re: R. Belmont] #115736 08/23/19 12:08 PM
Joined: Aug 2019
Posts: 3
C
cyberic Offline OP
Member
OP Offline
Member
C
Joined: Aug 2019
Posts: 3
> How do you plan to play back the MIDI files?

My plan was to replay vgm files, not MIDI files

I *know* it is already possible without MIDI, but I'd like to experiment some things for now...

So the plan is simply to send <command> <register> <value> encapsulated into MIDI messages, then directly write <value> in <register> of the chip selected with <command>

I know it makes little sense as is, but I have other projects around this

What I miss for now is a way to get the MIDI input bytes from inside MAME

Re: Adding MIDI input to VGM player [Re: cyberic] #115737 08/23/19 12:17 PM
Joined: Dec 2015
Posts: 105
A
AJR Offline
Senior Member
Offline
Senior Member
A
Joined: Dec 2015
Posts: 105
I think adding MIDI support to vgmplay could be fairly simple and easy once MAME starts actually emulating the General MIDI side of the YMF721-S (which potgoldu.cpp and seibucats.cpp will both need). Right now, MAME's MIDI emulation is pretty much bring-your-own-MIDI-player, seeing as the Roland MT32 and a few others of its kind have been dumped but not emulated.

Re: Adding MIDI input to VGM player [Re: cyberic] #115738 08/23/19 01:17 PM
Joined: Mar 2001
Posts: 16,300
R
R. Belmont Online Content
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,300
cyberic: OK, that's a bit more sensible than sending real MIDI data, although it's still going to be parsed as MIDI data which will be pretty problematic.

You will need some sort of bitserial implementation to recieve the bytes, you can subclass diserial to have most of that work done for you.

Re: Adding MIDI input to VGM player [Re: R. Belmont] #115739 08/23/19 01:26 PM
Joined: Aug 2019
Posts: 3
C
cyberic Offline OP
Member
OP Offline
Member
C
Joined: Aug 2019
Posts: 3
Originally Posted by R. Belmont
cyberic: OK, that's a bit more sensible than sending real MIDI data, although it's still going to be parsed as MIDI data which will be pretty problematic.


yeah... but if we do not care about the overhead, we can still embed bytes into a SYSEX ;-)

Originally Posted by R. Belmont
You will need some sort of bitserial implementation to recieve the bytes, you can subclass diserial to have most of that work done for you.


OK, I'll try to do that.

I'm surprised no one did use MIDI as an alternative 'input' device yet...

For instance, you could use a MIDI controller to move a player, and so on...

Re: Adding MIDI input to VGM player [Re: AJR] #115740 08/23/19 08:35 PM
Joined: Jun 2001
Posts: 414
O
Olivier Galibert Offline
Senior Member
Offline
Senior Member
O
Joined: Jun 2001
Posts: 414
Originally Posted by AJR
General MIDI side of the YMF721-S


Given there are two undumped internal roms in that chip (1M of wavetable, 256k of program) it's not going to happen any time soon :-)


Who's Online Now
1 registered members (rfka01), 159 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics8,683
Posts114,012
Members4,863
Most Online510
Aug 26th, 2019
Powered by UBB.threads™ PHP Forum Software 7.7.3