In the Daisy Seed examples I encountered things like:
#include "daisy_seed.h"
#include "daisysp.h"
// Use the daisy namespace to prevent having to type
// daisy:: before all libdaisy functions
using namespace daisy;
using namespace daisysp;
1: What do I need to replace them with to be able to get things compiled in the arduino ide?
2: There seems to be a big difference in the definition of the buffers.
static void AudioCallback(float *in, float *out, size_t size)
{
for (size_t index_2_buf = 0; index_2_buf < size; index_2_buf += 2)
{
x[0] = in[index_2_buf]; // This is the left channel.
y[0] = in[index_2_buf + 1]; // This is the right channel
for (size_t index_2_buf = 0; index_2_buf < size; index_2_buf+= num_channels)
{
x[0] = in[0][index_2_buf]; // Should be left channel.
y[0] = in[0][index_2_buf + size]; // should be right channel
does not give me the left and right channel samples.
What am I missing?
They’ve added second type of callback recently. This way working with multi-channel audio is more straightforward. You don’t need to skip samples in your loop iteration to get data for next channel, i.e. it would look like this:
for (size_t index_2_buf = 0; index_2_buf < size; index_2_buf++)
{
x[0] = in[0][index_2_buf]; // Should be left channel.
y[0] = in[1][index_2_buf]; // should be right channel
Now you can iterate over elements in a buffer without making things look butt-ugly!
First library is for accessing Daisy’s hardware. If you have problem with it, you’ve misconfigured something. The second is optional DSP library, you can use it or write code that doesn’t depend on it.
No, Patch, Petal and Field normalize audio signals - input is passed to next input if nothing is plugged. But Seed and Pod schematics don’t mention having this, so must be some other issue.
Did you compile and upload that bit if code using the arduino IDE?
The odd thing is that if I use a Makefile and avoid using the IDE and the new callback, then it works.
No, because I don’t have a spare breadboard and jacks on hand. But the Pod schematic clearly shows the input jack connects directly to the Seed’s inputs.