mirror of
https://codeberg.org/uzu/strudel
synced 2026-07-31 11:31:48 -04:00
support webdirt in minirepl
+ add section in tutorial
This commit is contained in:
@@ -2,6 +2,8 @@ import { Tone } from '@strudel.cycles/tone';
|
||||
import { evalScope } from '@strudel.cycles/eval';
|
||||
import { MiniRepl as _MiniRepl } from '@strudel.cycles/react';
|
||||
import controls from '@strudel.cycles/core/controls.mjs';
|
||||
import * as WebDirt from 'WebDirt';
|
||||
import { loadWebDirt } from '@strudel.cycles/webdirt';
|
||||
|
||||
export const defaultSynth = new Tone.PolySynth().chain(new Tone.Gain(0.5), Tone.Destination).set({
|
||||
oscillator: { type: 'triangle' },
|
||||
@@ -21,8 +23,14 @@ evalScope(
|
||||
import('@strudel.cycles/xen'),
|
||||
import('@strudel.cycles/webaudio'),
|
||||
import('@strudel.cycles/osc'),
|
||||
import('@strudel.cycles/webdirt'),
|
||||
);
|
||||
|
||||
loadWebDirt({
|
||||
sampleMapUrl: '../EmuSP12.json',
|
||||
sampleFolder: 'EmuSP12',
|
||||
});
|
||||
|
||||
export function MiniRepl({ tune }) {
|
||||
return <_MiniRepl tune={tune} defaultSynth={defaultSynth} hideOutsideView={true} />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user