Main Page | Report this Page
Science Forum Index  »  Electronics - Design Forum  »  DSP Device for Guitar Pedal Effect...
Page 4 of 6    Goto page Previous  1, 2, 3, 4, 5, 6  Next

DSP Device for Guitar Pedal Effect...

Author Message
JosephKK...
Posted: Tue Nov 03, 2009 7:03 am
Guest
On Mon, 26 Oct 2009 09:36:40 -0500, Vladimir Vassilevsky
<nospam at (no spam) nowhere.com> wrote:

[quote]

Fred wrote:

I was wondering what DSP chip would be appropriate for a guitar pedal
effect. I need to sample the incoming signal preferably at 96kHz
perform a simple numeric function upon each sample and output he
result.

I am going to build Space Shuttle. It uses diodes. Would 1N5404 be a
good diode for Space Shuttle?

VLV
[/quote]
No. It is not fast enough. ;=P
 
JosephKK...
Posted: Tue Nov 03, 2009 7:10 am
Guest
On Tue, 27 Oct 2009 19:42:12 -0500, "Jon Slaughter"
<Jon_Slaughter at (no spam) Hotmail.com> wrote:

[quote]Les Cargill wrote:
Fred wrote:
I was wondering what DSP chip would be appropriate for a guitar pedal
effect. I need to sample the incoming signal preferably at 96kHz
perform a simple numeric function upon each sample and output he
result.


I'd drop the 96kHz requirement to half that. At most. For guitar,
an Fs of 20Khz might be good enough. You might be able to proto the
thing in a VST plugin.

There are many good reasons to oversample. It is always used in medium to
high end digital audio stuff nowdays. (mainly because most pro audio ADC's
do it) Generally it helps with writing better and more accurate filters.

Mainly it fixes the problems of aliasing. If you sample and audio signal
then you need to have either a very sharp analog filter at, say, 20khz or a
very gradual one at, say, 1Mhz with 10x oversampling. Then you can write
better digital filters for the sharp filtering. It is easier for to create a
sharp digital filter than an analog filter if your doing other digital
processing.

Basically by oversampling your moving the need for sharp filtering from the
analog side to the digital. All it really boils down to is initially
treating the input as if it had a much higher bandwidth.

The point here is that actually it is generally better(Cheaper and more
accurate) to sample an audio signal upwards of 1Mhz. Of course it requires
more processing power unless the ADC does this internally.

On the other side of the coin 1MS/s 16 (REAL) bits is VERY expensive.[/quote]
Whereas 20 bits (real resolution) at 96 kHz is affordable.
 
JosephKK...
Posted: Tue Nov 03, 2009 7:21 am
Guest
On Wed, 28 Oct 2009 08:58:15 -0500, "Jon Slaughter"
<Jon_Slaughter at (no spam) Hotmail.com> wrote:

[quote]Les Cargill wrote:
Jon Slaughter wrote:
Les Cargill wrote:
Fred wrote:
I was wondering what DSP chip would be appropriate for a guitar
pedal effect. I need to sample the incoming signal preferably at
96kHz perform a simple numeric function upon each sample and
output he result.


I'd drop the 96kHz requirement to half that. At most. For guitar,
an Fs of 20Khz might be good enough. You might be able to proto the
thing in a VST plugin.

