Page 2 of 4

Re: hi-fi ish looper

Posted: Wed Apr 25, 2012 3:33 pm
by skullservant
:)

Re: hi-fi ish looper

Posted: Thu Apr 26, 2012 12:31 pm
by cloudscapes
Right now I'm trying to overcome the aliasing/nyquist filtering problem.

As I lower the samplerate, it gets the "samplerate reduction" effect found in bitcrushers. Sometimes this is a nice effect but in a looper such as this, I don't want that, so a steep low pass filter is needed.

I tried using the MAX297 last night. It does a good job filtering the aliasing down completely, but it injects a whole lot of hiss into the sound. It does so even as a standalone circuit on the same breadboard, with the input tied to ground! Decoupling caps close to the IC rails didn't really help. Something tells me a lot of noise from other parts of the circuit (DAC, ADC, RAM) is leaking through the ground and/or power is is getting amplified. I'll try putting the filter chip on its own breadboard tonight and see what happens.

Re: hi-fi ish looper

Posted: Fri Apr 27, 2012 2:32 am
by multi_s
why dont you just always sample at max fs then drop/interpolate between samples you dont need/process. this way you dont need an adaptive filter on the front end at all.

this may not solve your breadboard noise issues though.

do you have the pic still plugged in via usb when you are running the program? i found with the pickit 2/3 at least that unplugging the ICSP while testing removed a lot of noise, but i never used a stamp module like you have. the 'ground' on the usb seems to be pretty noisy. you can also try 'star grounding' instead of using the bus rails on the top/bottom of a breadboard. sometimes it helps.

Re: hi-fi ish looper

Posted: Fri Apr 27, 2012 8:50 am
by cloudscapes
I already "star ground" even thoguh I use the rails. like the ram and pic are strictly on one rail, the DAC/ADC on its own things, and the MAX297 even has its own regulator. I no longer think it's the breadboard causing the noise, because if I remove the filter ic and keep the rest, it's really clean sounding. no hiss at all. I implement the MAX297 exactly as the datasheet and hiss explodes all over. anyways, I haven't done enoguh tests yet to rule it out completely. I still want to try the filter as its own independant circuit on a lone breadboard and see if it still does it.

the PIC is powered via USB (3.3v) but everything else via regulators and external adapter (one I trust for these things). the filter even has its own regulator.

I bought the filter ics through ebay. maybe I got some lemons?

I thought of doing linear interpolation in software and keeping the samplerate fixed. there's a problem though. at 44khz, one sample is 23us. after spi stuff on the ram, adc and dac, I have only 15us to spare. I know the pic32 is much faster, but I think doing the kind of interpolation I have in mind on an AVR would have taken whole milliseconds per sample. I can't help but think I'd use up that 15us pretty quick. I need it for other stuff too.

I don't know DSP or advanced math, so the only way I know how to do this is straight division, multiplication and a gigantic conditional logic tree. :( if interpolate slower then do this, but if I want faster do something else entirely. except when.... arggg

I need to put some theory on paper to figure it out. it's too much for my brain to imagine. never been adept at "imagining" math. I'll work on this on the weekend. I'll try and clean up the hiss too. it really should work.

Re: hi-fi ish looper

Posted: Fri Apr 27, 2012 8:55 am
by cloudscapes
the DAC and ADC are 5v, but thankfully the pic's SPI pins are 5v tolerant! from memory (har), I think the MRAM is sharing the same power as the pic at 3.3v.

Re: hi-fi ish looper

Posted: Fri Apr 27, 2012 4:56 pm
by multi_s
ya i guess it is possible toget lemons but can you get some measurement of the noise on a scope? When i look at the data sheet on page five, the graph in the lower right hand corner seems to imply that reasonalbe SNR is only achieved with fairly large amplitude signals. see when the Vpp is small (close to the left side of teh graph) the THD+NOISE is quite poor. If you can actaully get some measurements of the amplitude of the noise vs the signal you are injecting we coudl figure out if it is 'to spec'. Interestingly there is no direct noise level given on the spec sheet but it does give clock feed through = 5mVpp typical which im not sure exactly what it means. But, If they mean feedthrough to the opamp i woudl say that could be quite problematic in your case. If your digital scope has fft capability id look at the noise on that and see what, if any, is the power of the clock frequency at the analog output of the filter.

