Skip to content

Commit d3aa267

Browse files
committed
DaisySP test patch
1 parent c86cae4 commit d3aa267

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ check: ## run test patches and unit tests
190190
$(MAKE) -s TEST=$$nm test || exit;\
191191
done
192192
@unset PATCHNAME PATCHCLASS PATCHFILE && $(MAKE) PATCHSOURCE=TestPatches/CppTest PATCHNAME=CppTest clean patch web run
193+
@unset PATCHNAME PATCHCLASS PATCHFILE && $(MAKE) PATCHSOURCE=TestPatches/DaisySPTest PATCHNAME=DaisySPTest clean patch web run
193194
@unset PATCHNAME PATCHCLASS PATCHFILE && $(MAKE) PATCHSOURCE=TestPatches/GenTest GEN=MIDItestMinMax clean patch web run
194195
# @unset PATCHNAME PATCHCLASS PATCHFILE && $(MAKE) PATCHSOURCE=TestPatches/FaustTest FAUST=FaustTest clean patch web run # FAUST is not installed for CI
195196
@cp FaustSource/*.h TestPatches/FaustTest && unset PATCHNAME PATCHCLASS PATCHFILE && $(MAKE) PATCHSOURCE=TestPatches/FaustTest PATCHNAME=Faust clean patch web run
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#ifndef __DaisySPTestPatch_hpp__
2+
#define __DaisySPTestPatch_hpp__
3+
4+
#include "OpenWareLibrary.h"
5+
#include "daisysp.h"
6+
7+
class DaisySPTestPatch : public Patch {
8+
public:
9+
daisysp::Oscillator* osc;
10+
11+
DaisySPTestPatch() {
12+
osc = new daisysp::Oscillator();
13+
osc->Init(getSampleRate());
14+
osc->SetFreq(100);
15+
}
16+
~DaisySPTestPatch() {
17+
delete osc;
18+
}
19+
void processAudio(AudioBuffer& buffer) {
20+
FloatArray chan = buffer.getSamples(0);
21+
for (int i = 0; i < chan.getSize(); i++) {
22+
chan[i] = osc->Process();
23+
}
24+
}
25+
};
26+
27+
#endif // __DaisySPTestPatch_hpp__

0 commit comments

Comments
 (0)