1kHz noise with Terrarium board

sonic_explorer

Active member
I am getting an annoying 1kHz noise (and resonances at 2kHz, 3kHz) with the Daisy in the Terrarium pcb. I can turn it on and off by increasing the processing that the Daisy does. Is anyone else experiencing this with the Terrarium specifically?

There is some talk of a 1kHz noise on here on the Electrosmith forum, which suggests to "increase the callback frequency" above human hearing or use a DC-DC isolator like in the Daisy Petal schematic (page 4). Adding a DC-DC isolator to the Terrarium build I have is doable but a bit tough, does anyone know how I could increase the callback frequency or what that means? Is that just raising the samplerate for the Daisy? I attempted to raise the samplerate - but either I was not actually doing it or it did not remove the 1kHz noise.

I can upload a noise_test.bin file where the 1kHz noise can be flipped on/pff with the footswitch if that is useful.
 
Last edited:
Upload the bin file, I'd like to check that out.

My Petal has an oscillation which I think actually is caused by the DC/DC converter, but my Terrarium never has (even running the exact same algorithms).
 
Looking through DaisyDuino.cpp default blocksize is 48 and the default sample rate is 48KHz, so 48000/48 = 1000.

And in AudioClass from DaisyDuino.h:

inline float get_callbackrate() { return get_samplerate() / _blocksize; }

So, maybe that holds outside of the Arduino context as well, I'd guess.
 
Here is a link to the .bin file (the forum would not let up upload a .bin file). The left terrarium footswitch turns on and off the noise & the left led.

I also just realized that the 1kHz noise is much louder when the STlink-mini-v3 I use to program the Daisy is powered on. The noise is definitely still thernoise_1khz.bine with the STlink unplugged though.

@Dreamlands, do you know how the change the default blocksize? It would be a good test to see if I can push the noise line around.
 
Last edited:
Here's the thread mentioned above (I think).

Might be most straightforward to just up the sample rate to 96Hz to see if the noise moves to 2KHz with the change, @sonic_explorer.

Blocksize looks to be hardcoded in the Arduino setup, so if you're using this, you'd want to noodle with the .cpp file I mentioned above.
Otherwise, not sure, as I really haven't had the chance to mess around and learn much...
 
Thanks @Dreamlands. I tried to link that thread in my comment, but I didn't bold it so it is tough to tell (I will note to do that next time).

After you comment I poked around a bit and found that you can change the blocksize in the C++ code for petal objects with petal.SetAudioBlockSize(TARGET_BLOCKSIZE) in the main() function. I changed the blocksize to lots of different values and can confirm the noise I am seeing is showing up at a frequency of samplerate/blocksize.

When I leave the samplerate at 48kHz and put the blocksize at 12 the noise moves to 4kHz, but the amplitude is very reduced - so I am guessing it is hitting some other filter when it is pushed to 4kHz. I don't actually know what changing the blocksize is doing though, so I don't know if moving the blocksize down to 12 or below (and possibly boosting the samplerate up to 96kHz) will cause the audio to get worse, or stress the processor or what.
 
I took the Rhythmic Delay out with me this morning to get it on my live rig and noticed the whine whether the effect was in or out of circuit. Silly good echo cloud for pads and swells but the sound guy was all over me.
 
I'm going to have to load this one (and the 1khz oscillation test bin) on my Petal and see how they perform there.

I haven't had any noise issues on the Terrarium yet, but it was pretty much constant on the Petal regardless of the algorithm that was running.
 
@Gordo, that is awesome that you took the Rhythm Delay for a ride in a live setting.....but a major bummer about the noise/whine issue. I have uploaded a version of the rhythm_delay.cpp that includes a (highly commented) line where the blocksize can be changed from 48 to 12 which moves the noise line from 1kHz to 4kHz and significantly reduces the amplitude of the line, at least in my setup. I have also added a compiled version of the blocksize=12 .bin file in the build directory, which should hopefully have the lower noise. A reminder that the repo is here.

@PedalPCB, I have added the source code for the noise_1kHz test program to the repo here. Your will see the line to change the blocksize and move the noise line around is also highly commented in the .cpp file. I have another Daisy Seed arriving this week, so it will be interesting to see if the noise line varies between seeds.

It should be doable to add a really narrow notch filter to 1kHz (and resonances) without affecting the sound quality, but I am not sure how to do that right now with the current DaisyExamples modules.
 
I'm going to have to load this one (and the 1khz oscillation test bin) on my Petal and see how they perform there.

I haven't had any noise issues on the Terrarium yet, but it was pretty much constant on the Petal regardless of the algorithm that was running.

Yeah, I didn't notice it with a simple passthrough, but I did when I set up a filter bank of state variable filters. At first, I was hoping that I had accidentally set a few of them to self-oscillate, but that wasn't the case. I hope to have some time to mess around with this soon.
 
You’re suggesting that a digital filter will eliminate the noise?
That is what I was suggesting......but your question has made me rethink it. I don't actually know if the noise getting added to the audio line in the Daisy during the processing (where a digital filter may help), or the noise is getting added to the audio line after the processing but before it leaves the Daisy, or if the noise is getting added on the Terrarium board itself after the audio has left the Daisy.

I don't have a good oscilloscope to test that right now but I will try to poke around.

Yeah, I didn't notice it with a simple passthrough, but I did when I set up a filter bank of state variable filters. At first, I was hoping that I had accidentally set a few of them to self-oscillate, but that wasn't the case. I hope to have some time to mess around with this soon.

For my setup the 1kHz noise only appears when I am making the Daisy work a bit. When I had the Daisy processing a single delay line there wasn't really any 1kHz, but when I had three delay lines going the 1kHz noise was significant.
 
I assume it doesn't happen with the passthrough because in this case little work is being done by the STM32, therefore current draw remains relatively constant during the callback. As a result there's relatively insignificant lift in the GND signal, thus no audibly apparent induced 1KHz noise.
The more work you ask the STM32 to do in the callback, the greater the current draw, the more GND is shifted, the more apparent the noise.
( what I gather from shensley's comment in the Electrosmith thread your post linked to, @sonic_explorer )
 
Just to clarify, are you hearing this all the time, or when you pause the debugger? I am not hearing any noise when I am just playing with my STLinkV3 connected, but if I pause the debugger, I do hear a very loud (I suspect 1k) noise until I resume.
 
I'm not currently using the debugger. It's always present and loud with the filterbank I'm messing with. Going to strip it down and make it much more simple next.
 
I'm thinking of converting this thing into an audio feature extractor and CV generator if the noise issue can't be resolved.
 
OK, I can confirm, the noise is present with the official Electro-Smith Petal as well... so a DC/DC isolator isn't going to solve the issue.
 
I received a couple more Daisy's yesterday and saw the same noise level on them - so it does not seem to vary much Seed to Seed.

Do the 'official' Electro-Smith examples for the Petal ran in the official Petal hardware also exhibit this noise? I am surprised things would have been released with such a present noise line - it currently makes things nearly unusable.
 
Back
Top