Skip to content

Instantly share code, notes, and snippets.

@jthawme
jthawme / Converting colours into a smooth list
Created January 30, 2021 13:31
A way to smoothly step through set colour stops in javascript/typescript
type Color = {
r: number;
g: number;
b: number;
};
export const interpolate = (t, n1, n2) => {
return (n2 - n1) * t + n1;
};
const drumSets = require('./soundSets/drums.js');
const { deltaToBeats, getDrumValue, btoa } = require('./utils.js');
class DrumsParse {
constructor(drumTrack, info) {
this.track = drumTrack;
this.info = info;
}