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:
Sat Jan 31 10:44:08 2015 +0000
Revision:
23:deb76bdf6f03
Parent:
20:8278e607a687
NRPN 10h xxh???

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 23:deb76bdf6f03 14 FMOscillator(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 17:2e577c6000cf 21 MIDIChannel **channels;
kb10uy 16:5cfa8b491882 22 int opcount;
kb10uy 13:e11380ceb460 23
kb10uy 13:e11380ceb460 24 void getMIDIMessage();
kb10uy 16:5cfa8b491882 25 void midiReceived();
kb10uy 13:e11380ceb460 26 void getMIDISystemCommonMessage(char t2);
kb10uy 13:e11380ceb460 27 void midiSystemRealtimeMessage(char mes);
kb10uy 13:e11380ceb460 28 void midiNoteOn(char ch, char note, char vel);
kb10uy 13:e11380ceb460 29 void midiNoteOff(char ch, char note, char vel);
kb10uy 13:e11380ceb460 30 void midiPolyphonicKeyPressure(char ch, char note, char vel);
kb10uy 13:e11380ceb460 31 void midiControlChange(char ch, char ctrl, char data);
kb10uy 13:e11380ceb460 32 void midiChannelMode(char ch, char ctrl, char data);
kb10uy 13:e11380ceb460 33 void midiProgramChange(char ch, char prg);
kb10uy 13:e11380ceb460 34 void midiChannelPressure(char ch, char pres);
kb10uy 13:e11380ceb460 35 void midiPitchBend(char ch, short pb);
kb10uy 13:e11380ceb460 36 void midiSystemExclusiveMessage();
kb10uy 20:8278e607a687 37 };