aboutsummaryrefslogtreecommitdiffstats
path: root/libs/maxiSynths.h
diff options
context:
space:
mode:
authormick grierson <mickgrierson@gmail.com>2015-09-22 09:21:43 +0100
committermick grierson <mickgrierson@gmail.com>2015-09-22 09:21:43 +0100
commit5be3472f0f61d2e479f42759fed6fafd2a0e739a (patch)
tree49f128d4b56d43b3499ffd824b57b7f8b8d8345a /libs/maxiSynths.h
parentc814dd99dc3c347914c2057b77d1390ba41cfae5 (diff)
more work for kadenze mooc
Diffstat (limited to 'libs/maxiSynths.h')
-rw-r--r--libs/maxiSynths.h187
1 files changed, 187 insertions, 0 deletions
diff --git a/libs/maxiSynths.h b/libs/maxiSynths.h
new file mode 100644
index 0000000..e513346
--- /dev/null
+++ b/libs/maxiSynths.h
@@ -0,0 +1,187 @@
+//
+// maxiSynths.h
+// granular
+//
+// Created by Michael Grierson on 16/08/2015.
+//
+//
+
+#ifndef __granular__maxiSynths__
+#define __granular__maxiSynths__
+
+#include <stdio.h>
+#include <iostream>
+#include <fstream>
+#include <string.h>
+#include <cstdlib>
+#include "math.h"
+#include "maximilian.h"
+
+
+class maxiKick {
+
+public:
+ maxiKick();
+ double play();
+ void setPitch(double pitch);
+ void setRelease(double releaseD);
+ void trigger();
+ double pitch;
+ double output = 0 ;
+ double outputD =0 ;
+ double envOut;
+ bool useDistortion = false;
+ bool useLimiter = false;
+ bool useFilter = false;
+ double distortion = 0;
+ bool inverse = false;
+ double cutoff;
+ double resonance;
+ double gain = 1;
+ maxiOsc kick;
+ maxiEnv envelope;
+ maxiDistortion distort;
+ maxiFilter filter;
+};
+
+class maxiSnare {
+public:
+ maxiSnare();
+ double play();
+ void setPitch(double pitch);
+ void setRelease(double releaseD);
+ void trigger();
+ double pitch;
+ double output = 0 ;
+ double outputD = 0 ;
+ double envOut;
+ bool useDistortion = false;
+ bool useLimiter = false;
+ bool useFilter = true;
+ double distortion = 0;
+ bool inverse = false;
+ double cutoff;
+ double resonance;
+ double gain = 1;
+ maxiOsc tone;
+ maxiOsc noise;
+ maxiEnv envelope;
+ maxiDistortion distort;
+ maxiFilter filter;
+
+
+
+};
+
+class maxiHats {
+
+public:
+ maxiHats();
+ double play();
+ void setPitch(double pitch);
+ void setRelease(double releaseD);
+ void trigger();
+ double pitch;
+ double output = 0;
+ double outputD = 0;
+ double envOut;
+ bool useDistortion = false;
+ bool useLimiter = false;
+ bool useFilter = false;
+ double distortion = 0;
+ bool inverse = false;
+ double cutoff;
+ double resonance;
+ double gain = 1;
+ maxiOsc tone;
+ maxiOsc noise;
+ maxiEnv envelope;
+ maxiDistortion distort;
+ maxiSVF filter;
+
+
+};
+
+
+class maxiSynth {
+
+
+
+};
+
+
+class granularSynth {
+
+
+
+};
+
+
+class maxiSampler {
+
+public:
+ maxiSampler();
+ double play();
+ void setPitch(double pitch, bool setall=false);
+ void midiNoteOn(double pitch, double velocity, bool setall=false);
+ void midiNoteOff(double pitch, double velocity, bool setall=false);
+ void setAttack(double attackD,bool setall=true);
+ void setDecay(double decayD,bool setall=true);
+ void setSustain(double sustainD,bool setall=true);
+ void setRelease(double releaseD,bool setall=true);
+ void setPosition(double positionD,bool setall=true);
+ void load(string inFile,bool setall=true);
+ void setNumVoices(int numVoices);
+ double position;
+ void trigger();
+ double pitch[32];
+ int originalPitch=67;
+ double outputs[32];
+ double outputD = 0;
+ double envOut[32];
+ double envOutGain[32];
+ double output;
+ bool useDistortion = false;
+ bool useLimiter = false;
+ bool useFilter = false;
+ double distortion = 0;
+ bool inverse = false;
+ double cutoff;
+ double resonance;
+ double gain = 1;
+ int voices;
+ int currentVoice=0;
+ convert mtof;
+ maxiOsc LFO1;
+ maxiOsc LFO2;
+ maxiOsc LFO3;
+ maxiOsc LFO4;
+ maxiSample samples[32];
+ maxiEnv envelopes[32];
+ maxiDistortion distort;
+ maxiSVF filters[32];
+ bool sustain = true;
+
+
+};
+
+class maxiClock {
+public:
+ maxiClock();
+ void ticker();
+ void setTempo(double bpm);
+ void setTicksPerBeat(int ticksPerBeat);
+ maxiOsc timer;
+ int currentCount;
+ int lastCount;
+ int playHead;
+ double bps;
+ double bpm;
+ int ticks;
+ bool tick;
+
+};
+
+
+
+#endif \ No newline at end of file