Wave Shield Distortion

by AKSoapy29 on Tue Feb 14, 2012 5:00 pm

Hello, when playing some tracks, the wave shield distorts the music a little bit. I don't know if it is my file or the shield, but you will hear a crackly noise. Is there any way to fix this?
User avatar
AKSoapy29
 
Posts: 28
Joined: Sat Jan 07, 2012 5:56 pm
Location: http://aksoapy29.comoj.com

Re: Wave Shield Distortion

by adafruit_support_bill on Tue Feb 14, 2012 5:29 pm

Is the noise always in the same place in the file? Or is it random?
User avatar
adafruit_support_bill
 
Posts: 28809
Joined: Sat Feb 07, 2009 9:11 am

Re: Wave Shield Distortion

by AKSoapy29 on Tue Feb 14, 2012 5:34 pm

Most of the time it is in the same place, but I know it isn't the audio file. I listened to it on my PC and there's no crackling.
User avatar
AKSoapy29
 
Posts: 28
Joined: Sat Jan 07, 2012 5:56 pm
Location: http://aksoapy29.comoj.com

Re: Wave Shield Distortion

by adafruit_support_bill on Tue Feb 14, 2012 5:42 pm

Could be a bad solder joint somewhere, or just digital noise picked up from the Arduino.
User avatar
adafruit_support_bill
 
Posts: 28809
Joined: Sat Feb 07, 2009 9:11 am

Re: Wave Shield Distortion

by AKSoapy29 on Tue Feb 14, 2012 5:45 pm

Is there any way to fix it? Could it be that the audio file is maxed out? That is a good term for it, maxed out. I've listened to weather siren videos on youtube, and sometimes the microphone gets distorted or maxed out. I'll try and turn the volume down on the files, see if it helps, then turn the volume up on the Wave Shield.
User avatar
AKSoapy29
 
Posts: 28
Joined: Sat Jan 07, 2012 5:56 pm
Location: http://aksoapy29.comoj.com

Re: Wave Shield Distortion

by AKSoapy29 on Tue Feb 14, 2012 5:55 pm

It worked! I am going todo it a little bit more to all the files.
User avatar
AKSoapy29
 
Posts: 28
Joined: Sat Jan 07, 2012 5:56 pm
Location: http://aksoapy29.comoj.com

Re: Wave Shield Distortion

by i_dawn on Wed May 15, 2013 3:08 am

YOU ARE THE MAN!!!!!

i spent an entire 8 hours trying to figure out what was creating that digital clipping sound. literally.
i tried to fix it on the software end, scripting end, hardware end.... i re-rendered things a million different ways a million different times... but I didn't think to stop normalizing all my files.

It definitely helps a bit, but...

some sounds seem to really bring the clipping out more than others. I can have some WAVS slammed to the max with bass and there is no problem. But as soon as I through a -10db reverberous string pluck or something on there it gets nasty with me. I just don't get it. Have you found the same thing?
i_dawn
 
Posts: 7
Joined: Wed Jan 16, 2013 12:59 am

Re: Wave Shield Distortion

by soerena on Sat Jul 27, 2013 6:08 am

Hi, I have this same issue

I have samples with whole "orchestration" (beat, bass, vocals etc) which is around -6db, and they sound just perfect at 16bit, 22050khz Wav, mono.
Then I tried some samples with only saxophone phrases (they sounded just fine when played from my laptop, on genelec speakers), but when I put them on the waveshield, SOME of them gets horribly digitally distorted. It's like mostly the ones that have long tones I think, maybe. They are also 16bit, 22050khz, wav, mono and I tried both normalizing them, putting them around -6db and also around -12db. I tried different gain setups (waveshield low-gain, fireface 400 high-gain, and the other way around), without any audible improvements.

What can this be? I've been making this for a client, so I'll have to find out wether I can fix this or if there's nothing to do about it.


/Søren
soerena
 
Posts: 51
Joined: Fri Nov 16, 2012 6:00 am

Re: Wave Shield Distortion

by soerena on Sat Jul 27, 2013 8:53 am

bump..

if anyone isn't experiencing this issue, I would love to hear about it.. what samplerate, bitrate do you have? what program did you use for exporting, etc ?
soerena
 
