This commit is contained in:
Jade (Rose) Rowland 2025-05-27 17:34:53 +02:00
parent 608dfd515e
commit 366637026b
3 changed files with 17 additions and 708 deletions

View file

@ -147,8 +147,14 @@ export function registerSynthSounds() {
registerSound(
'bytebeat',
(begin, value, onended) => {
const defaultBeats = [
'(t%255 >= t/255%255)*255',
'(t*(t*8%60 <= 300)|(-t)*(t*4%512 < 256))+t/400',
't',
]
const { n } = value
const { byteBeatExpression = defaultBeats[n % defaultBeats.length] } = value
const ac = getAudioContext();
let { byteBeatExpression } = value;
let { duration } = value;
const [attack, decay, sustain, release] = getADSRValues(