"zipper noise"

"zipper noise"

Postby loss1234 » Tue Apr 03, 2012 9:38 am

I am getting quite a bit of zippering/ strange audio distortion
on the sketches which use pots to control delay time. This makes the sketches pretty much unusable in any case where I want to change values in real-time.

Mark of Open Music Labs had told me in an email that he knew the cause of this problem and had a workaround for it
which involved changing the oversampling on the ADC channels.

So..I was wondering if we could get his added to the forum or to the sketch library?

Posts: 10
Joined: Sun Apr 01, 2012 1:39 am

Re: "zipper noise"

Postby guest » Tue Apr 03, 2012 3:15 pm

i remember coming across this problem in the microdec
it sounded fine when increasing delay time
but had a zipper noise when reducing delay times
this was due to chopping off data

the fix was to walk through the samples at a fixed rate
i will see if i can implement that here

i tried adjusting the hysterisis and oversample values
and that didnt help out any
although it did make the pots more responsive
so ill roll it into the next rev of the header file
Site Admin
Posts: 449
Joined: Thu May 20, 2010 11:58 pm

Re: "zipper noise"

Postby guest » Tue Apr 03, 2012 4:46 pm

give this a try
it still has a bit of noise
but its greatly reduced

Code: Select all
// timer1 interrupt routine - all data processed here
ISR(TIMER1_COMPA_vect, ISR_NAKED) { // dont store any registers

  // &'s are necessary on data_in variables
  AudioCodec_data(&left_in, &right_in, left_out, right_out);
  // pass left input to right output
  right_out = left_in;
  delaymem[location++] = left_in; // post increment location to go to next memory location
  // check if location has gotten bigger than buffer size
  if (location >= SIZE) {
    location = 0; // reset location
  //calculate delay time
  unsigned int temp = location - currentdelay;
  if (temp >= SIZE) {
    temp += SIZE;
  //fetch data from buffer and put it into output register
  left_out = delaymem[temp];

  // & is required before adc variable

  // scale ADC value to match buffer size
  // note the use of the fancy fast math function
  // you can read about these in the readme file
  unsigned int scale = SIZE;
  MultiU16X16toH16(desireddelay, mod0_value, scale);
  // sowly sweep delay time to reduce zipper noise
  if (currentdelay == desireddelay);
  else if (currentdelay < desireddelay) {
  else {

  reti(); // dont forget to return from the interrupt
Site Admin
Posts: 449
Joined: Thu May 20, 2010 11:58 pm

Return to Audio Codec Shield

Who is online

Users browsing this forum: No registered users and 1 guest