vgmrips

The forum about vgm files
It is currently 2019-11-14, 1:39:37

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 71 posts ]  Go to page 1, 2, 3, 4, 5  Next
Author Message
 Post subject: Web version of vgmPlay
PostPosted: 2015-05-23, 16:06:03 

Programmers Programmers
Offline

Joined: 2015-05-19, 22:03:39
Posts: 35
Just did a WebAudio version of vgmPlay: http://www.wothke.ch/webvgm/

Cheers.


Top
 Profile  
 
 Post subject:
PostPosted: 2015-05-23, 16:18:53 

Contributors Contributors
Offline
User avatar

Joined: 2015-02-22, 3:40:22
Posts: 141
Very nice!


Top
 Profile  
 
 Post subject:
PostPosted: 2015-05-23, 18:12:34 

Musicians Musicians
Contributors Contributors
Offline

Joined: 2012-09-29, 11:45:48
Posts: 217
Location: Australia
Whoaaaaa. This thing actually works! Although the clock speed seems to be a tad too slow (though I suspect it might be the audio handler being rendered at 48kHz and played at 44.1kHz), it seems to achieve the task nicely. Interestingly, certain lower clocked VGM's also have a lower sample rate which is a nice side effect. :)

BTW, welcome!

_________________
-dj.tuBIG/MaliceX


Top
 Profile  
 
 Post subject:
PostPosted: 2015-05-23, 21:22:59 

Contributors Contributors
Bug catchers Bug catchers
Offline
User avatar

Joined: 2011-12-28, 19:52:40
Posts: 206
Location: Paris, France
They sound more like they're replayed at 50 Hz instead of 60, but otherwise the quality is indeed very nice.

_________________

Sega PCM [1985/1989] | Namco C140 [1987/1990] | Hudson HuC6280 [1987/1995] | Yamaha YM2608 [1988/1996] | Oki MSM6295 [1988/1998]


Top
 Profile  
 
 Post subject:
PostPosted: 2015-05-23, 23:20:31 

Contributors Contributors
Artists Artists
Offline
User avatar

Joined: 2012-03-30, 9:28:37
Posts: 182
Location: Hagan, GA, USA
Everything plays super high-pitched and fast on my end. Probably because I usually have my audio out set to 192Khz.


Top
 Profile  
 
 Post subject:
PostPosted: 2015-05-24, 0:15:11 

Contributors Contributors
Offline

Joined: 2012-05-24, 19:11:36
Posts: 18
Yeah, it definitely varies depending on the output rate of your audio adapter. I just switched from the default 44100 to 48000 on my sound card and now everything sounds correct.

_________________
The Wafflenet OPL Archive
PC/DOS demoscene & tracker music... in VGM format!


Top
 Profile  
 
 Post subject:
PostPosted: 2015-05-24, 3:17:06 

Programmers Programmers
Offline

Joined: 2015-05-19, 22:03:39
Posts: 35
MaliceX wrote:
Whoaaaaa. This thing actually works! Although the clock speed seems to be a tad too slow (though I suspect it might be the audio handler being rendered at 48kHz and played at 44.1kHz), it seems to achieve the task nicely. Interestingly, certain lower clocked VGM's also have a lower sample rate which is a nice side effect. :)

BTW, welcome!



oops.. I forgot to add my WebAudio-side resampling code.. (e.g. like I am using in my SpectreZX player: http://www.wothke.ch/tinyrsid/index.php ... -players).. so samples are generated for 44.1kHz but are currently played with whatever rate the browser is using.. (Chome 48kHz, Firefox 44.1kHz - or whatever audio settings you have on your machine..)

I better fix that :-)


Top
 Profile  
 
 Post subject:
PostPosted: 2015-05-24, 4:11:04 

Musicians Musicians
Contributors Contributors
Offline

Joined: 2012-09-29, 11:45:48
Posts: 217
Location: Australia
Hi tinyrsid,

I did some more testing last night and I've encountered a number of issues.

  • some vgm files using OKIM6258 or HuC6280 output via Data Block commands don't appear to work correctly.
  • OPL2/3 (adlibemu dosbox core?) Rhythm mode snare drum internal noise generator is not modulating the operator.
  • Fade segment during playback blocks loading next song.
  • You can only drag a vgm into the player once. Repeated attempts are blocked for previously played files. The next/prev buttons also currently don't appear to do anything useful in that regard.
  • There seems to be an ongoing JS error saying something about a value being over the size limit being logged during playback in FireBug

Some of the bugs don't exist in the standalone vgmplay code, so I suspect something may have been accidenrally broken on porting to emacripten.

_________________
-dj.tuBIG/MaliceX


Top
 Profile  
 
 Post subject:
PostPosted: 2015-05-24, 12:54:54 

Programmers Programmers
Offline

Joined: 2015-05-19, 22:03:39
Posts: 35
tinyrsid wrote:
I better fix that :-)


done


Top
 Profile  
 
 Post subject:
PostPosted: 2015-05-24, 13:31:48 

Programmers Programmers
Offline

Joined: 2015-05-19, 22:03:39
Posts: 35
MaliceX wrote:
Hi tinyrsid,

