4 ms·
Your Javascript 303 sounds really good! Are you planning to turn it into a full web app?
by errozero 10y ago
Your Javascript 303 sounds really good! Are you planning to turn it into a full web app?
- a1k0n 10y agoSome day, perhaps, but the code is MIT license and anyone is welcome to collaborate. (FWIW, @pcgregory turned my fasttracker 2 player into a full fledged tracker: https://wetracker.herokuapp.com/ https://wetracker.herokuapp.com/) I'm busy with other projects now; this is something I keep coming back to once in a while, and if I do it'll be to improve the fidelity before I make a pretty frontend... It still needs accent emulation which is a bit of work, high pass output filter (it's bassier than a real 303 because there's some capacitors between the filter output and the amplifier I'm not emulating), the knob ranges / nonlinearities aren't quite right... edit: And it also needs the square wave, which is super weird on the 303, as you're aware (yours has a sample for it I think)
- errozero 10y agoThis is what I am using for the square wave: https://github.com/errozero/js-303-instrument/blob/master/303square.json https://github.com/errozero/js-303-instrument/blob/master/30... I can't remember how I found these numbers or what I googled to come across them.
- a1k0n 10y agooh right, you wrote the other 303 web app! I was kinda mad because you stole my thunder while I was working on this one. :)
- errozero 10y agoHaha, sorry about that. I think your preview sounds a lot better than my version and the code is impressive. I need to make a few changes to my app, one of the main ones is the fact that you cant adjust the cutoff whilst the envelope is in progress but I have recently come across this technique which I am going to implement: http://stackoverflow.com/questions/30019666/web-audio-synthesis-how-to-handle-changing-the-filter-cutoff-during-the-attack http://stackoverflow.com/questions/30019666/web-audio-synthe... My Acid Machine app has been built in a way so that all of the instruments are self contained modules, you could possibly create an instrument that would be compatible with the whole UI and step sequencer etc of my app quite easily.
- a1k0n 10y agoWell, in your case you're using the webkit exponentialRampToValueAtTime or whatever it's called, so you could just recompute the envelope (it's an exponential sweep... actually it's sort of double-exponential, which is another thing I need to fix in mine) and issue new filter sweeps every time the knobs move, right? you could set it based on when the envelope was triggered in the past and it should work fine. edit: nevermind, I thought you could specify a startTime in addition to endTime but you can't. so you'd have to use audioContext.currentTime to figure out where the sweep should be now, ramp to there, and exponential sweep down to the final value at the end time.
- errozero 10y agoI've not tried the technique linked to yet but it makes it sound like you don't need to make any calculations yourself if you connect a gain node to the filter input and adjust that instead of directly adjusting the filter. I'm guessing it takes that input and adds it to the current value of the envelope.