created note LUT for MIDI notes
This commit is contained in:
1 parent
66bea462e7
commit
accc98c357
2 files changed
+32
-38
No files matched your search
@@ -0,0 +1,13 @@
|
||||
# generate a lookup table of all 128 MIDI notes
|
||||
|
||||
import numpy as np
|
||||
|
||||
for j in range(0, 128, 8):
|
||||
lineString = ""
|
||||
for k in range(8):
|
||||
n = j + k
|
||||
f = 440. * (2. ** ((n - 69.) / 12.))
|
||||
y = f * (2. ** 32.) / 48000.
|
||||
lineString += hex(int(y))
|
||||
lineString += ", "
|
||||
print(lineString)
|
||||
Reference in new issue
Block a user