Playing X68000 games with MIDI music
-
@mitu said in Playing X68000 games with MIDI music:
@Folly said in Playing X68000 games with MIDI music:
From what I know pulseaudio is the default nowadays.
No, PipeWire is the new kid on the block (!), though it offers a PulseAudio compatible API so that programs think they talk to a PulseAudio server.
Ah, good to know, thanks !
-
I discovered something but not tested it yet.
When selecting option 2 MT-32 it uses "LA Format" and when selecting option 3 it uses "GS Format".I recon that when using option 3 (SC55) you have to use this in the core options :
px68k_midi_type = "GS"
Something to test don't you think ?
Some info over here about GS :
https://www.cybermidi.com/helpdesk/knowledgebase.php?article=47Edit :
(tests done with selecting option 3 in the game and using timidity with SC55)
Tested the core option with the midi tree version, as that version has thepx68k_midi_type
core option, but seems to have no impact.
Also tested the original lr-pk68k version which doesn't have thepx68k_midi_type
core option and there seems to be no difference in the sound quality versus the "midi tree version" -
@ecto Hello pls check the attached cfg file in the url https://www.vogons.org/viewtopic.php?t=21644
An extract is the following. So I assume you don't set up the bank line, Am I right?
dir your sf2 folder
soundfont "DJ Tony's Roland SC-55 1.1.sf2" amp=100 pan= modpitch=0
soundfont "DJ Tony's Roland SC-55 1.1.sf2" amp=100 pan= fc=8000 q=25
bank 0
0 %font "DJ Tony's Roland SC-55 1.1.sf2" 0 0
1 %font "DJ Tony's Roland SC-55 1.1.sf2" 0 1
2 %font "DJ Tony's Roland SC-55 1.1.sf2" 0 2
3 %font "DJ Tony's Roland SC-55 1.1.sf2" 0 3
4 %font "DJ Tony's Roland SC-55 1.1.sf2" 0 4
5 %font "DJ Tony's Roland SC-55 1.1.sf2" 0 5
6 %font "DJ Tony's Roland SC-55 1.1.sf2" 0 6
7 %font "DJ Tony's Roland SC-55 1.1.sf2" 0 7
8 %font "DJ Tony's Roland SC-55 1.1.sf2" 0 8
9 %font "DJ Tony's Roland SC-55 1.1.sf2" 0 9
10 %font "DJ Tony's Roland SC-55 1.1.sf2" 0 10
11 %font "DJ Tony's Roland SC-55 1.1.sf2" 0 11
12 %font "DJ Tony's Roland SC-55 1.1.sf2" 0 12 -
As far as I can see now it's quite obvious that the code of both the "original master" and the "midi tree" have issues with midi, revealing in tempo changes.
I connected my real Roland E-38 synthesizer keyboard to my PI5 and tested MAME and the original lr-px68k.
On my PI4 it became clear that both "original master" and the "midi tree" have the same issue so I figured I could just use the original master.
My keyboard detected "GS mode" with both emulators so that is OK.
This makes it also clear that the "original master" can provide the GS mode.With MAME I have almost perfect sound from the keyboard, it sounds really great :-) !
With lr-px68k I had tempo changes again :-( .This makes it clear that the issues are mostly coming from the lr-px68k core.
Using timidity was also better with MAME but I still have more volume on the right side.
Seems to be a timidity problem.For mame I used this runcommand adding midi and outputting it to my keyboard :
/opt/retropie/emulators/mame/mame -rompath /home/pi/RetroPie/BIOS/mame\;/home/pi/RetroPie/roms/x68000 -v -c -ui_active -statename x68000/"akumajou dracula (1993)(konami)(disk 1 of 2)" x68000 -flop1 "/home/pi/RetroPie/roms/x68000/akumajou dracula (1993)(konami)(disk 1 of 2).dim" -flop2 "/home/pi/RetroPie/roms/x68000/akumajou dracula (1993)(konami)(disk 2 of 2).dim" -exp1 x68k_midi -midiout 'USB Device 0x1acc:0x0a MIDI 1'
or using basename :
/opt/retropie/emulators/mame/mame -rompath /home/pi/RetroPie/BIOS/mame\;/home/pi/RetroPie/roms/x68000 -v -c -ui_active -statename x68000/"akumajo" x68000 "akumajo" -exp1 x68k_midi -midiout 'TiMidity port 0'
In the last runcommand you can also see that the option -midiout can also hold the timidity port and can be used in both runcommands.
-
I tested the first timidity.cfg for DJ Tony's SC-55 sound-font from here.
Renamed the config to DJ_Tony_Roland_SC-55_1.1.cfg and placed that config inside the timidity.cfg.
Also used that soundfont.
Added the proper dir inside DJ_Tony_Roland_SC-55_1.1.cfg :dir /usr/share/sounds/sf2
And removed the line holding
--rtsyn-latency=0.04
as timidity didn't understand it.Now I have a proper sc-55 config and left and right volume is in balance and has proper stereo.
Edit 1:
Converting the config for use with the zz_denis soundfont works perfectly.Edit 2:
I can now also confirm that this setup works on my x86_64 VM with running on lr-px68k.
No timing issues whatsoever so lr-px68k seems to do the job OK on a regular PC's. -
-
Here is the manual where you might find some useful information.
-
@kelvfimer said in Playing X68000 games with MIDI music:
My point is how to set up that timidity.cfg and sd.cfg what's the way to tune it etc.
As I've written before: The only (uncommented) line in my
timidity.cfg
is:soundfont "/usr/share/sounds/sf2/SC55.sf2"
I have no
SC55.cfg
of any kind. Maybe my midi output is not configured correctly, but I can hear midi music in several x68000 and pc98 games. They seem so sound correctly, but indeed I also have a slightly irregular midi output (it sometimes slows down for some notes).The only real problem I have are buffer underrun errors in the logs. I'm not sure if that corresponds to the timing issues, but it might.
I'm not sure how to get rid of them, but I would think that the midi daemons have to run in or close to real time. -
@Folly @kelvfimer Just a small thing I noticed: the tempo changes with the lr-p68k core seem to have gotten a little better after I changed the cpu frequency in the core settings to 25MHz. Maybe you can try that, too.
-
@ecto cool I need to check :) thx for the advice . Only issue for example Castlevania at 25 MHz has glitches and you must run it at 10 MHZ
-
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.