Reply To: Bug when sending audio data to arduino

Home Forums Products NS1nanosynth Bug when sending audio data to arduino Reply To: Bug when sending audio data to arduino

#3741

Niklas
Participant

Did some quick practical testing today with USE_AUDIO_INPUT true.

My conclutions (please correct me if I am wrong).

getAudioInput() gives sound glitches and after like 1 minute atmega32u4 hangs.
Instead use mozziAnalogRead(A0).

Use the lowest resolution (AUDIO_MODE STANDARD_PLUS, AUDIO_RATE 16384 in Mozzi/mozzi_config.h) which is standard, otherwise no sound.

Reverbtank is to much for ns1 with USE_AUDIO_INPUT true, it also gives dynamic memory warnings, atmega32u4 hangs.

Simple AudioDelayFeedback sketch works.

#include <MozziGuts.h>
#include <mozzi_fixmath.h>
#include <AudioDelayFeedback.h>

AudioDelayFeedback <128> aDel;
uint16_t deltime;
byte del_samps;

void setup(){
  startMozzi();
  aDel.setFeedbackLevel(-127);
}

void updateControl(){
  deltime = 127;
}

int updateAudio(){
    int asig = mozziAnalogRead(A0);
    asig = asig - 512;
    return aDel.next(asig, deltime);
}

void loop(){
  audioHook();
}