and also i was wrong about just dropping samples. you would have to do somethign a bit better than just that otherwise you will still encounter aliasing. i guess more the point is there are ways of always have he max input fs then dropping the rate accordingly via software and avoiding aliasing.blablabla nothing you probably hadnt already considered, but perhaps somethign you might re evaluate if the maxim filters are actually just inherently noisy by design.

Re: hi-fi ish looper

Posted: Fri Apr 27, 2012 10:42 pm
by cloudscapes
you got me to look in the right place, thanks!

the problem was two-fold. I had gotten two filter ics. one of them (the one I tried a few days ago) was noticeably hissier than the other. the second was much better.

the other problem was that I was feeding the filter ic only 1v peak to peak. that's like a -40db nosie floor. I brought that up to 4v and it's so much better now! still some hiss, but half of that is from the noisy-ish ADC.

I could live with this amount of hiss, -70db or whatnot, if I didn't have to overdub. summed 10x times the hiss will get fairly present.

either I carefully gate the output a bit, which I was already considering doing, or I sum overdubs digitally which will negate any noise post-DAC. the disadvantage in that is I can't put effects (filter or whatever) in the feedback loop.

Re: hi-fi ish looper

Posted: Sat Apr 28, 2012 1:29 am
by Muse FTW
I wish I could offer some suggestions or advice... but I guess I can offer some motivation: understand that if this were to ever go into full production I'd buy two.

Re: hi-fi ish looper

Posted: Sun Apr 29, 2012 8:48 am
by cloudscapes
another go at the design

Image

Re: hi-fi ish looper

Posted: Sun Apr 29, 2012 4:17 pm
by oldangelmidnight
RND = Win!

Re: hi-fi ish looper

Posted: Mon Apr 30, 2012 11:04 pm
by cloudscapes
oldangelmidnight wrote:RND = Win!


what that does is enable a mode where every X milliseconds/seconds, the playback position is randomized for Y length of time. since the Point A/B knobs no longer have a use in this mode, they double as X and Y. it works while recording, too.

Re: hi-fi ish looper

Posted: Tue May 01, 2012 10:11 pm
by oldangelmidnight
That sounds awesome. Could you also add an option where X and Y are randomized?
I've said it before but every pedal should have a randomize option.

Re: hi-fi ish looper

Posted: Thu May 03, 2012 12:58 pm
by cloudscapes
Actually I need to rethink that. X is def randomized... maybe Y can add more random variation to X. like X=(Y*rnd(-1 to 1) or something. So that the sample windows aren't uniformly the same speed and size.

Re: hi-fi ish looper

Posted: Sun May 06, 2012 1:05 pm
by Eric!
I like the first mock-up, the bottom of last page. A LOT. Mini-pots are a GO. And just having knobs and switches categorized into areas just seems way more useful.

But seriously, this is so much HHNNGGGG that I can't take. My looping is blossoming, with my 'Rang, and borrowing other loopers here and there. Nothing quite has the edge. And then I see this and go O_O

I'll be watching for updates. This'll be brilliant.

RND? OMFG.

Re: hi-fi ish looper

Posted: Sun May 06, 2012 6:43 pm
by cloudscapes
dunno, I like the last mockup best. part of the reason I switched things around so much is I needed to go from using 6 digits to 9 digits. couldn't shrink the digits, and round holes were too big, so the extra needed realestate made me move things a whole lot. I kind of like the display centered like that, and some of the controls (points A & B) need to align on the display. meaning I need to squeeze what's left to the sides.

I'm sure something can be improved though. I was thinking on putting both the filter and modulation controls on the right side, but in vertical arangement. and the wet/dry would go where the filter used to be.