diff --git a/src/main_blink.cc b/src/main_blink.cc deleted file mode 100644 index ae45583..0000000 --- a/src/main_blink.cc +++ /dev/null @@ -1,16 +0,0 @@ -#include "daisy_seed.h" - -using namespace daisy; - -static DaisySeed hw{}; - -int main() -{ - hw.Init(); - while (true) { - hw.SetLed(true); - hw.DelayMs(100); - hw.SetLed(false); - hw.DelayMs(500); - } -} diff --git a/src/main_testtone.cc b/src/main_testtone.cc deleted file mode 100644 index ee399ed..0000000 --- a/src/main_testtone.cc +++ /dev/null @@ -1,51 +0,0 @@ -#include "daisy_seed.h" -#include "daisysp.h" - -// Use the daisy namespace to prevent having to type -// daisy:: before all libdaisy functions -using namespace daisy; -using namespace daisysp; - -// Declare a DaisySeed object called hardware -DaisySeed hardware; -Oscillator osc; - -void AudioCallback( - AudioHandle::InterleavingInputBuffer in, - AudioHandle::InterleavingOutputBuffer out, - size_t size) -{ - float osc_out; - - //Convert floating point knob to midi (0-127) - //Then convert midi to freq. in Hz - osc.SetFreq(1000); - - //Fill the block with samples - for (size_t i = 0; i < size; i += 2) { - osc.SetAmp(1.0); - osc_out = osc.Process(); - osc_out *= 0.1; - out[i] = osc_out; - out[i + 1] = osc_out; - } -} - - -int main(void) -{ - hardware.Configure(); - hardware.Init(); - hardware.SetAudioBlockSize(4); - - float samplerate = hardware.AudioSampleRate(); - - osc.Init(samplerate); - osc.SetWaveform(osc.WAVE_SIN); - osc.SetAmp(1.f); - osc.SetFreq(1000); - - hardware.StartAudio(AudioCallback); - - for (;;) {} -}