vgmrips

The forum about vgm files
It is currently 2020-09-20, 13:58:15

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: 2018-01-17, 21:45:39 

Contributors Contributors
Offline

Joined: 2015-06-05, 23:08:44
Posts: 10
I'm ripping some opl2 music with dosbox, using the dro exporter and also de vgm exporter, and the rips are huge, the vgms exported from dosbox are even bigger.

Can we do anything to optimize the rips?

Other opl2 rips are compressed in vgz, but is that the only way?

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: 2018-01-17, 21:57:33 

Staff Staff
Programmers Programmers
Musicians Musicians
Contributors Contributors
Reverse engineers Reverse engineers
Offline
User avatar

Joined: 2011-12-01, 20:20:07
Posts: 3332
Location: Germany
After you finished trimming, you can run vgm_cmp on the resulting files. Depending on how the sound engine works, that might make them smaller.

Depending on the song and sound engine though, even OPL2 songs can get pretty large. About 100 KB and more would be quite normal for a song that uses lots of software vibrato and other effects.


Top
 Profile  
 
 Post subject:
PostPosted: 2018-01-17, 22:51:17 

Contributors Contributors
Staff Staff
Reverse engineers Reverse engineers
Offline
User avatar

Joined: 2013-07-17, 23:32:39
Posts: 438
I saw that you wanted to play VGM files on an arduino, and that is likely why you made this thread (It has only 32K of flash, that needs to hold the program code and data)

Unfortunately, most VGMs will not fit within that 32k. Maybe short or simple songs that use no channel allocation and no software envelopes might fit. But if you want to play most VGMs, you should consider streaming the files via USB instead. Currently there is no player that supports this, so you might need to make one yourself. I have considered doing this actually for the YM2151, as a bonus one could have the PC handle the PCM part and then just mix that with the FM chip output.

You can also use an SD card if you have a shield or other board that has an SD card slot. There is a built in library in the arduino IDE for reading and writing SD cards. Since files are read as streams, file size shouldn't be an issue. It's important that the FM shield does not conflict with the pins used for SPI in that case.

Another way (that does not require USB or an SD card) is If you used the original sequenced data and reimplemented the game's sound driver (or player routine), then it is more likely that you might be able to fit everything in 32k. Of course depending on what the original format the songs were in.

Btw, >32kb doesn't exactly make a VGM huge. I'd consider a few MBs to be "huge" in that case. And another way to play VGMs on real hardware that works even with little memory is to simply use an old PC. There are DOS-based players and the VGMPlay builds that you can download work with win9x thanks to VC6.


Top
 Profile  
 
 Post subject:
PostPosted: 2018-01-17, 23:17:50 

Contributors Contributors
Offline

Joined: 2015-06-05, 23:08:44
Posts: 10
ctr wrote:
I saw that you wanted to play VGM files on an arduino, and that is likely why you made this thread (It has only 32K of flash, that needs to hold the program code and data)


Yes I'm going to play vgms on an arduino with a real opl2 :). And I knew i'll need an sd card reader, that's not a problem.

I was ripping the vgms from "fuzzy's world of... etc etc" they are about 300 Kb!, vgm_cmp did nothing to them :(. That game uses an adlib tracker called loudness, and it surelly pushes de opl2 limits, so I guess the vgm has to store a lot of parameters and instrumets.

The original files in the lds format are about 5 kb, but the format is very unknown and not playable for most people, only the adplug plugin can play them and it looks like it's not very popular.

I just realized, I might shrink the files to half the size if i work a bit looking for the loops and everything, so the optimized files should be around 150 kb I hope.

EDIT: I think I won't be able to optimize the vgms from this game, most of them have no repeating patterns, but very long songs and always changing some instrument or some drums. And the ones that have a loop, it is in the middle of the song, like: intro - loop - ending, and I think I can't trim the vgm with this kind of loop using vgm_trim.


Top
 Profile  
 
 Post subject:
PostPosted: 2018-01-17, 23:58:16 

Contributors Contributors
Staff Staff
Reverse engineers Reverse engineers
Offline
User avatar

Joined: 2013-07-17, 23:32:39
Posts: 438
the adplug plugin is open source, isn't it? That means the format is probably documented as well and writing a replayer for the arduino shouldn't be too difficult then.

edit: yup, source is here.


Top
 Profile  
 
 Post subject:
PostPosted: 2018-01-18, 0:29:34 

Contributors Contributors
Offline

Joined: 2015-06-05, 23:08:44
Posts: 10
ctr wrote:
the adplug plugin is open source, isn't it? That means the format is probably documented as well and writing a replayer for the arduino shouldn't be too difficult then.

edit: yup, source is here.

Yes I think it is being ported, but anyway I'll make the vgm pack for this game :).


Top
 Profile  
 
 Post subject:
PostPosted: 2018-01-18, 1:24:59 

Contributors Contributors
Offline
User avatar

Joined: 2015-02-22, 3:40:22
Posts: 143
Heh, vgm_cmp did nothing? Surprising, for me nearly always it shaves off a fair chunk. Guess the sound driver doesn’t talk to the chip unless it needs to, or the recording already removed duplicate writes. Indeed 300 kB for a long song isn’t all that surprising, and if the composition does complex stuff with its channel instrumentation or software envelopes or something, it can add up quickly. For the record, how big is the file when gzipped?


Top
 Profile  
 
 Post subject:
PostPosted: 2018-01-18, 2:06:52 

Contributors Contributors
Offline

Joined: 2015-06-05, 23:08:44
Posts: 10
grauw wrote:
Heh, vgm_cmp did nothing? Surprising, for me nearly always it shaves off a fair chunk. Guess the sound driver doesn’t talk to the chip unless it needs to, or the recording already removed duplicate writes. Indeed 300 kB for a long song isn’t all that surprising, and if the composition does complex stuff with its channel instrumentation or software envelopes or something, it can add up quickly. For the record, how big is the file when gzipped?


Not bad in vgz, I finished the pack :D .


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: MaliceX and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
[ Time : 0.281s | 18 Queries | GZIP : On ]