From ba0b76f5dbbe9e9441ccd2c8a5ba09150614426d Mon Sep 17 00:00:00 2001 From: Mohit Verma <112820522+mohitvdx@users.noreply.github.com> Date: Thu, 8 Feb 2024 20:27:38 +0530 Subject: [PATCH] fixed singer issue --- modules/singer/playground/pages/Voice.tsx | 2 +- modules/singer/src/singer.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/singer/playground/pages/Voice.tsx b/modules/singer/playground/pages/Voice.tsx index 94ab7ff4..0168ba9a 100644 --- a/modules/singer/playground/pages/Voice.tsx +++ b/modules/singer/playground/pages/Voice.tsx @@ -1,7 +1,7 @@ import { Voice } from '@/core/voice'; import SynthUtils from '@/core/synthUtils'; import * as Tone from 'tone'; -import { _state, noteValueToSeconds, _defaultSynth, _polySynth } from '@/singer'; +import { _state, noteValueToSeconds, _defaultSynth, /*_polySynth*/ } from '@/singer'; import { setupSynthUtils } from '@/core/synthUtils'; import { injected } from '@/index'; diff --git a/modules/singer/src/singer.ts b/modules/singer/src/singer.ts index b13ec776..c33b51ed 100644 --- a/modules/singer/src/singer.ts +++ b/modules/singer/src/singer.ts @@ -23,7 +23,7 @@ const currentpitch = new CurrentPitch(testKeySignature, new Temperament(), 1, 4) const _stateObj = { ..._defaultSynthStateValues }; /** Proxy to the synth state parameters. */ -const _state = new Proxy(_stateObj, { +export const _state = new Proxy(_stateObj, { set: (_, key, value) => { if (key === 'beatsPerMinute') { _stateObj.beatsPerMinute = value; @@ -37,7 +37,7 @@ const _state = new Proxy(_stateObj, { }); /** Default synth **/ -const _defaultSynth = new Tone.Synth().toDestination(); +export const _defaultSynth = new Tone.Synth().toDestination(); // -- private functions ----------------------------------------------------------------------------