(It doesn't need Flash-player or Java-VM, it's pure JavaScript.)
Web Audio API is supported (and contained) by browsers (according to Wikipedia) since these versions:
The player supports simple Vsync/CIA timed SIDs. SIDs with custom player and digis are not fully implemented.
To include jsSID at your page, 'jsSID.js' should be included in body/header of your HTML code:
<script type="text/javascript" src="jsSID.js"></script>
If you just want to simply play a SID without manually creating and initializing a JS object:
(This creates a jsSID object called 'SIDplayer' automatically behind the scene, so you can use its functions.)
playSID('URL', subtune);
If you want to create a SIDplayer object manually before using its functions:
SIDplayer = new jsSID(buffersize, background_noise); //background noise around 0.0005 is suitableSamplerate is inherited from the web-browser, usually 44100Hz.
Choose file:
or type local URL:
SIDplayer.loadstart('URL', subtune);
SIDplayer.loadinit('URL', subtune);subtune:1
In JavaScript:
SIDplayer.start(subtune);
SIDplayer.playcont();
SIDplayer.pause();
SIDplayer.stop();
volume:
100%In JavaScript:
SIDplayer.setvolume(volume);
SIDplayer.getoutput(); //volume range: 0..1
Playtime:
SID Title: ...
SID Author: ...
SID release info: ...
No. of subtunes: 0
Preferred SID-model for tune: 0, using:
SIDplayer.gettitle();
SIDplayer.getauthor();
SIDplayer.getinfo();
SIDplayer.getsubtunes();
SIDplayer.getprefmodel();
SIDplayer.getplaytime();
//'playtime' is in seconds
SID-model for playback: SIDplayer.getmodel();
SIDplayer.setmodel(model);
//models: 8580.0 or 6581.0
Set callback functions (e.g. displaying SID-file info) for jsSID events:
SIDplayer.setloadcallback(function_name);
SIDplayer.setstartcallback(fn);
SIDplayer.setendcallback(fn,playtime); //in seconds
A simple playlist player can be found in this folder: playlist.html
You can also hear jsSID in action at: http://hermit.sidrip.com