everything compiles fine, make program-dfu gets it on the board, but my poteniometers have no effect on the parameters. Have checked the potentiometer with Knob seed example, and LED corresponds to pot resistance, so wiring should be fine.
Right off the bat, you’ll want to use your filterCutoff Parameter in updatePotentiometers(), not knob1 (which is an AnalogControl).
i.e. flt.SetFreq(filterCutoff.Process());
In the future, could you upload the whole file somewhere? In this example it’s hard to tell right away exactly what knob1, filterCutoff, etc. are.
Additionally there could be mistakes elsewhere in the code.
Thanks for the reply! I took the time to test again to make sure, but the code at the dropbox link passes filtered audio, but doesn’t respond to potentiometer changes.
I based the adc knob initialization on of the pod MultiEffects.cpp example.
It looks like your code is okay, but a few things I can suggest for trouble shooting.
I don’t think you mentioned above, but is resonance working, just not cutoff?
Also, you can try to confirm the the AnalogControls are working as expected by doing a simple linear scale/offset with its output before using the parameters. Something like:
One other thing that doesn’t necessarily have an effect on whether it works or not, but makes it a little trickier to find where the issue might be, is the scope of variables. Many of the globals are correct, and/or necessary, but a few of them make it a little harder to trouble shoot (like freq and res, that seem to only be needed in the UpdatePotentiometers() function).
and still I have no effect. Again, the pots successfully control the Knob example. It seems like they aren’t updating or something? I am programming via make program-dfu if that would matter.
Sorry about the code formatting, the reason the scope of my variables is global is that I am debugging this problem I appreciate the help! I love daisy so far, even though I have yet to solve this basic problem…
Your code works for me on the pod, but I had to change the knob1 and knob2 pin numbers to 21 and 15 respectively to match the pod. If you followed the knob schematic exactly, your pots will be on 21 and 15 as well.
One other thing to change. In the callback you’re processing both the left and right inputs through one filter. You can either have two identical filters, one for left and one for right, and then pass their outputs to left out and right out. Or you can just pass one input to the filter and then pass that output to both left and right. You choice there.
Hey, thanks again for your help. I added the stereo fitlers as you suggested. Then I took the daisy back to the breadboard and realized that the pinout I was using
differs from the one included in the examples on github.
I have the pots as parameters working now that I can see AGND… thanks again for your help!
This (Knob example controlling cutoff and resonance of a filter over a simple wave) cleaned up the way you think works best would make a great addition to the examples - as a styleguide how to best do this in C++ and Arduino. I think it would help a lot of users.