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で。
FMOscillator/MIDIUtil.h@24:f93b49b4cd66, 2015-01-31 (annotated)
- Committer:
- kb10uy
- Date:
- Sat Jan 31 10:54:13 2015 +0000
- Revision:
- 24:f93b49b4cd66
- Parent:
- 13:e11380ceb460
NRPN 20h xxh???
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
kb10uy | 7:439c57c20593 | 1 | #pragma once |
kb10uy | 7:439c57c20593 | 2 | |
kb10uy | 10:0ffdefe75566 | 3 | extern float notenumfreqs[]; |
kb10uy | 10:0ffdefe75566 | 4 | |
kb10uy | 10:0ffdefe75566 | 5 | inline float getNoteNumberFrequency(int nn) { |
kb10uy | 10:0ffdefe75566 | 6 | return notenumfreqs[nn]; |
kb10uy | 11:62da91a1eaf1 | 7 | } |
kb10uy | 11:62da91a1eaf1 | 8 | |
kb10uy | 11:62da91a1eaf1 | 9 | enum MIDIMessageType{ |
kb10uy | 11:62da91a1eaf1 | 10 | NoteOn, |
kb10uy | 11:62da91a1eaf1 | 11 | NoteOff, |
kb10uy | 11:62da91a1eaf1 | 12 | PolyphonicKeyPressure, |
kb10uy | 11:62da91a1eaf1 | 13 | ControlChange, |
kb10uy | 11:62da91a1eaf1 | 14 | ProgramChange, |
kb10uy | 11:62da91a1eaf1 | 15 | ChannelPressure, |
kb10uy | 11:62da91a1eaf1 | 16 | PitchBend, |
kb10uy | 11:62da91a1eaf1 | 17 | ChannelMode, |
kb10uy | 11:62da91a1eaf1 | 18 | SystemCommon, |
kb10uy | 11:62da91a1eaf1 | 19 | SystemRealtime, |
kb10uy | 11:62da91a1eaf1 | 20 | }; |
kb10uy | 11:62da91a1eaf1 | 21 | |
kb10uy | 11:62da91a1eaf1 | 22 | typedef struct { |
kb10uy | 11:62da91a1eaf1 | 23 | MIDIMessageType type; |
kb10uy | 11:62da91a1eaf1 | 24 | char channel; |
kb10uy | 11:62da91a1eaf1 | 25 | union { |
kb10uy | 11:62da91a1eaf1 | 26 | char note; |
kb10uy | 11:62da91a1eaf1 | 27 | char control; |
kb10uy | 11:62da91a1eaf1 | 28 | char program; |
kb10uy | 11:62da91a1eaf1 | 29 | char LSB; |
kb10uy | 11:62da91a1eaf1 | 30 | }; |
kb10uy | 11:62da91a1eaf1 | 31 | union { |
kb10uy | 11:62da91a1eaf1 | 32 | char velocity; |
kb10uy | 11:62da91a1eaf1 | 33 | char pressure; |
kb10uy | 11:62da91a1eaf1 | 34 | char data; |
kb10uy | 11:62da91a1eaf1 | 35 | char MSB; |
kb10uy | 11:62da91a1eaf1 | 36 | }; |
kb10uy | 11:62da91a1eaf1 | 37 | } MidiMessage; |