vgmrips

The forum about vgm files
It is currently 2018-08-22, 3:04:09

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 71 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
 Post subject:
PostPosted: 2015-05-28, 23:23:16 

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

Joined: 2014-01-28, 5:51:54
Posts: 620
ValleyBell is your man. Just ask a more specific question, he says he can't help you from what you've said so far. Maybe isolate a test case.

_________________
Support me on patreon!.
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-29, 1:50:35 

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

Joined: 2014-01-28, 5:51:54
Posts: 620
also, to save CPU cycles, you do know that vgmplay has its own resampler, and you can set the output frequency from vgmplay.ini. so you don't have to use your own resampler. One feature of the VGM format is that it's oriented around the 44100 sample rate. Most chips can comply to that rate, only some of them need to be resampled. But if you play at 44100Hz, the CPU usage will be the lowest.

So two things you can do are:

1. Set the default sample rate to 44100 in vgmplay.ini (I don't expect a huge performance increase from this)
2. Use vgmplay's internal resampler (worth a test)

_________________
Support me on patreon!.
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-29, 23:17:25 

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

Joined: 2014-01-28, 5:51:54
Posts: 620
I've setup a copy here: http://chiptune.ninja/tools/vgmplay-0.4 ... en/htdocs/

I don't know when I'll have the time to implement it into the packs pages, but I guess it will improve over time. I really just need it to be very simple, like:

var vgm = new VGMPlayer({ /* options */ });
vgm.load('path/to/file.vgz');
/* OR */
vgm.load(buffer);

Do you think you can make it work in a separate Worker thread? Might give better performance, less skipping. The only downside of using Workers is that data is serialized before being transmitted between the Worker and the main thread. It might work well enough though.

Also, if you're curious, here are our previous efforts:

There is NeoLogiX' VGM web player: viewtopic.php?f=3&t=1601
Then there is my AS3 VGM player: http://chiptune.ninja/dev/chiptune/as3/ ... e/main.php
And there is my JS VGM player: http://chiptune.ninja/dev/vgm/

Each of these has down sides and up sides.

NeoLogiX' player works, but I haven't seen him around, so I guess he's not working on it anymore.
the AS3 and VGM players can be developed and they can work great (the AS3 player even has key display for some of the chips), but again, it's very time consuming.
Your player is almost fully functional but it eats up a lot of CPU. Pretty sure there are still some optimizations that can be made to get it to work really well.

BTW ValleyBell is working on libvgm, which will, as far as I know, separate the components of vgmplay and make them reusable, so maybe you can work with him to figure out a way to make libvgm easily usable with emscripten and ready for web playback.

_________________
Support me on patreon!.
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-06-02, 12:06:03 

Programmers Programmers
Offline

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

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


so that should be fixed now.. plz let me know if you still find other bugs


Top
 Profile  
 
 Post subject:
PostPosted: 2015-06-03, 23:11:59 

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

Joined: 2014-01-28, 5:51:54
Posts: 620
if you're curious, I had a C++ -> JS and AS3 converter working here: http://chiptune.ninja/dev/chiptune/clang/test.php

I used it to roughly convert the per-chip code, and then hand fix stuff until it worked properly. It's written with clang.

_________________
Support me on patreon!.
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-06-04, 12:46:12 

Musicians Musicians
Contributors Contributors
Offline

Joined: 2012-09-29, 11:45:48
Posts: 215
Location: Australia
tinyrsid wrote:
tinyrsid wrote:
vampirefrog wrote:
I might know a guy.

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


so that should be fixed now.. plz let me know if you still find other bugs


Stuff looks good on this end. Perhaps now might be a good opportunity to get it building for v0.40.6!

_________________
-dj.tuBIG/MaliceX


Top
 Profile  
 
 Post subject:
PostPosted: 2015-06-04, 12:50:01 

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

Joined: 2014-01-28, 5:51:54
Posts: 620
You should work with ValleyBell so that you can add your #ifdefs to the base code via github.

_________________
Support me on patreon!.
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-06-11, 21:14:03 

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

Joined: 2014-01-28, 5:51:54
Posts: 620
Can you make a stripped down version of vgmplay that only supports YM2612, SN76489, 32X PWM and RF5C164?

_________________
Support me on patreon!.
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-06-20, 1:49:39 

Programmers Programmers
Offline

Joined: 2015-05-19, 22:03:39
Posts: 28
vampirefrog wrote:
Can you make a stripped down version of vgmplay that only supports YM2612, SN76489, 32X PWM and RF5C164?

did you try it yet?

PS: The code needed to play one file would look like this (it shouldn't be difficult to add a little wrapper that is customized to your needs.. just make sure to use the proper callbacks so that the stuff that depends on async file loading is properly setup before you are trying to use it..):

function doOnTrackEnd(){ /* whatever you want to do when the played track ends */}
function doOnTrackReadyToPlay(){ ScriptNodePlayer.getInstance().play(); }
function doOnPlayerReady() {
/* once the player is ready you can start loading song files..*/
var p= ScriptNodePlayer.getInstance();
var options= {};
options.boostVolume= 0; // turn up to play louder

p.loadMusicFromURL('music/whatever.vgz', options,
(function(filename){ /* whatever you want to do when the file has been loaded */}),
(function(){ /* whatever you want to do on 'fail' */}),
(function(total, loaded){ /* whatever you want to do on 'load progress' */}));
}

ScriptNodePlayer.createInstance(new VgmBackendAdapter(), '', ["VGMPlay.ini", "yrw801.rom"], true,
doOnPlayerReady, doOnTrackReadyToPlay, doOnTrackEnd);

vampi edit: http://www.wothke.ch/download/backend_vgm.js


Top
 Profile  
 
 Post subject:
PostPosted: 2015-06-20, 13:02:22 

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

Joined: 2014-01-28, 5:51:54
Posts: 620
That looks very nice. I'll give it a try.

_________________
Support me on patreon!.
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-06-21, 21:59:21 

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

Joined: 2014-01-28, 5:51:54
Posts: 620
I've set it up here but I'm having trouble getting the 32X PWM songs to make any sound. Perhaps it's the same bug as before, when we couldn't hear 32X streaming? Some of the songs work, some don't. Perhaps it's the same fix as before?

A particular case is Popful Mail Opening, which starts with some drums, then the FM kicks in. In the reduced player there are no drums, but in the full one it works fine: http://chiptune.ninja/tools/vgmplay-0.4 ... /index.php

Also, is there a way to get a playing progress callback, and a way to seek? Is ScriptNodePlayer documented anywhere?

_________________
Support me on patreon!.
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-06-22, 2:28:16 

Programmers Programmers
Offline

Joined: 2015-05-19, 22:03:39
Posts: 28
If something is not working in the stripped version then it's probably due to me just having stripped too much.. (why don't you just use the full version?) There is no real documentation yet.. for seeking you'd use:
var p= ScriptNodePlayer.getInstance();
p.seekPlaybackPosition(Math.round(p.getMaxPlaybackPosition()*relPos));

you'd get the current position using:
p.getPlaybackPosition()

Admin edit: fullquote removed


Top
 Profile  
 
 Post subject:
PostPosted: 2015-06-22, 11:19:58 

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

Joined: 2014-01-28, 5:51:54
Posts: 620
tinyrsid wrote:
why don't you just use the full version?

This one is half the size, and we're so close...

tinyrsid wrote:
There is no real documentation yet.. for seeking you'd use:
var p= ScriptNodePlayer.getInstance();
p.seekPlaybackPosition(Math.round(p.getMaxPlaybackPosition()*relPos));

you'd get the current position using:
p.getPlaybackPosition()

[/quote]
Thanks.

_________________
Support me on patreon!.
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-06-22, 12:10:18 

Programmers Programmers
Offline

Joined: 2015-05-19, 22:03:39
Posts: 28
vampirefrog wrote:
tinyrsid wrote:
why don't you just use the full version?

This one is half the size, and we're so close...


Here is "my" source code: http://www.wothke.ch/download/vgmplay-0.40.5.zip

When you search for "STRIPPED_VGM" ifdefs you'll find all the places where I am stripping
stuff off. I think it's most efficient if someone familiar with vgmPlay (e.g. ValleyBell) has a quick look - I guess for him it will be obvious if some of the stripped parts are actually needed.


Top
 Profile  
 
 Post subject:
PostPosted: 2015-06-22, 12:42:10 

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

Joined: 2014-01-28, 5:51:54
Posts: 620
Good thinking!

_________________
Support me on patreon!.
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  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 71 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users 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