Is the Digital/FX filter board supposed to have -31 cutoff?

I have a decent collection of Shruthis with different filter boards, but the Digital/FX stands out in that its cutoff frequency is significantly lower than the others, when I polychain my Shruthis and play the same patches. After a good amount of testing, I’m convinced that the offset is more or less equal to -31, so that every time the polychained Digital/FX is told to switch to a different patch, I have to go into the filter settings and increase the cutoff by a value of 31 before the resonance is at the same frequency as my other units.

As this filter is digital, I doubt the offset cutoff frequency could be caused by errors during the build phase. It must be in the firmware, correct? Reinstalling the firmware has hot helped. So perhaps this offset is in the Digital/FX filter board by design?

Sincerely I don’t remember but I wouldn’t be surprised if it’s there “by design”. The kind of crappy digital filters + ADC + resolution you have on this board doesn’t allow you to reach very high cutoff frequencies. So instead of having all values from 100 to 128 sound the same because of this limitation, I might have shifted the range of the cutoff down by 28 or so…

Thanks, it’s good to know that there’s nothing wrong with the hardware.

Am I right that if I want to modify how the cutoff is set in the firmware, I need to look into these lines in resources.py:

96 sr = 20000000 / 510.0
97 cv = numpy.arange(0, 256.0)
98 cutoff = numpy.minimum(sr / 2, 1.5 * sr / 2 * 2 **** (-(128 - cv / 2.0) / 12.0))

Hmmm looks like there’s no offset after all. You can mess with the line you gave (increasing the 1.5 factor) but maybe you tuned all your other filters too high?

I’m guessing this is a case of RTFM, but I seem to be stuck:

So today I finally got myself an ISP programmer (avrispmkii), and I decided to try tweaking these values myself. I did some test builds of the Shruthi firmware with great success, so my environment seems to be set up right. But I get an error message in Terminal when I hook up my ISP programmer to the DSP board and run ‘make -f dsp/makefile bake’ on my running Shruthi. So right now I have a DSP board that I think is wiped clean, and of course my Shruthi doesn’t make a sound any more :’(

  • How do I generate this dsp.hex file that it’s asking for? ‘make resources’ seems only to work on the shruthi resources (dsp/resources.cc is left untouched). Terminal output below:

$ make -f dsp/makefile bake
/usr/local/CrossPack-AVR/bin/avrdude -V -p m328p -C /usr/local/CrossPack-AVR/etc/avrdude.conf -c avrispmkII -P usb -B 10 -e -u \\
-U efuse:w:0xfd:m \\
-U hfuse:w:0xd7:m \\
-U lfuse:w:0xff:m \\
-U lock:w:0x2f:m

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f
avrdude: erasing chip
avrdude: reading input file "0xfd"
avrdude: writing efuse (1 bytes):

Writing | | 0% 0.00s *****failed;
Writing | ################################################## | 100% 0.03s

avrdude: 1 bytes of efuse written
(…lots of repeating write sequences edited out…everything seems normal…)
avrdude: 1 bytes of lock written

avrdude done. Thank you.

/usr/local/CrossPack-AVR/bin/avrdude -V -p m328p -C /usr/local/CrossPack-AVR/etc/avrdude.conf -c avrispmkII -P usb -B 1 \\
-U flash:w:build/dsp/dsp.hex:i -U lock:w:0x2f:m

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "build/dsp/dsp.hex"
avrdude: can’t open input file build/dsp/dsp.hex: No such file or directory
avrdude: write to file ‘build/dsp/dsp.hex’ failed

avrdude: safemode: Fuses OK

avrdude done. Thank you.

make: ***** [bake] Error 1

Just a “make -f dsp/makefile” seems to build the .hex file for me.

Rebuild the resources files:

touch dsp/resources/resources.py && make -f dsp/makefile

Make the hex:

make -f dsp/makefile

Thanks both of you, that worked just fine!

Also, I think my Shruthi with DSP filter now sounds correct. (I’ll have to do some more testing and comparisons to be sure, but it sounds promising so far). So my initial “-31 cutoff” assessment could have been due to a corrupted memory on the MCU (if that’s the right term). I’ll append the thread title with ‘solved’ as soon as I’ve confirmed everything.

I feel bad asking this, but does anyone have a built .hex file I could download? I am on OSX and my toolchain is all sorts of messed up…

The file is here (dsp_0.1.hex)