@silver2row First make certain the input level for your violin is using up most of the full-scale input. For example, if you have a weak pickup plugged directly to the audio input then maybe the input signal is weak enough that the Klingon Tone just sounds like a mostly linear amplifier rather than a distortion pedal.
Another possibility is related to what input channel the instrument is connected. If using the sketch as-is using with the render.cpp provided it starts the sketch in active (non-bypassed) state during calls made in
setup(), so the effect is probably active unless an unconnected input causes it to toggle after setup.
It runs the effect only on Channel 0 though, and pass-through on Channel 1 so that might be an issue. If your violin is connected to the pass-through channel, then you can switch to the other input and see if you can hear a difference.
Here's a way you can disable the possibility of unintended settings changes from floating (unconnected) analog input channels:
void render(BelaContext *context, void *userData)
//separate audio inputs into their own buffers
format_audio_buffer(context, ch1, 1);
format_audio_buffer(context, ch0, 0);
Comment these two lines as shown below when no knobs or switches are connected:
//Scan analog inputs and set settings
//for(int i = 0; i < N_KNOBS; i++)
Here we see it only runs on ch0
//Run the klingon on ch0
Then see below, ch0 output gets klingon output while output to ch1 just gets the input from ch1.
//Send it to the output
for(unsigned int n = 0; n < context->audioFrames; n++)
// Write klingon through ch0, pass-through ch1
audioWrite(context, n, 0, ch0[n]);
audioWrite(context, n, 1, ch1[n]);
Finally, if you need to make the effect more extreme, I would encourage you to add calls to the settings helper functions from within render.cpp rather than trying to change them in the klingon.cpp file.
For example in render.cpp, you can add these to the end of setup()
bool setup(BelaContext *context, void *userData)
kot_set_drive(kot, 60.0); //set drive gain to 60dB
kot_set_mix(kot,1.0); //maximum hard clipping
kot_set_tone(kot, 0.0 ); //Change value between -60.0 to 0.0 for more high/low emphasis
As a final note, klingon tone emulates a distortion pedal. You might need these final settings changes because it can take quite a lot of distortion to make a violin sound badly distorted. The defaults are set for a nice blues guitar crunch assuming nearly full-range signal input. This default (which sounds good on electric guitar) might simply preserve enough of the natural sound that even though it's making a difference, it is possible the change is too subtle to notice. Changing some of these settings in setup() will make more extreme sounds that you will hear.