Nucleo F401REでFM音源を実装するやつ 外部DACとオペアンプを利用 現在はMCP4922とNJM2737

Dependencies:   AOTTrigon I2CEEPROM MCP4922 AQM0802A mbed

Fork of NuMidi401 by Yuu Kobayashi

NuFM401

Nucleo F401用の自作ソフトウェアMIDI音源

概要

だいたいそんなもんです。

特徴

  • ブレッドボードの上で組める程度には簡単な回路構成
  • 外部のDACにMCP4922を採用
  • 念のためのボルテージフォロアとしてNJM2737Dを採用
  • バンク用EEPROMに24FC1025を採用
  • シリアル経由でMIDIデータを受信することで操作

補足

シリアル <=> MIDI のドライバにはHairless-MIDISerialをオススメします。 仮想MIDIケーブルはとりあえずMIDI Yokeで。

Committer:
kb10uy
Date:
Thu Jan 29 11:09:56 2015 +0000
Revision:
20:8278e607a687
Parent:
17:2e577c6000cf
Child:
23:deb76bdf6f03
??

Who changed what in which revision?

UserRevisionLine numberNew 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 17:2e577c6000cf 7 #include "MIDIChannel.h"
kb10uy 16:5cfa8b491882 8 #include <new>
kb10uy 13:e11380ceb460 9
kb10uy 13:e11380ceb460 10 class FMOscillator
kb10uy 13:e11380ceb460 11 {
kb10uy 13:e11380ceb460 12 public:
kb10uy 13:e11380ceb460 13 FMOscillator();
kb10uy 16:5cfa8b491882 14 FMOscillator(int opc, Timer *tim, Serial *ser, AOTTrigon *tri, I2C *i2clcd);
kb10uy 16:5cfa8b491882 15 ~FMOscillator();
kb10uy 13:e11380ceb460 16 private:
kb10uy 13:e11380ceb460 17 Timer *master;
kb10uy 13:e11380ceb460 18 Serial *serial;
kb10uy 13:e11380ceb460 19 AOTTrigon *trigon;
kb10uy 16:5cfa8b491882 20 AQM0802A *lcd;
kb10uy 16:5cfa8b491882 21 FMOperator **operators;
kb10uy 17:2e577c6000cf 22 MIDIChannel **channels;
kb10uy 16:5cfa8b491882 23 int opcount;
kb10uy 13:e11380ceb460 24
kb10uy 13:e11380ceb460 25 void getMIDIMessage();
kb10uy 16:5cfa8b491882 26 void midiReceived();
kb10uy 13:e11380ceb460 27 void getMIDISystemCommonMessage(char t2);
kb10uy 13:e11380ceb460 28 void midiSystemRealtimeMessage(char mes);
kb10uy 13:e11380ceb460 29 void midiNoteOn(char ch, char note, char vel);
kb10uy 13:e11380ceb460 30 void midiNoteOff(char ch, char note, char vel);
kb10uy 13:e11380ceb460 31 void midiPolyphonicKeyPressure(char ch, char note, char vel);
kb10uy 13:e11380ceb460 32 void midiControlChange(char ch, char ctrl, char data);
kb10uy 13:e11380ceb460 33 void midiChannelMode(char ch, char ctrl, char data);
kb10uy 13:e11380ceb460 34 void midiProgramChange(char ch, char prg);
kb10uy 13:e11380ceb460 35 void midiChannelPressure(char ch, char pres);
kb10uy 13:e11380ceb460 36 void midiPitchBend(char ch, short pb);
kb10uy 13:e11380ceb460 37 void midiSystemExclusiveMessage();
kb10uy 20:8278e607a687 38 };