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@13:e11380ceb460, 2015-01-17 (annotated)
- Committer:
- kb10uy
- Date:
- Sat Jan 17 03:57:58 2015 +0000
- Revision:
- 13:e11380ceb460
- Child:
- 16:5cfa8b491882
MIDI.cpp??Operator.cpp????FMOscillator???????????????
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 | 13:e11380ceb460 | 3 | #include "AOTTrigon.h" |
kb10uy | 13:e11380ceb460 | 4 | #include "FMOperator.h" |
kb10uy | 13:e11380ceb460 | 5 | #include "MIDIUtil.h" |
kb10uy | 13:e11380ceb460 | 6 | |
kb10uy | 13:e11380ceb460 | 7 | class FMOscillator |
kb10uy | 13:e11380ceb460 | 8 | { |
kb10uy | 13:e11380ceb460 | 9 | public: |
kb10uy | 13:e11380ceb460 | 10 | FMOscillator(); |
kb10uy | 13:e11380ceb460 | 11 | FMOscillator(Timer *timer, Serial *serial, AOTTrigon *trigon); |
kb10uy | 13:e11380ceb460 | 12 | |
kb10uy | 13:e11380ceb460 | 13 | private: |
kb10uy | 13:e11380ceb460 | 14 | Timer *master; |
kb10uy | 13:e11380ceb460 | 15 | Serial *serial; |
kb10uy | 13:e11380ceb460 | 16 | AOTTrigon *trigon; |
kb10uy | 13:e11380ceb460 | 17 | FMOperator op[64]; |
kb10uy | 13:e11380ceb460 | 18 | |
kb10uy | 13:e11380ceb460 | 19 | void getMIDIMessage(); |
kb10uy | 13:e11380ceb460 | 20 | void getMIDISystemCommonMessage(char t2); |
kb10uy | 13:e11380ceb460 | 21 | void midiSystemRealtimeMessage(char mes); |
kb10uy | 13:e11380ceb460 | 22 | void midiNoteOn(char ch, char note, char vel); |
kb10uy | 13:e11380ceb460 | 23 | void midiNoteOff(char ch, char note, char vel); |
kb10uy | 13:e11380ceb460 | 24 | void midiPolyphonicKeyPressure(char ch, char note, char vel); |
kb10uy | 13:e11380ceb460 | 25 | void midiControlChange(char ch, char ctrl, char data); |
kb10uy | 13:e11380ceb460 | 26 | void midiChannelMode(char ch, char ctrl, char data); |
kb10uy | 13:e11380ceb460 | 27 | void midiProgramChange(char ch, char prg); |
kb10uy | 13:e11380ceb460 | 28 | void midiChannelPressure(char ch, char pres); |
kb10uy | 13:e11380ceb460 | 29 | void midiPitchBend(char ch, short pb); |
kb10uy | 13:e11380ceb460 | 30 | void midiSystemExclusiveMessage(); |
kb10uy | 13:e11380ceb460 | 31 | }; |