Skip to content

Commit 12d2b23

Browse files
committed
hack(singer): disable erroneous lines
1 parent 9e633e5 commit 12d2b23

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

modules/singer/playground/pages/Voice.tsx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Voice } from '@/core/voice';
22
import SynthUtils from '@/core/synthUtils';
33
import * as Tone from 'tone';
4-
import { _state, noteValueToSeconds, _defaultSynth, _polySynth } from '@/singer';
4+
// import { _state, noteValueToSeconds, _defaultSynth, _polySynth } from '@/singer';
55
import { setupSynthUtils } from '@/core/synthUtils';
66
import { injected } from '@/index';
77

@@ -18,26 +18,27 @@ await (async () => {
1818
'audio.piano': getAsset('audio.piano')!,
1919
'audio.snare': getAsset('audio.snare')!,
2020
};
21-
2221
})();
2322

2423
function _getSynth(synthType: string) {
25-
switch (synthType) {
26-
case 'polysynth':
27-
return _polySynth;
28-
}
29-
return _defaultSynth;
24+
synthType;
25+
26+
// switch (synthType) {
27+
// case 'polysynth':
28+
// return _polySynth;
29+
// }
30+
// return _defaultSynth;
3031
}
3132

3233
async function playSynth(synthType: string) {
3334
await Tone.start();
34-
const synth = _getSynth(synthType);
35-
_state.notesPlayed = 0;
35+
// const synth = _getSynth(synthType);
36+
// _state.notesPlayed = 0;
3637
console.log('playing c4 using', synthType);
37-
const now = Tone.now();
38-
let offset = noteValueToSeconds(_state.notesPlayed);
39-
synth.triggerAttackRelease('c4', '4n', now + offset);
40-
_state.notesPlayed += 4;
38+
// const now = Tone.now();
39+
// let offset = noteValueToSeconds(_state.notesPlayed);
40+
// synth.triggerAttackRelease('c4', '4n', now + offset);
41+
// _state.notesPlayed += 4;
4142
}
4243

4344
async function voice() {
@@ -61,7 +62,6 @@ async function voice() {
6162
// }
6263
// }).toDestination();
6364

64-
6565
// _state.notesPlayed = 0;
6666
// const now = Tone.now();
6767
// let offset = noteValueToSeconds(_state.notesPlayed);

0 commit comments

Comments
 (0)