Nucleo F401REでFM音源を実装するやつ 外部DACとオペアンプを利用 現在はMCP4922とNJM2737
Dependencies: AOTTrigon I2CEEPROM MCP4922 AQM0802A mbed
Fork of NuMidi401 by
NuFM401
Nucleo F401用の自作ソフトウェアMIDI音源
概要
だいたいそんなもんです。
特徴
- ブレッドボードの上で組める程度には簡単な回路構成
- 外部のDACにMCP4922を採用
- 念のためのボルテージフォロアとしてNJM2737Dを採用
- バンク用EEPROMに24FC1025を採用
- シリアル経由でMIDIデータを受信することで操作
補足
シリアル <=> MIDI のドライバにはHairless-MIDISerialをオススメします。 仮想MIDIケーブルはとりあえずMIDI Yokeで。
MIDIUtil.cpp@7:439c57c20593, 2014-12-29 (annotated)
- Committer:
- kb10uy
- Date:
- Mon Dec 29 02:34:12 2014 +0000
- Revision:
- 7:439c57c20593
- Child:
- 10:0ffdefe75566
Operator?????
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
kb10uy | 7:439c57c20593 | 1 | |
kb10uy | 7:439c57c20593 | 2 | double notenumfreqs[]={ |
kb10uy | 7:439c57c20593 | 3 | 8.175799, |
kb10uy | 7:439c57c20593 | 4 | 8.661957, |
kb10uy | 7:439c57c20593 | 5 | 9.177024, |
kb10uy | 7:439c57c20593 | 6 | 9.722718, |
kb10uy | 7:439c57c20593 | 7 | 10.300861, |
kb10uy | 7:439c57c20593 | 8 | 10.913382, |
kb10uy | 7:439c57c20593 | 9 | 11.562326, |
kb10uy | 7:439c57c20593 | 10 | 12.249857, |
kb10uy | 7:439c57c20593 | 11 | 12.978272, |
kb10uy | 7:439c57c20593 | 12 | 13.750000, |
kb10uy | 7:439c57c20593 | 13 | 14.567618, |
kb10uy | 7:439c57c20593 | 14 | 15.433853, |
kb10uy | 7:439c57c20593 | 15 | 16.351598, |
kb10uy | 7:439c57c20593 | 16 | 17.323914, |
kb10uy | 7:439c57c20593 | 17 | 18.354048, |
kb10uy | 7:439c57c20593 | 18 | 19.445436, |
kb10uy | 7:439c57c20593 | 19 | 20.601722, |
kb10uy | 7:439c57c20593 | 20 | 21.826764, |
kb10uy | 7:439c57c20593 | 21 | 23.124651, |
kb10uy | 7:439c57c20593 | 22 | 24.499715, |
kb10uy | 7:439c57c20593 | 23 | 25.956544, |
kb10uy | 7:439c57c20593 | 24 | 27.500000, |
kb10uy | 7:439c57c20593 | 25 | 29.135235, |
kb10uy | 7:439c57c20593 | 26 | 30.867706, |
kb10uy | 7:439c57c20593 | 27 | 32.703196, |
kb10uy | 7:439c57c20593 | 28 | 34.647829, |
kb10uy | 7:439c57c20593 | 29 | 36.708096, |
kb10uy | 7:439c57c20593 | 30 | 38.890873, |
kb10uy | 7:439c57c20593 | 31 | 41.203445, |
kb10uy | 7:439c57c20593 | 32 | 43.653529, |
kb10uy | 7:439c57c20593 | 33 | 46.249303, |
kb10uy | 7:439c57c20593 | 34 | 48.999429, |
kb10uy | 7:439c57c20593 | 35 | 51.913087, |
kb10uy | 7:439c57c20593 | 36 | 55.000000, |
kb10uy | 7:439c57c20593 | 37 | 58.270470, |
kb10uy | 7:439c57c20593 | 38 | 61.735413, |
kb10uy | 7:439c57c20593 | 39 | 65.406391, |
kb10uy | 7:439c57c20593 | 40 | 69.295658, |
kb10uy | 7:439c57c20593 | 41 | 73.416192, |
kb10uy | 7:439c57c20593 | 42 | 77.781746, |
kb10uy | 7:439c57c20593 | 43 | 82.406889, |
kb10uy | 7:439c57c20593 | 44 | 87.307058, |
kb10uy | 7:439c57c20593 | 45 | 92.498606, |
kb10uy | 7:439c57c20593 | 46 | 97.998859, |
kb10uy | 7:439c57c20593 | 47 | 103.826174, |
kb10uy | 7:439c57c20593 | 48 | 110.000000, |
kb10uy | 7:439c57c20593 | 49 | 116.540940, |
kb10uy | 7:439c57c20593 | 50 | 123.470825, |
kb10uy | 7:439c57c20593 | 51 | 130.812783, |
kb10uy | 7:439c57c20593 | 52 | 138.591315, |
kb10uy | 7:439c57c20593 | 53 | 146.832384, |
kb10uy | 7:439c57c20593 | 54 | 155.563492, |
kb10uy | 7:439c57c20593 | 55 | 164.813778, |
kb10uy | 7:439c57c20593 | 56 | 174.614116, |
kb10uy | 7:439c57c20593 | 57 | 184.997211, |
kb10uy | 7:439c57c20593 | 58 | 195.997718, |
kb10uy | 7:439c57c20593 | 59 | 207.652349, |
kb10uy | 7:439c57c20593 | 60 | 220.000000, |
kb10uy | 7:439c57c20593 | 61 | 233.081881, |
kb10uy | 7:439c57c20593 | 62 | 246.941651, |
kb10uy | 7:439c57c20593 | 63 | 261.625565, |
kb10uy | 7:439c57c20593 | 64 | 277.182631, |
kb10uy | 7:439c57c20593 | 65 | 293.664768, |
kb10uy | 7:439c57c20593 | 66 | 311.126984, |
kb10uy | 7:439c57c20593 | 67 | 329.627557, |
kb10uy | 7:439c57c20593 | 68 | 349.228231, |
kb10uy | 7:439c57c20593 | 69 | 369.994423, |
kb10uy | 7:439c57c20593 | 70 | 391.995436, |
kb10uy | 7:439c57c20593 | 71 | 415.304698, |
kb10uy | 7:439c57c20593 | 72 | 440.000000, |
kb10uy | 7:439c57c20593 | 73 | 466.163762, |
kb10uy | 7:439c57c20593 | 74 | 493.883301, |
kb10uy | 7:439c57c20593 | 75 | 523.251131, |
kb10uy | 7:439c57c20593 | 76 | 554.365262, |
kb10uy | 7:439c57c20593 | 77 | 587.329536, |
kb10uy | 7:439c57c20593 | 78 | 622.253967, |
kb10uy | 7:439c57c20593 | 79 | 659.255114, |
kb10uy | 7:439c57c20593 | 80 | 698.456463, |
kb10uy | 7:439c57c20593 | 81 | 739.988845, |
kb10uy | 7:439c57c20593 | 82 | 783.990872, |
kb10uy | 7:439c57c20593 | 83 | 830.609395, |
kb10uy | 7:439c57c20593 | 84 | 880.000000, |
kb10uy | 7:439c57c20593 | 85 | 932.327523, |
kb10uy | 7:439c57c20593 | 86 | 987.766603, |
kb10uy | 7:439c57c20593 | 87 | 1046.502261, |
kb10uy | 7:439c57c20593 | 88 | 1108.730524, |
kb10uy | 7:439c57c20593 | 89 | 1174.659072, |
kb10uy | 7:439c57c20593 | 90 | 1244.507935, |
kb10uy | 7:439c57c20593 | 91 | 1318.510228, |
kb10uy | 7:439c57c20593 | 92 | 1396.912926, |
kb10uy | 7:439c57c20593 | 93 | 1479.977691, |
kb10uy | 7:439c57c20593 | 94 | 1567.981744, |
kb10uy | 7:439c57c20593 | 95 | 1661.218790, |
kb10uy | 7:439c57c20593 | 96 | 1760.000000, |
kb10uy | 7:439c57c20593 | 97 | 1864.655046, |
kb10uy | 7:439c57c20593 | 98 | 1975.533205, |
kb10uy | 7:439c57c20593 | 99 | 2093.004522, |
kb10uy | 7:439c57c20593 | 100 | 2217.461048, |
kb10uy | 7:439c57c20593 | 101 | 2349.318143, |
kb10uy | 7:439c57c20593 | 102 | 2489.015870, |
kb10uy | 7:439c57c20593 | 103 | 2637.020455, |
kb10uy | 7:439c57c20593 | 104 | 2793.825851, |
kb10uy | 7:439c57c20593 | 105 | 2959.955382, |
kb10uy | 7:439c57c20593 | 106 | 3135.963488, |
kb10uy | 7:439c57c20593 | 107 | 3322.437581, |
kb10uy | 7:439c57c20593 | 108 | 3520.000000, |
kb10uy | 7:439c57c20593 | 109 | 3729.310092, |
kb10uy | 7:439c57c20593 | 110 | 3951.066410, |
kb10uy | 7:439c57c20593 | 111 | 4186.009045, |
kb10uy | 7:439c57c20593 | 112 | 4434.922096, |
kb10uy | 7:439c57c20593 | 113 | 4698.636287, |
kb10uy | 7:439c57c20593 | 114 | 4978.031740, |
kb10uy | 7:439c57c20593 | 115 | 5274.040911, |
kb10uy | 7:439c57c20593 | 116 | 5587.651703, |
kb10uy | 7:439c57c20593 | 117 | 5919.910763, |
kb10uy | 7:439c57c20593 | 118 | 6271.926976, |
kb10uy | 7:439c57c20593 | 119 | 6644.875161, |
kb10uy | 7:439c57c20593 | 120 | 7040.000000, |
kb10uy | 7:439c57c20593 | 121 | 7458.620184, |
kb10uy | 7:439c57c20593 | 122 | 7902.132820, |
kb10uy | 7:439c57c20593 | 123 | 8372.018090, |
kb10uy | 7:439c57c20593 | 124 | 8869.844191, |
kb10uy | 7:439c57c20593 | 125 | 9397.272573, |
kb10uy | 7:439c57c20593 | 126 | 9956.063479, |
kb10uy | 7:439c57c20593 | 127 | 10548.081821, |
kb10uy | 7:439c57c20593 | 128 | 11175.303406, |
kb10uy | 7:439c57c20593 | 129 | 11839.821527, |
kb10uy | 7:439c57c20593 | 130 | 12543.853951 |
kb10uy | 7:439c57c20593 | 131 | }; |
kb10uy | 7:439c57c20593 | 132 | |
kb10uy | 7:439c57c20593 | 133 | inline double getNoteNumberFrequency(int nn) { |
kb10uy | 7:439c57c20593 | 134 | return notenumfreqs[nn]; |
kb10uy | 7:439c57c20593 | 135 | } |