This commit is contained in:
Jade (Rose) Rowland 2025-05-27 17:35:35 +02:00
parent 366637026b
commit 63f4f202f1
3 changed files with 17 additions and 23 deletions

View file

@ -147,13 +147,9 @@ 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 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 { duration } = value;