Install SuperDough

This commit is contained in:
2023-08-11 23:30:29 +02:00
parent 673203aef9
commit ed19138786
4 changed files with 192 additions and 29 deletions

View File

@ -3,15 +3,21 @@ import { scale } from './Scales';
import { tryEvaluate } from "./Evaluator";
import { MidiConnection } from "./IO/MidiConnection";
import { next } from "zifferjs";
// @ts-ignore
import { webaudioOutput, samples } from '@strudel.cycles/webaudio';
import {
superdough,
samples,
initAudioOnFirstClick,
registerSynthSounds
} from 'superdough';
const init = Promise.all([
initAudioOnFirstClick(),
samples('github:tidalcycles/Dirt-Samples/master'),
registerSynthSounds(),
]);
const sound = (value: any) => ({
value, context: {},
ensureObjectValue: () => {}
});
class DrunkWalk {
@ -967,7 +973,7 @@ export class UserAPI {
// Trivial functions
// =============================================================
sound = async (values: object) => {
webaudioOutput(sound(values), 0.00)
sound = async (values: object, delay: number = 0.00) => {
superdough(values, delay)
}
}