import tone always from @strudel/tone

This commit is contained in:
Felix Roos 2022-03-25 21:35:41 +01:00
parent edba815b0b
commit 65deb7df1d
9 changed files with 14 additions and 10 deletions

View file

@ -4,4 +4,5 @@ TBD
## Dev Notes
`@tonejs/piano` has peer dependency on `webmidi@^2.5.1`! A newer version of webmidi will break.
- `@tonejs/piano` has peer dependency on `webmidi@^2.5.1`! A newer version of webmidi will break.
- If you use Tone in another package, make sure to `import { Tone } from '@strudel/tone`, to ensure you get the same AudioContext.

View file

@ -1,4 +1,4 @@
import * as Tone from 'tone';
import { Tone } from '@strudel/tone';
import { Pattern } from '@strudel/core';
export const getDrawContext = (id = 'test-canvas') => {

View file

@ -1,5 +1,8 @@
import { Pattern as _Pattern } from '@strudel/core';
import * as Tone from 'tone';
import * as _Tone from 'tone';
// import Tone from here, to make sure to get the same AudioContext
export const Tone = _Tone;
const {
AutoFilter,

View file

@ -1,4 +1,4 @@
import * as Tone from 'tone';
import { Tone } from '@strudel/tone';
export const hideHeader = () => {
document.getElementById('header').style = 'display:none';