Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: AOTTrigon I2CEEPROM MCP4922 AQM0802A mbed
Fork of NuMidi401 by
Revision 24:f93b49b4cd66, committed 2015-01-31
- Comitter:
- kb10uy
- Date:
- Sat Jan 31 10:54:13 2015 +0000
- Parent:
- 23:deb76bdf6f03
- Commit message:
- NRPN 20h xxh???
Changed in this revision
diff -r deb76bdf6f03 -r f93b49b4cd66 FMOscillator/FMAlgorithm.h --- a/FMOscillator/FMAlgorithm.h Sat Jan 31 10:44:08 2015 +0000 +++ b/FMOscillator/FMAlgorithm.h Sat Jan 31 10:54:13 2015 +0000 @@ -22,6 +22,10 @@ FMAlgorithm(); FMAlgorithm(int opc, int cnc, Timer *tm, AOTTrigon *tri); ~FMAlgorithm(); + FMOperator* getOperator(int idx) { + if (idx < opcount) return operators[idx]; + return operators[idx]; + } void setConnection(int t, int s); void setConnectionIndex(int id); void enableCurrentConnection();
diff -r deb76bdf6f03 -r f93b49b4cd66 FMOscillator/MIDIChannel.NRPNFunction.cpp --- a/FMOscillator/MIDIChannel.NRPNFunction.cpp Sat Jan 31 10:44:08 2015 +0000 +++ b/FMOscillator/MIDIChannel.NRPNFunction.cpp Sat Jan 31 10:54:13 2015 +0000 @@ -79,7 +79,35 @@ void MIDIChannel::nrpnOperator() { - + switch(nrpnLSB) { + case 0x01: + algo->getOperator(dataEntryMSB)->setAttack(dataEntryLSB); + break; + case 0x02: + algo->getOperator(dataEntryMSB)->setDecay(dataEntryLSB); + break; + case 0x03: + algo->getOperator(dataEntryMSB)->setSustain(dataEntryLSB); + break; + case 0x04: + algo->getOperator(dataEntryMSB)->setSustainRate(dataEntryLSB); + break; + case 0x05: + algo->getOperator(dataEntryMSB)->setRelease(dataEntryLSB); + break; + case 0x06: + algo->getOperator(dataEntryMSB)->setFrequencyMultiple(dataEntryLSB); + break; + case 0x07: + algo->getOperator(dataEntryMSB)->setFrequencyMultipleFloating(dataEntryLSB); + break; + case 0x08: + algo->getOperator(dataEntryMSB)->setTotalLevel(dataEntryLSB); + break; + case 0x09: + algo->getOperator(dataEntryMSB)->setFeedback(dataEntryLSB); + break; + } } void MIDIChannel::setStateNRPNOperator()
diff -r deb76bdf6f03 -r f93b49b4cd66 Main.cpp --- a/Main.cpp Sat Jan 31 10:44:08 2015 +0000 +++ b/Main.cpp Sat Jan 31 10:54:13 2015 +0000 @@ -8,8 +8,8 @@ Serial midiserial(USBTX,USBRX); FMOscillator *fm; -const double smpps = 40000.0; -const double smpus = 1000000.0 / smpps; +//const double smpps = 40000.0; +//const double smpus = 1000000.0 / smpps; double ntime = 0.0;