add repl-react + fix deps

This commit is contained in:
Felix Roos 2022-03-25 18:46:45 +01:00
parent 6f60a3a1d5
commit 6430f6207d
53 changed files with 33850 additions and 24809 deletions

View file

@ -1,5 +1,6 @@
import { Pattern as _Pattern } from '../core/strudel.mjs';
import Tone from 'tone';
import { Pattern as _Pattern } from '@strudel/core';
import * as Tone from 'tone';
const {
AutoFilter,
Destination,
@ -20,8 +21,8 @@ const {
getDestination,
Players,
} = Tone;
/* import tonePiano from '@tonejs/piano';
const { Piano } = tonePiano; */
import * as tonePiano from '@tonejs/piano';
const { Piano } = tonePiano;
import { getPlayableNoteValue } from '../../packages/core/util.mjs';
// "balanced" | "interactive" | "playback";
@ -106,11 +107,11 @@ export const players = (options, baseUrl = '') => {
});
};
export const synth = (options) => new Synth(options);
/* export const piano = async (options = { velocities: 1 }) => {
export const piano = async (options = { velocities: 1 }) => {
const p = new Piano(options);
await p.load();
return p;
}; */
};
// effect helpers
export const vol = (v) => new Gain(v);