I did some more testing last night and I've encountered a number of issues.

  • some vgm files using OKIM6258 or HuC6280 output via Data Block commands don't appear to work correctly.
  • OPL2/3 (adlibemu dosbox core?) Rhythm mode snare drum internal noise generator is not modulating the operator.
  • Fade segment during playback blocks loading next song.
  • You can only drag a vgm into the player once. Repeated attempts are blocked for previously played files. The next/prev buttons also currently don't appear to do anything useful in that regard.
  • There seems to be an ongoing JS error saying something about a value being over the size limit being logged during playback in FireBug

Some of the bugs don't exist in the standalone vgmplay code, so I suspect something may have been accidenrally broken on porting to emacripten.


thx for testing.. unfortunately I don't have any idea about the inner workings/features of the original vgmPlay.. I might just not be using the "right" emulation mode for single threaded use of the vgmPlay code.. some insights from somebody familiar with the vgmPlay code might help to resolve the issues quickly.. (it also would be useful to know what song files are using a specific feature and are therefore useful test cases - at first I had used code snippets from PlayVGM_UI() but am now using FillBuffer() directly because it did not seem to make any difference with the songs that I had played..)

However there might just be some bugs left in the original code which prevent it from running correctly when compiling with Emscripten. I don't know what HW architectures vgmPlay has already been successfully tested on... (The author of the original code of one of my other players had also claimed his code was portable when in fact he had always used is on some kind of x86 platform ;-) and I already fixed some potential unaligned memory access issues...

Regarding the UI: The buttons switch between different songs in the configured playlist - but I only put in one song at the moment.. I fixed the issue of repeated "drops" being blocked..


Top
 Profile  
 
 Post subject:
PostPosted: 2015-05-24, 15:30:28 

Programmers Programmers
Offline

Joined: 2015-05-19, 22:03:39
Posts: 35
MaliceX wrote:
[*]There seems to be an ongoing JS error saying something about a value being over the size limit being logged during playback in FireBug[/list]

Might have been due to the displayed frequency spectrum... I just updated the HTML/CSS so that the page also works in Firefox - which it didn't before. I hope this also resolved the above issue.


Top
 Profile  
 
 Post subject:
PostPosted: 2015-05-26, 20:58:17 

Staff Staff
Programmers Programmers
Contributors Contributors
Ball Fondlers Ball Fondlers
Offline
User avatar

Joined: 2014-01-28, 5:51:54
Posts: 690
sweet player bro
do you mind if we use it on our site? it would decrease server bandwidth usage if we server VGM files instead of mp3's like we do now. that and later we can add a visualisation mode that shows the actual chip notes.

I've taken a look, and it seems to eat up 50% cpu (so, 1 of 2 cores) all of the time, even when paused. How low do you think you can get the CPU consumption to go?

_________________
Follow me on twitter.

If you like this post, give it a big thumbs up and hit that subscribe button down below! And as always, thanks for reading, and see you next post.


Top
 Profile  
 
 Post subject:
PostPosted: 2015-05-27, 0:08:27 

Programmers Programmers
Offline

Joined: 2015-05-19, 22:03:39
Posts: 35
vampirefrog wrote:
sweet player bro
do you mind if we use it on our site? it would decrease server bandwidth usage if we server VGM files instead of mp3's like we do now. that and later we can add a visualisation mode that shows the actual chip notes.

I've taken a look, and it seems to eat up 50% cpu (so, 1 of 2 cores) all of the time, even when paused. How low do you think you can get the CPU consumption to go?


sure, go ahead and use it (sources can be found here: https://github.com/wothke/vgmplay-0.40.5)..

As for the CPU load I think that most of it is actually coming from the visuals.. (On my old 3GHz P4 the page runs at around 50% CPU - but the moment I change the browser tab (and the music keeps playing in the respective invisible background browser tab) CPU load immediately drops to 15%-25% in Chrome and to 7%-15% in Firefox (depending on the song).. CPU-load wise, replacing the visuals would certainly be a quick win.. other than that, the code is already built with all the performance optimizing compiler options that I am aware of... next thing would be to look into the original C code to see what can be done there..

As for the remaining flaws (see comments above): It would be helpful to have some background info from somebody familiar with the original vgmPlay design. Maybe you know somebody that could lend me a helping hand? :-)

Admin edit: fixed github link


Top
 Profile  
 
 Post subject:
PostPosted: 2015-05-27, 9:13:16 

Staff Staff
Programmers Programmers
Contributors Contributors
Ball Fondlers Ball Fondlers
Offline
User avatar

Joined: 2014-01-28, 5:51:54
Posts: 690
I might know a guy.

_________________
Follow me on twitter.

If you like this post, give it a big thumbs up and hit that subscribe button down below! And as always, thanks for reading, and see you next post.


Top
 Profile  
 
 Post subject:
PostPosted: 2015-05-28, 16:20:16 

Programmers Programmers
Offline

Joined: 2015-05-19, 22:03:39
Posts: 35
vampirefrog wrote:
I might know a guy.

cool.. maybe he can drop me a PM or email..


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 71 posts ]  Go to page 1, 2, 3, 4, 5  Next

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: DotBot and 3 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.121s | 19 Queries | GZIP : On ]