Skip to content

Commit

Permalink
David Minnix -- created interface for audio generators
Browse files Browse the repository at this point in the history
  • Loading branch information
XiNNiW committed Feb 6, 2017
1 parent 76493a0 commit 15be881
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 5 deletions.
19 changes: 19 additions & 0 deletions due-synth-library/include/IAudioGenerator.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* IAudioGenerator.h
*
* Created on: Feb 6, 2017
* Author: davidminnix
*/

#ifndef INCLUDE_IAUDIOGENERATOR_H_
#define INCLUDE_IAUDIOGENERATOR_H_

class IAudioGenerator{

public:
IAudioGenerator(){}
virtual long nextSample()=0;
virtual ~IAudioGenerator(){};
};

#endif /* INCLUDE_IAUDIOGENERATOR_H_ */
4 changes: 3 additions & 1 deletion due-synth-library/include/IWavetableOscillator.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#ifndef INCLUDE_IWAVETABLEOSCILLATOR_H_
#define INCLUDE_IWAVETABLEOSCILLATOR_H_ 1

class IWavetableOscillator {
#include <IAudioGenerator.h>

class IWavetableOscillator : virtual public IAudioGenerator {

public:
IWavetableOscillator(){};
Expand Down
13 changes: 13 additions & 0 deletions due-synth-library/include/IWavetableSynth.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

#ifndef INCLUDE_IWAVETABLESYNTH_H_
#define INCLUDE_IWAVETABLESYNTH_H_

class IWavetableSynth {

public:
IWavetableSynth();
virtual ~IWavetableSynth();
virtual void playNote(int noteNumber, int velocity);
};

#endif /* INCLUDE_IWAVETABLESYNTH_H_ */
2 changes: 1 addition & 1 deletion due-synth-library/include/SineWavetableOscillator.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "IWavetableOscillator.h"


class SineWavetableOscillator: public IWavetableOscillator {
class SineWavetableOscillator: virtual public IWavetableOscillator {

public:
SineWavetableOscillator();
Expand Down
4 changes: 2 additions & 2 deletions due-synth-runner/.settings/org.eclipse.cdt.core.prefs
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,10 @@ environment/project/it.baeyens.arduino.core.toolChain.release.504661961/A.EXTRA.
environment/project/it.baeyens.arduino.core.toolChain.release.504661961/A.EXTRA.TIME.DTS/value=0
environment/project/it.baeyens.arduino.core.toolChain.release.504661961/A.EXTRA.TIME.LOCAL/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.504661961/A.EXTRA.TIME.LOCAL/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.504661961/A.EXTRA.TIME.LOCAL/value=1486377890
environment/project/it.baeyens.arduino.core.toolChain.release.504661961/A.EXTRA.TIME.LOCAL/value=1486387814
environment/project/it.baeyens.arduino.core.toolChain.release.504661961/A.EXTRA.TIME.UTC/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.504661961/A.EXTRA.TIME.UTC/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.504661961/A.EXTRA.TIME.UTC/value=1486395890
environment/project/it.baeyens.arduino.core.toolChain.release.504661961/A.EXTRA.TIME.UTC/value=1486405814
environment/project/it.baeyens.arduino.core.toolChain.release.504661961/A.EXTRA.TIME.ZONE/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.504661961/A.EXTRA.TIME.ZONE/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.504661961/A.EXTRA.TIME.ZONE/value=-18000
Expand Down
1 change: 0 additions & 1 deletion due-synth-test/src/WavetableSynth_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,5 @@ TEST(TestWavetableSynth, is_calls_next_sample_on_osc_when_called){
synth->nextSample();
synth->nextSample();
synth->nextSample();

}

0 comments on commit 15be881

Please sign in to comment.