Skip to content

Instantly share code, notes, and snippets.

View petersalomonsen's full-sized avatar

Peter Salomonsen petersalomonsen

View GitHub Profile
@petersalomonsen
petersalomonsen / shader.glsl
Created September 13, 2023 04:50
WebAssembly Music: "Much"
precision highp float;
uniform vec2 resolution;
uniform float time;
uniform float targetNoteStates[128];
float wave(float x, float freq, float speed, float amp) {
return amp * sin(x * freq + time * speed);
}
void main() {
setBPM(90);
addInstrument('piano');
addInstrument('string');
addInstrument('drums');
addInstrument('guitar');
addInstrument('bass');
addInstrument('tubelead');
addInstrument('flute');
addInstrument('padsynth');