Skip to content

Commit 0af3cba

Browse files
authored
Merge pull request #348 from x-1xps/patch-1
Fix in formula for creating frequency from MIDI note
2 parents 4e60678 + 2d15db3 commit 0af3cba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: libraries/AnalogWave/examples/DACEqualTemperedScale/DACEqualTemperedScale.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
a formula for converting MIDI note numbers (0-127) to pitches. This sketch
99
reduces that to the notes 21 - 108, which are the 88 keys found on a piano:
1010
11-
frequency = 440 * ((noteNumber - 69) / 12.0)^2
11+
frequency = 440 * 2^((noteNumber - 69) / 12.0)
1212
1313
You can see this applied in the code below.
1414

0 commit comments

Comments
 (0)