I tried numerous translation tools online, none seemed to get where I needed. How can I write something in JavaScript that does what the Lisp/Nyquist generator does, but using AudioContext and Web Audio functions? However, the script to generate the ticks themselves is in the Nyquist language, which is based on Lisp. (noteFreq * 2, time + noteLength) į(0, time + noteLength) If (beatNumber % 4 = 0) // beat 0 = high pitche push the note on the queue, even if we're not playing. (sound-srate-abs 44100 (metronome-tick hz gain))Īnd here is the tick I currently have, inside the function that generates it: function scheduleNote(beatNumber, time) The '1.11' factor makes up for gain reduction in 'resample'
Although I was able to work out the 'tick' generator out of Audacity: Metronome tick by Steve Daulton. However, I couldn't figure out how the 'ticks' are generated.
On a., they have a metronome that generates ticks based on noise.