There are many good reasons to oversample. It is always used in
medium to high end digital audio stuff nowdays. (mainly because most
pro audio ADC's do it) Generally it helps with writing better and
more accurate filters.

Mainly it fixes the problems of aliasing. If you sample and audio
signal then you need to have either a very sharp analog filter at,
say, 20khz or a very gradual one at, say, 1Mhz with 10x
oversampling. Then you can write better digital filters for the
sharp filtering. It is easier for to create a sharp digital filter
than an analog filter if your doing other digital processing.


I'm vainly trying to imagine why a guitar pedal would need a sharp
filter *internally*.... they're generally collections of allpass
filters at the most sophisticated.

You'll get well-oversampled D/A and A/D anyway, which is where the
steep ones are needed.

All I'm saying is that electric guitars obey a relatively modest
bandlimit. Not all of them, mind you - a Firebird or Danelectro
can throw 30KHz.



You don't understand. It's not necessarily from the guitar(the guitar has
it's own low pass filter). Any signal that might get on the line(from
radiation or whatever) can be aliased back if not filtered. This is always
the case what ever the source. You must filter before sampling or you will
get aliasing of the higher frequencies(above the nyquist) into the frequency
band your after. (in fact this can be useful in some cases)

The guitar's bandwidth maybe, say, 15khz so you sample at 30khz. The guitar
is bandlimited because of filtering(assuming it has one) but any noise on
the line that introduces frequencies above 15khz will be aliased back into
the signal(and effectively be part of the signal). A very sharp low pass
filter at 15khz would take care of all that since it will remove any
potential for aliasing(except any created between the filter and the ADC or
in the ADC).

Not necessarily, there are three octaves between 12 kHz and 96 kHz. A[/quote]
mere 2nd order filter will give 24 dB attenuation, and a "better" 4th
order filter will provide an easy 48 dB (if the electronics is that
good).
 
JosephKK...
Posted: Tue Nov 03, 2009 7:23 am
Guest
On Wed, 28 Oct 2009 21:39:43 -0500, Vladimir Vassilevsky
<nospam at (no spam) nowhere.com> wrote:

[quote]

Les Cargill wrote:


No, I gotcha. Audio-oriented DAC/ADC are generally going to support
20Hz to 20KHz well no matter what, though. Aliasing reall isn't a
consideration, unless the transform within the GPP in the middle
somehow causes it.

Aliasing is a BIG problem if doing non-linear audio effects in digital.
You want the sample rate of 192kHz or even higher.


Vladimir Vassilevsky
DSP and Mixed Signal Design Consultant
http://www.abvolt.com
[/quote]
It helps the analog filters a bit. Do the oversampling digitally.
 
JosephKK...
Posted: Tue Nov 03, 2009 7:28 am
Guest
On Thu, 29 Oct 2009 15:39:07 -0500, Vladimir Vassilevsky
<nospam at (no spam) nowhere.com> wrote:

[quote]

Nico Coesel wrote:

Vladimir Vassilevsky <nospam at (no spam) nowhere.com> wrote:



Les Cargill wrote:



No, I gotcha. Audio-oriented DAC/ADC are generally going to support
20Hz to 20KHz well no matter what, though. Aliasing reall isn't a
consideration, unless the transform within the GPP in the middle
somehow causes it.

Aliasing is a BIG problem if doing non-linear audio effects in digital.
You want the sample rate of 192kHz or even higher.

Depends on the A/D D/A converter. All the codecs (A/D D/A converter in
one chip) I encountered so far have decent anti-aliasing filters
built-in. Aliasing shouldn't be a problem.

It is unrelated to A/D and D/A. If you do a nonlinear function with
already sampled signal, you will get aliasing.

Let's say there is a sine wave at 10kHz, and a 48kHz ADC -> digital
limiter -> DAC system. At the output, you will get 18kHz, 2kHz, 16kHz
and so on, so forth.

Vladimir Vassilevsky
DSP and Mixed Signal Design Consultant
http://www.abvolt.com


No, not really. Not unless you are saturating the input ADC. If you[/quote]
do that all bets are off (so to speak).
 
JosephKK...
Posted: Tue Nov 03, 2009 7:40 am
Guest
On Thu, 29 Oct 2009 16:15:47 -0700 (PDT), Fred
<frederick.brown at (no spam) gmail.com> wrote:

[quote]On Oct 29, 4:39 pm, Vladimir Vassilevsky <nos... at (no spam) nowhere.com> wrote:
Nico Coesel wrote:
Vladimir Vassilevsky <nos... at (no spam) nowhere.com> wrote:

Les Cargill wrote:

No, I gotcha. Audio-oriented DAC/ADC are generally going to support
20Hz to 20KHz well no matter what, though. Aliasing reall isn't a
consideration, unless the transform within the GPP in the middle
somehow causes it.

Aliasing is a BIG problem if doing non-linear audio effects in digital.
You want the sample rate of 192kHz or even higher.

Depends on the A/D D/A converter. All the codecs (A/D D/A converter in
one chip) I encountered so far have decent anti-aliasing filters
built-in. Aliasing shouldn't be a problem.

It is unrelated to A/D and D/A. If you do a nonlinear function with
already sampled signal, you will get aliasing.

Let's say there is a sine wave at 10kHz, and a 48kHz ADC -> digital
limiter -> DAC system. At the output, you will get 18kHz, 2kHz, 16kHz
and so on, so forth.

Vladimir Vassilevsky
DSP and Mixed Signal Design Consultanthttp://www.abvolt.com

That's just about the picture. The Spin chip has 48kHz converters.
So, it'll be:

48k ADC > Digital Compression > 48k DAC.

What I am wondering about is hearing the aliasing. In the early CD
players I could hear it. In low quality digital effects like delay
and reverb I can still hear it.
[/quote]
I am not sure about what you hear (heard), but a lot of early CD
players had lousy DACs. Lousy converters could be the problem in the
early cheap effects devices. It is a very different sonic effect than
aliasing. Then there are/were converters that lost resolution (ENOB)
at higher frequencies (like 10 kHz).
 
Vladimir Vassilevsky...
Posted: Tue Nov 03, 2009 10:16 am
Guest
JosephKK wrote:
[quote]On Sun, 25 Oct 2009 19:46:54 -0700 (PDT), Fred
frederick.brown at (no spam) gmail.com> wrote:


I was wondering what DSP chip would be appropriate for a guitar pedal
effect. I need to sample the incoming signal preferably at 96kHz
perform a simple numeric function upon each sample and output he
result.


Could work, just remember that you are always faced with two samples
of delay due to the data converters.
[/quote]
With audio delta sigma DACs and ADCs, you typically have the group delay
of 15..20 samples on either side. That makes for the delay up to few
hundred microseconds or so, however for audio effects that doesn't
matter much as the speed of sound is only 330m/sec.

Vladimir Vassilevsky
DSP and Mixed Signal Design Consultant
http://www.abvolt.com
 
Vladimir Vassilevsky...
Posted: Tue Nov 03, 2009 10:26 am
Guest
JosephKK wrote:

[quote]On Thu, 29 Oct 2009 15:39:07 -0500, Vladimir Vassilevsky
nospam at (no spam) nowhere.com> wrote:

Aliasing is a BIG problem if doing non-linear audio effects in digital.
You want the sample rate of 192kHz or even higher.

Depends on the A/D D/A converter. All the codecs (A/D D/A converter in
one chip) I encountered so far have decent anti-aliasing filters
built-in. Aliasing shouldn't be a problem.

It is unrelated to A/D and D/A. If you do a nonlinear function with
already sampled signal, you will get aliasing.

Let's say there is a sine wave at 10kHz, and a 48kHz ADC -> digital
limiter -> DAC system. At the output, you will get 18kHz, 2kHz, 16kHz
and so on, so forth.

No, not really.
[/quote]
Huh?
Run the numbers.

[quote]Not unless you are saturating the input ADC. If you
do that all bets are off (so to speak).
[/quote]
That has nothing to do with DAC and ADC. Once you do nonlinear functions
in digital domain, you get aliasing.

If you apply nonlinear function to a perfect digital sine wave, you will
get harmonics. If those harmonics are above Nyquist, they will be
aliased down.

Vladimir Vassilevsky
DSP and Mixed Signal Design Consultant
http://www.abvolt.com
 
Fred...
Posted: Tue Nov 03, 2009 10:39 am
Guest
I have begun to doubt that the Spin chip will be able to handle all
the cordic code in a timely manner.

So as I look/wait for affordable hardware that can do this I might as
well get started on the coding.

This project has already been on hold for years due to a lack of
affordable hardware, at least they're getting closer.
 
christofire...
Posted: Tue Nov 03, 2009 2:30 pm
Guest
"Vladimir Vassilevsky" <nospam at (no spam) nowhere.com> wrote in message
news:CoGdnVCabP481m3XnZ2dnUVZ_sWdnZ2d at (no spam) giganews.com...
[quote]

JosephKK wrote:

On Thu, 29 Oct 2009 15:39:07 -0500, Vladimir Vassilevsky
nospam at (no spam) nowhere.com> wrote:

Aliasing is a BIG problem if doing non-linear audio effects in digital.
You want the sample rate of 192kHz or even higher.

Depends on the A/D D/A converter. All the codecs (A/D D/A converter in
one chip) I encountered so far have decent anti-aliasing filters
built-in. Aliasing shouldn't be a problem.

It is unrelated to A/D and D/A. If you do a nonlinear function with
already sampled signal, you will get aliasing.

Let's say there is a sine wave at 10kHz, and a 48kHz ADC -> digital
limiter -> DAC system. At the output, you will get 18kHz, 2kHz, 16kHz and
so on, so forth.

No, not really.

Huh?
Run the numbers.

Not unless you are saturating the input ADC. If you
do that all bets are off (so to speak).

That has nothing to do with DAC and ADC. Once you do nonlinear functions
in digital domain, you get aliasing.

If you apply nonlinear function to a perfect digital sine wave, you will
get harmonics. If those harmonics are above Nyquist, they will be aliased
down.

Vladimir Vassilevsky
DSP and Mixed Signal Design Consultant
http://www.abvolt.com
[/quote]

The successful ones like Line 6 are believed to increase the sampling rate
before applying the non-linear function (i.e. upsample) and then LPF whilst
downsampling; see
http://www.mitpressjournals.org/doi/pdf/10.1162/comj.2009.33.2.85?cookieSet=1.
Some (perhaps many) of their effects use ADC/DAC working at about 39 kHz
sampling rate and they don't have a reputation for sounding bad.

Chris
 
Nico Coesel...
Posted: Tue Nov 03, 2009 3:51 pm
Guest
Vladimir Vassilevsky <nospam at (no spam) nowhere.com> wrote:

[quote]

JosephKK wrote:

On Thu, 29 Oct 2009 15:39:07 -0500, Vladimir Vassilevsky
nospam at (no spam) nowhere.com> wrote:

Aliasing is a BIG problem if doing non-linear audio effects in digital.
You want the sample rate of 192kHz or even higher.

Depends on the A/D D/A converter. All the codecs (A/D D/A converter in
one chip) I encountered so far have decent anti-aliasing filters
built-in. Aliasing shouldn't be a problem.

It is unrelated to A/D and D/A. If you do a nonlinear function with
already sampled signal, you will get aliasing.

Let's say there is a sine wave at 10kHz, and a 48kHz ADC -> digital
limiter -> DAC system. At the output, you will get 18kHz, 2kHz, 16kHz
and so on, so forth.

No, not really.

Huh?
Run the numbers.

Not unless you are saturating the input ADC. If you
do that all bets are off (so to speak).

That has nothing to do with DAC and ADC. Once you do nonlinear functions
in digital domain, you get aliasing.

If you apply nonlinear function to a perfect digital sine wave, you will
get harmonics. If those harmonics are above Nyquist, they will be
aliased down.
[/quote]
I read some articles about that. It does make me wonder whether you
could rewrite the non-linear functions in a way so the harmonics are
not created in the first place. This should be more efficient than
upsampling -> non-linear function -> filtering -> downsampling.

--
Failure does not prove something is impossible, failure simply
indicates you are not using the right tools...
"If it doesn't fit, use a bigger hammer!"
--------------------------------------------------------------
 
Vladimir Vassilevsky...
Posted: Tue Nov 03, 2009 4:30 pm
Guest
Nico Coesel wrote:

[quote]Vladimir Vassilevsky <nospam at (no spam) nowhere.com> wrote:


That has nothing to do with DAC and ADC. Once you do nonlinear functions
in digital domain, you get aliasing.

If you apply nonlinear function to a perfect digital sine wave, you will
get harmonics. If those harmonics are above Nyquist, they will be
aliased down.


I read some articles about that. It does make me wonder whether you
could rewrite the non-linear functions in a way so the harmonics are
not created in the first place. This should be more efficient than
upsampling -> non-linear function -> filtering -> downsampling.
[/quote]
It could be done if you can approximate the input by an analytical
function. Or approximate the nonlinearity by Volterra Series. Both ways
require pretty involved math; brute force oversampling is usually
simpler and cheaper.

Vladimir Vassilevsky
DSP and Mixed Signal Design Consultant
http://www.abvolt.com
 
Fred...
Posted: Wed Nov 04, 2009 5:38 am
Guest
On Nov 3, 4:30 pm, Vladimir Vassilevsky <nos... at (no spam) nowhere.com> wrote:
[quote]Nico Coesel wrote:
Vladimir Vassilevsky <nos... at (no spam) nowhere.com> wrote:

That has nothing to do with DAC and ADC. Once you do nonlinear functions
in digital domain, you get aliasing.

If you apply nonlinear function to a perfect digital sine wave, you will
get harmonics. If those harmonics are above Nyquist, they will be
aliased down.

I read some articles about that. It does make me wonder whether you
could rewrite the non-linear functions in a way so the harmonics are
not created in the first place. This should be more efficient than
upsampling -> non-linear function -> filtering -> downsampling.

It could be done if you can approximate the input by an analytical
function. Or approximate the nonlinearity by Volterra Series. Both ways
require pretty involved math; brute force oversampling is usually
simpler and cheaper.

Vladimir Vassilevsky
DSP and Mixed Signal Design Consultanthttp://www.abvolt.com
[/quote]
I think I'll flesh out the code in C, apply it to some PCM files, then
analyze the results first.

Do you think the harmonics from the non-linear function on a digital
sample would show up in the processed PCM file or would it have to be
converted to analog then analyzed?

The compression itself is going to add harmonics, so how would I be
able to separate the ones generated by the compression from the ones
generated by applying the non-linear function to a digital signal and
the conversion processes?
 
ChrisQ...
Posted: Wed Nov 04, 2009 1:10 pm
Guest
Fred wrote:
[quote]I have begun to doubt that the Spin chip will be able to handle all
the cordic code in a timely manner.


[/quote]
So, use a lookup table. Cordic is iterative and the more accuracy you
want, the more iterations you need.

It's much faster to use a lookup table, a single line of C or assembler
in the best case:

u16Sine = u16SineTable [u16Angle];

Ok, you need a few more to resolve over the full range for cos, but it's
still lightspeed in comparison to cordic or other analytical methods,

Why do some people insist on doing things the hard way ? Smile...

Regards,

Chris
 
ChrisQ...
Posted: Wed Nov 04, 2009 1:31 pm
Guest
JosephKK wrote:

[quote]Nothing new here, move along.
The grandfathered old poor code already is an issue in the FPGA world.
As if you didn't already know.
[/quote]
Didn't know in fact, but can guess that could be a problem, just as it
is with legacy asm and C. Have done very little with fpga's / vhdl as
well. Every time I consider one for a project, a fast micro wins by
getting the job done at lower cost and timescales...

Regards,

Chris
 
 
Page 4 of 6    Goto page Previous  1, 2, 3, 4, 5, 6  Next
All times are GMT - 5 Hours
The time now is Thu Dec 10, 2009 11:47 pm