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
Diff: FMOscillator/FMAlgorithm.h
- Revision:
- 21:e3014c1bdf9c
- Parent:
- 19:f0dcf591c5dd
- Child:
- 23:deb76bdf6f03
--- a/FMOscillator/FMAlgorithm.h Thu Jan 29 11:09:56 2015 +0000
+++ b/FMOscillator/FMAlgorithm.h Thu Jan 29 12:27:21 2015 +0000
@@ -8,9 +8,11 @@
FMAlgorithmConnection() {
target = 0;
source = 0;
+ allocated = false;
}
int target;
int source;
+ bool allocated;
};
class FMAlgorithm
@@ -21,9 +23,15 @@
~FMAlgorithm();
void setOperator(int num, FMOperator *op);
void setConnection(int num, int t, int s);
+ float calculate();
+ void noteOn(float freq, double time);
+ void noteOff(double time);
+
private:
int opcount;
int cncount;
FMOperator **operators;
FMAlgorithmConnection *connections;
+
+ float calculate(int opn);
};
