Sanity check for Phaser example

Could anyone upload this phaser example for the Seed to their unit and confirm they hear a lot of digital noise/clipping? I’ve found an old thread that documents this but the solution (non-interleaving buffers) doesn’t work for me. Would really appreciate verification that it isn’t just me.

#include “daisy_seed.h”

#include “daisysp.h”

using namespace daisy;

using namespace daisysp;

DaisySeed hw;

Phaser phaser;

void AudioCallback(AudioHandle::InputBuffer in, AudioHandle::OutputBuffer out, size_t size)

{

for (size_t i = 0; i < size; i++)

{

out[0][i] = phaser.Process(in[0][i]);

}

}

int main(void)

{

hw.Init();

hw.SetAudioBlockSize(8); // number of samples handled per callback

hw.SetAudioSampleRate(SaiHandle::Config::SampleRate::SAI_48KHZ);

phaser.Init(48000.f);

hw.StartAudio(AudioCallback);

while(1) {}

}

I’ve got that running on my Seed, with no input, and it’s not making any noise/clipping.
Is there more involved? Do I need to feed it some audio?

Yes, forgot to mention that the clipping is in response to an audio input.

I modified your code a bit, added noise generator, initialized some phaser settings.
It sounds good to me. I don’t hear digital noise/clipping.

Note: Interleaved or non-Interleaved isn’t the issue.

#include "daisy_seed.h"
#include "daisysp.h"

using namespace daisy;
using namespace daisysp;
DaisySeed hw;
Phaser phaser;
WhiteNoise noise;

void AudioCallback(AudioHandle::InputBuffer in, AudioHandle::OutputBuffer out, size_t size)
{
    for (size_t i = 0; i < size; i++)
    {
        out[1][i] = out[0][i] = phaser.Process(noise.Process());
    }
}

int main(void)
{
    hw.Init();
    hw.SetAudioBlockSize(8); // number of samples handled per callback
    hw.SetAudioSampleRate(SaiHandle::Config::SampleRate::SAI_48KHZ);
    phaser.Init(48000.f);

    phaser.SetLfoDepth(0.9f);
    phaser.SetLfoFreq(0.5f);
    phaser.SetFreq(440.f);
    phaser.SetFeedback(.50f);

    noise.Init();
    noise.SetAmp(1.f);

    hw.StartAudio(AudioCallback);

    while(1) {}
}

I’ve also tried this replacing the noise generator with oscillator. Still works fine, though I don’t know anything about appropriate settings for the phaser.

I don’t currently have a Terrarium, so I can’t be more helpful.

Interesting, I get quite a bit of distortion with an oscillator input. It’s harder to tell with the white noise.

Not sure if I would call this passing or failing the sanity check. I think I’ll test the seed in isolation on a breadboard, not expecting anything there since the other effects work fine. Then a deep dive into the SW/FW.

Edit: Well, it does the same thing on my Pod. Thanks for helping confirm this is weird.