Skip to content

Commit

Permalink
last changes before presentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Odisseuss committed Oct 20, 2021
1 parent 1d982e3 commit ed47c66
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 0 additions & 3 deletions src/pages/metronome/MetronomeContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@ class MetronomeContainer extends React.Component<
}
setBeatsPerMeasure(beatsPerMeasure: number) {
this.setState({ beatsPerMeasure: beatsPerMeasure });
// Metronome scheduler crashes when you set it to a high value and then decrease the beats per measure very quickly. It continues with infinity beats per measure
// One quick option is to stop the metronome when adjusting beats per measure although it might be annoying
// Second option is to create a check for if the current beats per minute are smaller than the current and to wait untill execution of the current run terminates
this.stop();
}
cycleNoteType() {
Expand Down
4 changes: 2 additions & 2 deletions src/pages/tuner/TunerContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class TunerContainer extends React.Component<
this.state = {
analyser: undefined,
audioContext: undefined,
buffer: new Float32Array(2048),
buffer: new Float32Array(4096),
frequency: 0,
note: '-',
mediaStreamSource: undefined,
Expand Down Expand Up @@ -125,7 +125,7 @@ class TunerContainer extends React.Component<
async findPitchWithYIN() {
if (this.state.isPlaying) {
if (this.state.analyser) {
let buffer = new Float32Array(2048);
let buffer = new Float32Array(4096);
this.state.analyser.getFloatTimeDomainData(buffer);
this.setState({ buffer: buffer });
}
Expand Down

0 comments on commit ed47c66

Please sign in to comment.