VGMPlay / in_vgm
Last update: 2023-12-31 (v0.51.1)
Technical discussion about the VGM format, and all the software you need to handle VGM files.
Moderator: Staff
Any chance that an adaptation of this (or LibVGM) could be made as a GStreamer plugin?
GStreamer currently uses a (very very old) version of libGME which is not only inaccurate but supports very few consoles and cannot playback any VGZ files. I came across this as an issue when trying to add VGM playback to popular linux media player Clementine ( Clementine pull request #6089 for more details). It would really rock if this library could be made as a gstreamer element!
GStreamer currently uses a (very very old) version of libGME which is not only inaccurate but supports very few consoles and cannot playback any VGZ files. I came across this as an issue when trying to add VGM playback to popular linux media player Clementine ( Clementine pull request #6089 for more details). It would really rock if this library could be made as a gstreamer element!
- blitzlunar Offline
- Posts: 127
- Joined: 2012-12-21, 15:30:24
- Location: UK
Can you give an example of a set that is raising this problem for you? Usually they work for me, but I don't tend to use the m3us anyway.Dekyo-NO wrote:I'm having some problems with the foo_input_vgm component.
Sometimes the M3U files that comes with VGM packages do not play at all, sometimes they play correctly.
Is someone having this problem? Or maybe it's because I have many components installed?
There won't be a GStreamer plugin for vgmplay due to some fairly extensive code rewrite that would be required to run it as a gstreamer plugin. (no global variables for example)TheYokai wrote:Any chance that an adaptation of this (or LibVGM) could be made as a GStreamer plugin?
Maybe there could be one for libvgm however.
We don't maintain the fb2k plugin, so there's really nothing we can do about it. Try opening the m3u in vgmplay (just drag/drop to the vgmplay exe) or winamp with in_vgm.Dekyo-NO wrote:The first time I open an m3u file that comes in a VGM package does not play, but the second time I open it (without having closed foobar2000) it plays normally.
- ValleyBell Offline
- Posts: 4823
- Joined: 2011-12-01, 20:20:07
- Location: Germany
Christmas Release!
You can download the new version of VGMPlay / in_vgm from GitHub. (I'll replace this with links to vgmrips.net when the FTP is working again.)
The most important updates are:
I didn't plan to release any further updates for this version of VGMPlay, but I'll definitely do a minor update when that is finished.
You can download the new version of VGMPlay / in_vgm from GitHub. (I'll replace this with links to vgmrips.net when the FTP is working again.)
The most important updates are:
- accurate QSound emulation (thanks to ctr)
- slightly improved emulation of YMF278B, YMF271, SAA1099 and C352
- added Nuked OPN2 sound core (cycle-accurate YM2612 emulation, thanks to Nuke.YKT)
- in_vgm: fixed some bugs
- in_vgm: made "Tag fallback" option work
- in_vgm: fixed display of outdated tag information
I didn't plan to release any further updates for this version of VGMPlay, but I'll definitely do a minor update when that is finished.
It should be noted that NukedOPN2 isn't the default YM2612 core for the following reasons:
On the other hand, the new QSound core is set as default in this release. If you wish to use the old core, you can also do so, however I believe the new core should work with all existing VGMs as a workaround for the old vgm_cmp behavior has been implemented.
If you have any issues with the new cores, please let us know.
Merry Christmas, and hope you enjoy this release.
- Certain VGMs from Project2612 do not play properly at the moment, this is usually due to garbage or invalid register writes at the beginning of the VGM.
- The in_vgm configuration GUI does not support per-core options, this is important for the NukedOPN2 core especially since it has options to set the chip type (YM2612 / discrete YM3438 / ASIC Megadrive 2) which affect ladder effect and low-pass filtering options. This can be enabled by editing the config file though.
- CPU usage is rather high, which especially affects backwards seeking.
On the other hand, the new QSound core is set as default in this release. If you wish to use the old core, you can also do so, however I believe the new core should work with all existing VGMs as a workaround for the old vgm_cmp behavior has been implemented.
If you have any issues with the new cores, please let us know.
Merry Christmas, and hope you enjoy this release.
- Infomaniac95 Offline
- Posts: 1
- Joined: 2018-12-31, 8:09:13
Foobar input_vgm plugin has been updated to v0.29.
https://ux.getuploader.com/foobar2000/download/213
https://ux.getuploader.com/foobar2000/download/213
few questions about YMF278B
Q1: How to disable WT output and FM output for YMF278B?
I want to hear, which sounds are FM and which WT, but even when set both "MuteMask_FM" and "MuteMask_WT" in the INI file, the exact same sound as when they are not set is produced and nothing is muted:
* Test VGM file: "Sonyc_MS\01_Title.vgm"
* VGMPlay.ini Settings:
Q2: How to convert Yamaha YMF278B Demo MIDI files to VGM format?
they are regular MIDI files and both FM and WT of YMF278B are used at the same time to give maximum 44 voices polyphony (20 from FM and 24 from WT) in the following way - first X MIDI channels are reserved for WT and the rest (16 -X) for FM, X is known for each MIDI file and it's set before playback.
Thank you!
I want to hear, which sounds are FM and which WT, but even when set both "MuteMask_FM" and "MuteMask_WT" in the INI file, the exact same sound as when they are not set is produced and nothing is muted:
* Test VGM file: "Sonyc_MS\01_Title.vgm"
* VGMPlay.ini Settings:
Code: Select all
[YMF278B]
Disabled = False
MuteMask_WT = 0x3f
MuteMask_FM = 0x3f
they are regular MIDI files and both FM and WT of YMF278B are used at the same time to give maximum 44 voices polyphony (20 from FM and 24 from WT) in the following way - first X MIDI channels are reserved for WT and the rest (16 -X) for FM, X is known for each MIDI file and it's set before playback.
Thank you!
I really don't want to make just noise in this thread, but today I updated and compiled from source libVgz and tested a bit its player.
I'm very happy with it.
I only did some libraries compiling : zlib and iconv in order to have them built for 64-bit and a small copycat of vgmtest player audio driver initialization for having player working on my Windows 7 box.
before DirectSound was failing like this
C:\Users\user\workspace\libvgm\buildVS2017\bin\Release>player.exe "C:\Users\user\Music\vgm\Armed Police Batrider(1998-02-13)(Raizing)(Eighting)\01 Raizing Logo.vgm"
Opening Audio Device ...
Using driver DirectSound.
Opening Device 0 ...
Device Init Error: F1
After switch to WinMM
C:\Users\user\workspace\libvgm\buildVS2017\bin\Release>player.exe "C:\Users\user\Music\vgm\Armed Police Batrider (1998-02-13)(Raizing)(Eighting)\01 Raizing Logo.vgm"
Opening Audio Device ...
Using driver WinMM.
Opening Device 0 ...
Loading 01 Raizing Logo.vgm ... VGM v161, Total Length: 1.52 s, Loop Length: 0.
00 s
Song Title: Raizing Logo
Song End..48 / 1.52 ...
Done.
Well done!
I'm very happy with it.
I only did some libraries compiling : zlib and iconv in order to have them built for 64-bit and a small copycat of vgmtest player audio driver initialization for having player working on my Windows 7 box.
before DirectSound was failing like this
C:\Users\user\workspace\libvgm\buildVS2017\bin\Release>player.exe "C:\Users\user\Music\vgm\Armed Police Batrider(1998-02-13)(Raizing)(Eighting)\01 Raizing Logo.vgm"
Opening Audio Device ...
Using driver DirectSound.
Opening Device 0 ...
Device Init Error: F1
After switch to WinMM
C:\Users\user\workspace\libvgm\buildVS2017\bin\Release>player.exe "C:\Users\user\Music\vgm\Armed Police Batrider (1998-02-13)(Raizing)(Eighting)\01 Raizing Logo.vgm"
Opening Audio Device ...
Using driver WinMM.
Opening Device 0 ...
Loading 01 Raizing Logo.vgm ... VGM v161, Total Length: 1.52 s, Loop Length: 0.
00 s
Song Title: Raizing Logo
Song End..48 / 1.52 ...
Done.
Well done!
- ValleyBell Offline
- Posts: 4823
- Joined: 2011-12-01, 20:20:07
- Location: Germany
Your MuteMask value is wrong. It is a bitmask (with "0x" meaning "hexadecimal") with one bit per channel.kodi wrote:Q1: How to disable WT output and FM output for YMF278B?
The OPL3/OPL4 FM part has 18 melodic channels + 5 rhythm channels, so your bitmask needs to have 23 bits set in order to mute everything. (0x7FFFFF)
The OPL4 PCM part has 24 PCM channels, so you need to set the bitmask to 0xFFFFFF in order to mute everything.
Sonyc doesn't use any of the FM channels btw.
I don't know. We don't have any mid2vgm tool for OPL4.kodi wrote:Q2: How to convert Yamaha YMF278B Demo MIDI files to VGM format?
If you say "YMF278B Demo MIDI", did it come with some MIDI player? If so, try playing it back using that MIDI player and log that.
That's great to hear.lo zaffo wrote:I really don't want to make just noise in this thread, but today I updated and compiled from source libVgz and tested a bit its player.
I'm very happy with it.
About the DirectSound thing: DirectSound requires you to give it a valid Windo handle in order to work. I didn't do that in player.cpp until a few days ago. I fixed it while trying to improve thread-safety.
Thank you, your masks work and yes, I can confirm Sonyc is pure WT, no FM.ValleyBell wrote:Your MuteMask value is wrong. It is a bitmask (with "0x" meaning "hexadecimal") with one bit per channel.kodi wrote:Q1: How to disable WT output and FM output for YMF278B?
The OPL3/OPL4 FM part has 18 melodic channels + 5 rhythm channels, so your bitmask needs to have 23 bits set in order to mute everything. (0x7FFFFF)
The OPL4 PCM part has 24 PCM channels, so you need to set the bitmask to 0xFFFFFF in order to mute everything.
Sonyc doesn't use any of the FM channels btw.
Actually, Yamaha made reference driver for PC for YMF278B and as result of that it was put on a lot of high-end sound cards of that time like Audiotrix Pro card. So, I meant demo MIDI files that come with that particular sound card. I am new to VGM and YMF278B emulation, but in the last days I educated myself and I believe I understand what is the missing link:ValleyBell wrote:I don't know. We don't have any mid2vgm tool for OPL4.kodi wrote:Q2: How to convert Yamaha YMF278B Demo MIDI files to VGM format?
If you say "YMF278B Demo MIDI", did it come with some MIDI player? If so, try playing it back using that MIDI player and log that.
MIDI file --A--> MIDI player --B--> OS/Driver/MCU, etc --C--> YMF278B
basically it seems VGM is the data-dump done on point C, i.e. raw commands send to the YMF278B. What is missing to make MIDI-to-VGM for YMF278B possible is what particularly in PC is done by Yamaha driver - it translates the MIDI commands to proper YMF278B raw commands.
I need to see if I can find way to reverse-engineer that part of the Yamaha driver. However, anyone interested in that can google for "OPL4.DRV".
In fact doing that myself few seconds ago I found another card I've never heard before "AudioBlitz" - the package contains demo MIDIs, not clear if they are OPL4, but more interesting their driver has "midimap.cfg" - another think I've never noticed with Audiotrix or maybe it's not there - need to check. I guess that CFG allows for even more flexible mapping which MIDI channels are FM and which WT, because with Audiotrix is just first X MIDI channels are assigned to WT and the rest (16-X) to FM.
I think at this point it's not even clear all PC sound cards with YMF278B - I am sure many renamed "OPL4.DRV" to something else, which makes it hard for finding them on a search, but there are many, even noname ones.
So, I believe instead capturing in hardware to learn more about YMF278B, disassembling Yamaha own driver for PC could be valuable source of information.