Skip to content

Commit

Permalink
Fix how negative intervals interact with the chord wheels
Browse files Browse the repository at this point in the history
  • Loading branch information
frostburn committed Apr 6, 2024
1 parent acee829 commit 309bd09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/virtual-synth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export class VirtualSynth {
frequency,
waveform
})
this.voices.sort((a, b) => a.frequency - b.frequency)
this.voices.sort((a, b) => Math.abs(a.frequency) - Math.abs(b.frequency))

const voiceOff = () => {
for (let i = 0; i < this.voices.length; ++i) {
Expand Down

0 comments on commit 309bd09

Please sign in to comment.