Conversation
There was a problem hiding this comment.
Everything in the .vscode dir should be the same as the Patch example.
There was a problem hiding this comment.
Nothing in the dsp dir has been modified from the Patch example.
| dsp/string.cpp \ | ||
| dsp/string_synth_part.cpp \ | ||
| resources.cpp \ | ||
| calibrate.cpp \ |
There was a problem hiding this comment.
Only this line has changed from the Patch example.
There was a problem hiding this comment.
Updated with new instructions.
There was a problem hiding this comment.
This class is new. The implementation is largely from electro-smith/libDaisy#397 (comment).
There was a problem hiding this comment.
The resources files are unchanged from the Patch example.
There was a problem hiding this comment.
This file has been updated to handle the increased number of controls and to remove the screen UI.
| if(settings_data.easter_egg_on) | ||
| { | ||
| for(size_t i = 0; i < size; ++i) | ||
| { | ||
| input[i] = in[0][i]; | ||
| } | ||
| strummer.Process(NULL, size, &performance_state); | ||
| string_synth.Process( | ||
| performance_state, patch, input, output, aux, size); | ||
| } | ||
| else | ||
| { | ||
| // Apply noise gate. | ||
| for(size_t i = 0; i < size; i++) | ||
| { | ||
| float in_sample = in[0][i]; | ||
| float error, gain; | ||
| error = in_sample * in_sample - in_level; | ||
| in_level += error * (error > 0.0f ? 0.1f : 0.0001f); | ||
| gain = in_level <= kNoiseGateThreshold | ||
| ? (1.0f / kNoiseGateThreshold) * in_level | ||
| : 1.0f; | ||
| input[i] = gain * in_sample; | ||
| } | ||
|
|
||
| strummer.Process(input, size, &performance_state); | ||
| part.Process(performance_state, patch, input, output, aux, size); | ||
| } | ||
|
|
||
| for(size_t i = 0; i < size; i++) | ||
| { | ||
| out[0][i] = output[i]; | ||
| out[1][i] = aux[i]; | ||
| } |
| while(1) | ||
| { | ||
| // Without this pause the save events get missed for some unknown reason. | ||
| hw.Delay(1); |
There was a problem hiding this comment.
I'd love to know what's going on here. If I don't have this delay and trigger_save becomes true it never gets picked up. I only discovered this because it worked if I had other processing happening in the while loop. I tried throttling with a timer but that had no effect.
This is a port of the Torus (MI Rings) example to the patch.Init(). I've added a few enhancements to make it a bit more fully featured (v/oct and calibration, CV control of some params etc.)
I'll leave some comments about what has been modified from the Patch example.