Posts: 51
Joined: Fri Nov 16, 2012 6:00 am

Re: Wave Shield Distortion

by soerena on Sun Jul 28, 2013 3:32 am

So this is something standard, no? Perhaps it should be written in the product description that it might distort on some audio content. There's a chance people working with sound might want to know. Just saying.
soerena
 
Posts: 51
Joined: Fri Nov 16, 2012 6:00 am

Re: Wave Shield Distortion

by adafruit_support_bill on Sun Jul 28, 2013 5:00 am

Nobody else has reported this problem. What is your output connected to? Maybe you are overloading the OpAmp output.
User avatar
adafruit_support_bill
 
Posts: 28809
Joined: Sat Feb 07, 2009 9:11 am

Re: Wave Shield Distortion

by soerena on Sun Jul 28, 2013 5:22 am

I'm sorry for the, perhaps, a bit blunt reply above - I've spent so much time on this project to suddenly find out in the end that it might be useless. Bare with my frustration please.



I have made 2 12 button samplers with lamps in each button.

They both run on an arduino UNO R3 with a waveshield 1.1.

My powersupply is 12 1,5v AA batteries in series (for 12 lamps), and there's an lc809cv voltage regulator that powers the arduino.

on the I2C bus i have an mcp23016 IO expander that turns on some of the lamps while also has some of the button inputs.

All the arduino pins that aren't used by the waveshield, is being used for either button inputs or outputs for triggering transistors to turn on/off lamps.
that means i'm using pin 0, 1, 6, 7, 8, 9, 15, 16 and 17 (the last three are analog pins initialized as IO's).

On one of the devices, all buttons are going through a resistor ladder into an analog pin where they are being read. The sketch then descides which button is being pushed depending on the voltage reading.
On the other device, I have used all IO's on the mcp in order to give each button its own IO. Both setups work fine, and there are no difference in the amount of distortion on the two devices, so I don't think this has anything to say.

I ordered 4 wave shields to have enough, and so far I've built 3 of them. Now I just tested the one that I haven't used for these devices yet, and you know what: it's not distorting!!!
Phew.. so it's not just the shield itself, but something with my application obviously. I apologize for my straight forward frustration-posts earlier.

So, somewhere something in my hardware (or code?) is going wrong.

My code is 714 lines long. Could it be that it's too much for the arduino to handle? I won't guess so myself, but I'm not sure. I've attached it for the device that uses resistor ladder.

I also tried powering the arduino with usb instead of through the voltage regulator, and this didn't improve anything. My soldering is pretty neat, and since it's happening on both devices, and wouldn't blame this as an issue.

Any ideas as to what I could do to troubleshoot this is very very appreciated.

Thank you
soerena
 
Posts: 51
Joined: Fri Nov 16, 2012 6:00 am

Re: Wave Shield Distortion

by soerena on Sun Jul 28, 2013 5:23 am

and here's the code attached, for device 1 with resistor ladder
Attachments
arduinoSamplePlayerAnalogRead12ButtonsOneLadderNoSerial.ino.zip
(3.37 KiB) Downloaded 104 times
soerena
 
Posts: 51
Joined: Fri Nov 16, 2012 6:00 am

Re: Wave Shield Distortion

by soerena on Sun Jul 28, 2013 5:39 am

and I didn't answer your question:

I'm using the minijack output and it goes directly to my fireface 400. I've tried both turning the shield's volume knob up to max while gaining only a little on my card, and the opposite.


here are some pictures of the devices: http://sorenandreasen.com/12-button-sample-player/
soerena
 
Posts: 51
Joined: Fri Nov 16, 2012 6:00 am

Re: Wave Shield Distortion

by adafruit_support_bill on Sun Jul 28, 2013 5:50 am

Your code uses "PlayComplete()" which sits in a tight 'do nothing' loop while playing the complete file, so it is not something you are doing in the code that causes the noise.

It could possibly be a problem with the DAC or opAmp. Try swapping in the second shield. If the problem persists, then it is most likely digital noise coupling into your wiring.
User avatar
adafruit_support_bill
 
Posts: 28809
Joined: Sat Feb 07, 2009 9:11 am