4

Ditty by Ditty

 1 year ago
source link: https://dittytoy.net/ditty/cef878f9e1
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
lead_low
snare
clave
woodblock
conga
crash
orchhit
vocals
13 loops, 2 filters (13 workers, 1 AudioWorklet)
tick: 0.000, time: 0.000 (110 bpm)





Ditty by Ditty

A "Ditty-style"(??) cover. Who even needs a DAW? :)

Created by srtuss on 22/1/2023

Log in to post a comment.

// 20KB Ditty cover of "Camel by camel" by Sandy Marton (1984)
// by srtuss
// Again, this song was first created in FL Studio and then converted into JS code.
// This time the synths employ a slow-update technique, which means that all the costly code that creates parameter/option automation
// of any kind, executes only at a rate of 100Hz instead of at audio rate (44100Hz) which gives a noticeable performance boost. This is
// sufficient for most parameter automation, while it adds only minimal additional code!
// On lower-end devices there still will be occasional performance hiccups when the orchestra-hit synth or the vocal synth triggers.
// Although, this seems to only happen the first time that the synth gets triggered, and the playback runs smoothly from there on.
class Delayline {
constructor(n) {
this.n = ~~n;
this.p = 0;
this.lastOut = 0;
this.data = new Float32Array(n);
process(input) {
this.lastOut = this.data[this.p];
this.data[this.p] = input;
if(++this.p >= this.n)
this.p = 0;
return this.lastOut;
tap(offset) {
var x = this.p - offset - 1;
x %= this.n;
if(x < 0)
x += this.n;

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK