Created
September 20, 2024 15:25
-
-
Save charlieroberts/157e66bea85ac40d6c8733af0c99d94f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ConductorM = { | |
add( ...agents ) { | |
ConductorM.agents.push( ...agents ) | |
}, | |
agents:[], | |
articulation( v ) { | |
}, | |
brightness( v ) { | |
for( let a of ConductorM.agents ) { | |
switch( a.name ) { | |
case 'Kick': a.tone = v.map(a.tone.value); break; | |
case 'Snare': a.snappy = v.map(a.snappy.value); break; | |
case 'Clap': a.cutoff = v.map(a.cutoff.value); a.Q = v.map(a.cutoff.value); break; | |
case 'Clave': a.frequency = v.map(a.frequency.value,200); break; | |
default: a.cutoff = v.map(a.cutoff.value); break; | |
} | |
} | |
}, | |
quantize( v ) { | |
if( ConductorM.quantize.fx === undefined ) { | |
ConductorM.quantize.fx = BitCrusher({ sampleRate: v, bitDepth:v }) | |
Out.fx.add( ConductorM.quantize.fx ) | |
}else{ | |
ConductorM.quantize.fx.sampleRate = v | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment