Skip to content

Commit e9dc33d

Browse files
authored
Merge pull request #105 from antisvin/feature/daisysp-update
DaisySP update and test
2 parents ef22cf5 + c358d1b commit e9dc33d

4 files changed

Lines changed: 41 additions & 1 deletion

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__

native.mk

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,23 @@ BUILDSOURCE = $(BUILD)/Source
1616
TESTPATCHES = $(BUILDROOT)/TestPatches
1717
DSPINC = $(BUILDROOT)/Libraries/CMSIS/DSP/Include
1818
DSPLIB = $(BUILDROOT)/Libraries/CMSIS/DSP/Source
19+
DAISYSP = $(BUILDROOT)/Libraries/DaisySP/Source
1920
CPPFLAGS += -I$(SOURCE)
2021
CPPFLAGS += -I$(PATCHSOURCE)
2122
CPPFLAGS += -I$(LIBSOURCE)
2223
CPPFLAGS += -I$(BUILDSOURCE)
2324
CPPFLAGS += -I$(TESTPATCHES)
2425
CPPFLAGS += -I$(DSPINC)
26+
CPPFLAGS += -I$(DAISYSP)
27+
CPPFLAGS += -I$(DAISYSP)/Control
28+
CPPFLAGS += -I$(DAISYSP)/Drums
29+
CPPFLAGS += -I$(DAISYSP)/Dynamics
30+
CPPFLAGS += -I$(DAISYSP)/Effects
31+
CPPFLAGS += -I$(DAISYSP)/Filters
32+
CPPFLAGS += -I$(DAISYSP)/Noise
33+
CPPFLAGS += -I$(DAISYSP)/PhysicalModeling
34+
CPPFLAGS += -I$(DAISYSP)/Synthesis
35+
CPPFLAGS += -I$(DAISYSP)/Utility
2536
CPPFLAGS += -ILibraries -ILibraries/KissFFT
2637
CPPFLAGS += -D__PROGRAM_START=1 # prevent compilation of __cmsis_start function
2738
CPPFLAGS += "-DPATCHNAME=\"$(PATCHNAME)\""
@@ -55,6 +66,7 @@ C_SRC += $(wildcard $(BUILDSOURCE)/*.c)
5566
CPP_SRC += $(wildcard $(BUILDSOURCE)/*.cpp)
5667
C_SRC += $(wildcard $(PATCHSOURCE)/*.c)
5768
CPP_SRC += $(wildcard $(PATCHSOURCE)/*.cpp)
69+
CPP_SRC += $(wildcard $(DAISYSP)/*/*.cpp)
5870
ifdef MAXIMILIAN
5971
CPP_SRC := $(filter-out $(PATCHSOURCE)/$(MAXIMILIAN).cpp, $(CPP_SRC))
6072
endif

0 commit comments

Comments
 (0)