LoginSignup
0
0

More than 1 year has passed since last update.

MIDIの note - 周波数 配列 コピペできるやつ

Last updated at Posted at 2021-06-25

MIDI のnote番号と周波数[Hz]の対応表はググると色々出てくるのですが、表になっていてコピペできないものがほとんどだったので、コピペできるやつをおいておきますね。

uint16_t tones_i[128];
void createTones(){
  for(int i=0;i<128;++i){
    tones_i[i]=(uint16_t)(440.0*pow(2.0,(i-69)/12.0));
  }
}
const float tones[128]={
8.175798,
8.661958,
9.177023,
9.722718,
10.30086,
10.91338,
11.56233,
12.24986,
12.97827,
13.75,
14.56762,
15.43385,
16.3516,
17.32392,
18.35405,
19.44544,
20.60172,
21.82676,
23.12465,
24.49972,
25.95654,
27.5,
29.13523,
30.86771,
32.70319,
34.64783,
36.7081,
38.89087,
41.20344,
43.65353,
46.2493,
48.99942,
51.91309,
55,
58.27047,
61.73542,
65.40639,
69.29565,
73.4162,
77.78175,
82.40688,
87.30706,
92.4986,
97.99885,
103.8262,
110,
116.5409,
123.4708,
130.8128,
138.5913,
146.8324,
155.5635,
164.8138,
174.6141,
184.9972,
195.9977,
207.6523,
220,
233.0819,
246.9417,
261.6255,
277.1826,
293.6648,
311.127,
329.6276,
349.2282,
369.9944,
391.9954,
415.3047,
440,
466.1638,
493.8833,
523.2511,
554.3653,
587.3295,
622.254,
659.2551,
698.4565,
739.9888,
783.9908,
830.6094,
880,
932.3276,
987.7666,
1046.502,
1108.731,
1174.659,
1244.508,
1318.51,
1396.913,
1479.978,
1567.982,
1661.219,
1760,
1864.655,
1975.533,
2093.004,
2217.461,
2349.318,
2489.016,
2637.02,
2793.826,
2959.955,
3135.963,
3322.438,
3520,
3729.31,
3951.067,
4186.009,
4434.922,
4698.637,
4978.032,
5274.041,
5587.652,
5919.911,
6271.926,
6644.875,
7040,
7458.622,
7902.132,
8372.018,
8869.845,
9397.271,
9956.063,
10548.08,
11175.3,
11839.82,
12543.86
};
0
0
3

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0