JAVASCRIPT YM2612~!!!
Moderator: BigEvilCorporation
-
- Very interested
- Posts: 122
- Joined: Mon May 07, 2007 5:19 pm
- Location: New York, NY, USA
- Contact:
JAVASCRIPT YM2612~!!!
STEP 1 OF MY MASTER PLAN IS COMPLETE!!!!!!!!!!
Ladies and gentlemen, I present to you as a proof of concept: the JS2612.
http://www.luxatom.com/vst-2612.php
Not only did I FINALLY get graphable output, I also succeeded in mocking up the connection between a YM2612 (based on genplus-gx) and some implementation (albeit reduced) of the VST SDK. The output is from a constant fnum, but now I can actually put a frequency-to-fnum conversion to take a given MIDI note and generate.
One day I will update my supporting VST.js to actually output sound instead of the raw numbers, but not today! Today is for celebrating the BIRTH of the JS2612!
ym2612-js on github
(cross-posted to smspower, spritesmind, project2612)
(update - if you have firefox 4 or higher, there is a really basic audio preview now on the example page!!! ^______________^ )
Ladies and gentlemen, I present to you as a proof of concept: the JS2612.
http://www.luxatom.com/vst-2612.php
Not only did I FINALLY get graphable output, I also succeeded in mocking up the connection between a YM2612 (based on genplus-gx) and some implementation (albeit reduced) of the VST SDK. The output is from a constant fnum, but now I can actually put a frequency-to-fnum conversion to take a given MIDI note and generate.
One day I will update my supporting VST.js to actually output sound instead of the raw numbers, but not today! Today is for celebrating the BIRTH of the JS2612!
ym2612-js on github
(cross-posted to smspower, spritesmind, project2612)
(update - if you have firefox 4 or higher, there is a really basic audio preview now on the example page!!! ^______________^ )
-
- Very interested
- Posts: 122
- Joined: Mon May 07, 2007 5:19 pm
- Location: New York, NY, USA
- Contact:
update: audio preview NOW WORKS IN FIREFOX >= 4, SAFARI 5, AND CHROME! many thanks to the XAudioJS library by grantgalitz for making this happen!
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
-
- Very interested
- Posts: 2442
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
Works nicely in Opera 11.11, though there's significant delay when sound starts to play, but playback is not choppy etc. 2GHz Athlon 64 here
Mida sa loed ? Nagunii aru ei saa
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
-
- Very interested
- Posts: 122
- Joined: Mon May 07, 2007 5:19 pm
- Location: New York, NY, USA
- Contact:
I myself experienced a weird delay in safari during first playback after changing the preset, but subsequent playbacks worked fine; I think it has something to do w/filling the audio buffer in a timely manner, but I'm still getting used to xaudiojs.
Oh, and next update to the JS2612 will attempt speed optimizations so it could work decently in the Sphere engine, but I also have an update for VST.js planned that will test out editing individual parameters.
Oh, and next update to the JS2612 will attempt speed optimizations so it could work decently in the Sphere engine, but I also have an update for VST.js planned that will test out editing individual parameters.
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
-
- Very interested
- Posts: 122
- Joined: Mon May 07, 2007 5:19 pm
- Location: New York, NY, USA
- Contact:
fundamentals first the "edit individual parameters" update is definitely the higher priority one, and will give immediate results once done correctly, not only for the JS2612 but also for the other proof-of-concept js vst I made - a js port of the mda dx10 vst.
regarding socializing instrument creation, that's more of a "future possible plans" thing which will be easier to handle if/when a php ym2612 core is made, as server-side tech would also allow more direct database interaction to save, load, and all-around source control instruments.
also, social instrument creation & chatboxing sounds like something more suited to an established site like project2612; if/when I get to that point I'll definitely be approaching dark pulse and other p2612 admins abt it first, and if that's not possible THEN I'll be doing it myself.
regarding socializing instrument creation, that's more of a "future possible plans" thing which will be easier to handle if/when a php ym2612 core is made, as server-side tech would also allow more direct database interaction to save, load, and all-around source control instruments.
also, social instrument creation & chatboxing sounds like something more suited to an established site like project2612; if/when I get to that point I'll definitely be approaching dark pulse and other p2612 admins abt it first, and if that's not possible THEN I'll be doing it myself.
-
- Very interested
- Posts: 122
- Joined: Mon May 07, 2007 5:19 pm
- Location: New York, NY, USA
- Contact:
update: you can now edit individual parameters with semi-realtime results (ie, changes take effect when you let go of the button)! i did whatever i could in safari 5, chrome 14, and firefox 5, but if there's an issue w/it working in x or y browser let me know. also, i need to add some visual feedback that something's happening (a throbber or something), so you don't have to tell me that.
http://www.luxatom.com/vst-2612.php
http://www.luxatom.com/vst-2612.php
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
-
- Very interested
- Posts: 122
- Joined: Mon May 07, 2007 5:19 pm
- Location: New York, NY, USA
- Contact:
i get a similar reaction when i open it in safari 5, but that was even before i added parameter editing. all my firefoxes are still at 5, tho.
i updated the version of xaudiojs it uses. i'm still trying to get used to it and web audio in general, so maybe i'm still doing it wrong. in any case, there isn't much work left for me to do to the js2612 before moving on to other chips.
i updated the version of xaudiojs it uses. i'm still trying to get used to it and web audio in general, so maybe i'm still doing it wrong. in any case, there isn't much work left for me to do to the js2612 before moving on to other chips.
-
- Very interested
- Posts: 122
- Joined: Mon May 07, 2007 5:19 pm
- Location: New York, NY, USA
- Contact:
ym2612 now updated w/eke's latest (beginning of august) optimizations and a speed-up (hopefully) for converting floats to ints!
https://github.com/apollolux/ym2612-js
https://github.com/apollolux/ym2612-js
Did you measured any speedup from this changes ?
I think I noticed a few improvment on Wii (PowerPC) but was not sure about other platforms. Most noticeable change was to perform envelope update for all channels/operators in a single loop, instead of calling the same function for each channel. The rest is some trivial variable/register opimization, not sure if it improves anything on x86.
I think I noticed a few improvment on Wii (PowerPC) but was not sure about other platforms. Most noticeable change was to perform envelope update for all channels/operators in a single loop, instead of calling the same function for each channel. The rest is some trivial variable/register opimization, not sure if it improves anything on x86.
-
- Very interested
- Posts: 122
- Joined: Mon May 07, 2007 5:19 pm
- Location: New York, NY, USA
- Contact:
funnily enough, acc. to github's online diff, it looks like i already had the vast majority of those optimizations (especially the "perform X updates in a single loop" ones)!
i seem to have broken my calculate_channel function locally, however, so nothing is being generated. i'll be back after i fix that.
edit - ok, i'm back. it seems in my test page since i technically only write to channel 1 and i uncommented calculating other channels the untouched channels give me an error. commenting the other channels restores generation of sound in my test. as for speed, it feels a little faster (i edited the "convert to int" to be faster in javascript), but that seems to be offset by how crappy safari 5.1 has become so far.
i seem to have broken my calculate_channel function locally, however, so nothing is being generated. i'll be back after i fix that.
edit - ok, i'm back. it seems in my test page since i technically only write to channel 1 and i uncommented calculating other channels the untouched channels give me an error. commenting the other channels restores generation of sound in my test. as for speed, it feels a little faster (i edited the "convert to int" to be faster in javascript), but that seems to be offset by how crappy safari 5.1 has become so far.