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/FMOscillator.h@16:5cfa8b491882, 2015-01-26 (annotated)
- Committer:
- kb10uy
- Date:
- Mon Jan 26 13:26:34 2015 +0000
- Revision:
- 16:5cfa8b491882
- Parent:
- 13:e11380ceb460
- Child:
- 17:2e577c6000cf
LCD?????????????????????
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
kb10uy | 13:e11380ceb460 | 1 | #pragma once |
kb10uy | 13:e11380ceb460 | 2 | #include "mbed.h" |
kb10uy | 16:5cfa8b491882 | 3 | #include "AQM0802A.h" |
kb10uy | 13:e11380ceb460 | 4 | #include "AOTTrigon.h" |
kb10uy | 13:e11380ceb460 | 5 | #include "FMOperator.h" |
kb10uy | 13:e11380ceb460 | 6 | #include "MIDIUtil.h" |
kb10uy | 16:5cfa8b491882 | 7 | #include <new> |
kb10uy | 13:e11380ceb460 | 8 | |
kb10uy | 13:e11380ceb460 | 9 | class FMOscillator |
kb10uy | 13:e11380ceb460 | 10 | { |
kb10uy | 13:e11380ceb460 | 11 | public: |
kb10uy | 13:e11380ceb460 | 12 | FMOscillator(); |
kb10uy | 16:5cfa8b491882 | 13 | FMOscillator(int opc, Timer *tim, Serial *ser, AOTTrigon *tri, I2C *i2clcd); |
kb10uy | 16:5cfa8b491882 | 14 | ~FMOscillator(); |
kb10uy | 13:e11380ceb460 | 15 | private: |
kb10uy | 13:e11380ceb460 | 16 | Timer *master; |
kb10uy | 13:e11380ceb460 | 17 | Serial *serial; |
kb10uy | 13:e11380ceb460 | 18 | AOTTrigon *trigon; |
kb10uy | 16:5cfa8b491882 | 19 | AQM0802A *lcd; |
kb10uy | 16:5cfa8b491882 | 20 | FMOperator **operators; |
kb10uy | 16:5cfa8b491882 | 21 | int opcount; |
kb10uy | 13:e11380ceb460 | 22 | |
kb10uy | 13:e11380ceb460 | 23 | void getMIDIMessage(); |
kb10uy | 16:5cfa8b491882 | 24 | void midiReceived(); |
kb10uy | 13:e11380ceb460 | 25 | void getMIDISystemCommonMessage(char t2); |
kb10uy | 13:e11380ceb460 | 26 | void midiSystemRealtimeMessage(char mes); |
kb10uy | 13:e11380ceb460 | 27 | void midiNoteOn(char ch, char note, char vel); |
kb10uy | 13:e11380ceb460 | 28 | void midiNoteOff(char ch, char note, char vel); |
kb10uy | 13:e11380ceb460 | 29 | void midiPolyphonicKeyPressure(char ch, char note, char vel); |
kb10uy | 13:e11380ceb460 | 30 | void midiControlChange(char ch, char ctrl, char data); |
kb10uy | 13:e11380ceb460 | 31 | void midiChannelMode(char ch, char ctrl, char data); |
kb10uy | 13:e11380ceb460 | 32 | void midiProgramChange(char ch, char prg); |
kb10uy | 13:e11380ceb460 | 33 | void midiChannelPressure(char ch, char pres); |
kb10uy | 13:e11380ceb460 | 34 | void midiPitchBend(char ch, short pb); |
kb10uy | 13:e11380ceb460 | 35 | void midiSystemExclusiveMessage(); |
kb10uy | 13:e11380ceb460 | 36 | }; |