FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > DSP

DSP comp.dsp newsgroup, mailing list

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-13-2006, 02:02 PM
[email protected]
Guest
 
Posts: n/a
Default help with flanger effect

Hey,

I'm implementing a flanger effect as part of a guitar effects processor
on an ADSP-21364 development board.

A Flanger effect is produced by adding a single delay to the current
input sample. The duration of this delay is determined by the
magnitude of a low frequency sin wave.

The values I am using are:

1Hz sin wave, values in a lookup table
max 3ms delay => 144 samples in delay buffer @ 48kHz

My calculation of the integer delay and circular buffer addressing seem
to be fine.

My problem is that on top of the desired output I am also getting a
'police siren' like sound which i suspect is a sin wave. Could anyone
tell me why this might be? I have implemented the effect using the
same tehnique in Matlab and had no problems.

Many thanks

Ronan

Reply With Quote
  #2 (permalink)  
Old 02-13-2006, 06:29 PM
Andor
Guest
 
Posts: n/a
Default Re: help with flanger effect


[email protected] wrote:
> Hey,
>
> I'm implementing a flanger effect as part of a guitar effects processor
> on an ADSP-21364 development board.
>
> A Flanger effect is produced by adding a single delay to the current
> input sample. The duration of this delay is determined by the
> magnitude of a low frequency sin wave.
>
> The values I am using are:
>
> 1Hz sin wave, values in a lookup table
> max 3ms delay => 144 samples in delay buffer @ 48kHz
>
> My calculation of the integer delay and circular buffer addressing seem
> to be fine.


Might be clipping. Are compensating the increase in signal level? Try
to take down the overall signal level before you convert to fixed-point
(for sending the data to the DAC) by a factor of 0.5 or so.

Reply With Quote
  #3 (permalink)  
Old 02-13-2006, 09:43 PM
Allan Herriman
Guest
 
Posts: n/a
Default Re: help with flanger effect

On 13 Feb 2006 05:02:21 -0800, "[email protected]"
<[email protected]> wrote:

>Hey,
>
>I'm implementing a flanger effect as part of a guitar effects processor
>on an ADSP-21364 development board.
>
>A Flanger effect is produced by adding a single delay to the current
>input sample. The duration of this delay is determined by the
>magnitude of a low frequency sin wave.
>
>The values I am using are:
>
>1Hz sin wave, values in a lookup table
>max 3ms delay => 144 samples in delay buffer @ 48kHz
>
>My calculation of the integer delay and circular buffer addressing seem
>to be fine.
>
>My problem is that on top of the desired output I am also getting a
>'police siren' like sound which i suspect is a sin wave. Could anyone
>tell me why this might be? I have implemented the effect using the
>same tehnique in Matlab and had no problems.


Does your variable length delay line only allow an integer number of
samples delay, or is the resolution finer than that?

Allan
Reply With Quote
  #4 (permalink)  
Old 02-14-2006, 10:33 AM
omalley.ronan[email protected]
Guest
 
Posts: n/a
Default Re: help with flanger effect

I'm pretty sure it's not clipping, i have taken the signal down in
level.

I am only allowing an integer number of sample delays, would it be
worth using a higher resolution that that? I thought about using linear
interpolation, but when I programmed the effect in Matlab using integer
sample delays it sounded fine.

Reply With Quote
  #5 (permalink)  
Old 02-14-2006, 11:29 AM
[email protected]
Guest
 
Posts: n/a
Default Re: help with flanger effect

[email protected] wrote:
> I'm pretty sure it's not clipping, i have taken the signal down in
> level.
>
> I am only allowing an integer number of sample delays, would it be
> worth using a higher resolution that that? I thought about using linear
> interpolation, but when I programmed the effect in Matlab using integer
> sample delays it sounded fine.


I was guessing that the "police siren" was caused by the small jumps
when you switch from one tap in your delay line to the next.

You need interpolation to make smaller steps, but you should avoid
linear interpolation for audio unless the sampling frequency is very
high. (Most interpolation problems become easier if the highest
frequency is small wrt the sampling frequency.)
"Normal" sampling frequencies require the use of cleverer
interpolation. I'm sure one of the other comp.dsp regulars can help
you with that.

Regards,
Allan

Reply With Quote
  #6 (permalink)  
Old 02-14-2006, 02:00 PM
[email protected]
Guest
 
Posts: n/a
Default Re: help with flanger effect

thanks very much Allan, I'll look into some interpolation algorithms
suitable for audio.

Reply With Quote
  #7 (permalink)  
Old 02-16-2006, 07:00 AM
Jon Harris
Guest
 
Posts: n/a
Default Re: help with flanger effect

<[email protected]> wrote in message
news:[email protected] oups.com...
> [email protected] wrote:
>> I'm pretty sure it's not clipping, i have taken the signal down in
>> level.
>>
>> I am only allowing an integer number of sample delays, would it be
>> worth using a higher resolution that that? I thought about using linear
>> interpolation, but when I programmed the effect in Matlab using integer
>> sample delays it sounded fine.

>
> I was guessing that the "police siren" was caused by the small jumps
> when you switch from one tap in your delay line to the next.
>
> You need interpolation to make smaller steps, but you should avoid
> linear interpolation for audio unless the sampling frequency is very
> high. (Most interpolation problems become easier if the highest
> frequency is small wrt the sampling frequency.)
> "Normal" sampling frequencies require the use of cleverer
> interpolation. I'm sure one of the other comp.dsp regulars can help
> you with that.


If it is just for a guitar effect and the sampling rate is decently high (like
44.1 or 48kHz), you can probably get away with linear interpolation. Electric
guitars tend not to have too much high frequency content. But in general I
agree with Allan.

--
Jon Harris
SPAM blocker in place:
Remove 99 (but leave 7) to reply


Reply With Quote
  #8 (permalink)  
Old 02-16-2006, 11:46 AM
[email protected]
Guest
 
Posts: n/a
Default Re: help with flanger effect

I am sampling at 48kHz. I implemented linear interpolation and it did
help, but the background noise is still there. I then proceeded to
implement a 4-point cubic interpolation equation and the sound is still
there! I am using a very high resolution sin wave lookup table, so I
can't figure out why this didn't solve it!!

Reply With Quote
  #9 (permalink)  
Old 02-16-2006, 10:59 PM
Allan Herriman
Guest
 
Posts: n/a
Default Re: help with flanger effect

On 16 Feb 2006 02:46:38 -0800, "[email protected]"
<[email protected]> wrote:

>I am sampling at 48kHz. I implemented linear interpolation and it did
>help, but the background noise is still there. I then proceeded to
>implement a 4-point cubic interpolation equation and the sound is still
>there! I am using a very high resolution sin wave lookup table, so I
>can't figure out why this didn't solve it!!


One likely reason is that my guess was wrong.

How about you convert the output of your flanger to a short MP3 and
put it on the web somewhere (and post a link to it in this thread).
Someone may recognise the sound, and come up with a better guess than
mine.

Regards,
Allan
Reply With Quote
  #10 (permalink)  
Old 02-16-2006, 11:06 PM
Allan Herriman
Guest
 
Posts: n/a
Default Re: help with flanger effect

On Thu, 16 Feb 2006 06:00:10 GMT, "Jon Harris"
<[email protected]> wrote:

><[email protected]> wrote in message
>news:[email protected] roups.com...
>> [email protected] wrote:
>>> I'm pretty sure it's not clipping, i have taken the signal down in
>>> level.
>>>
>>> I am only allowing an integer number of sample delays, would it be
>>> worth using a higher resolution that that? I thought about using linear
>>> interpolation, but when I programmed the effect in Matlab using integer
>>> sample delays it sounded fine.

>>
>> I was guessing that the "police siren" was caused by the small jumps
>> when you switch from one tap in your delay line to the next.
>>
>> You need interpolation to make smaller steps, but you should avoid
>> linear interpolation for audio unless the sampling frequency is very
>> high. (Most interpolation problems become easier if the highest
>> frequency is small wrt the sampling frequency.)
>> "Normal" sampling frequencies require the use of cleverer
>> interpolation. I'm sure one of the other comp.dsp regulars can help
>> you with that.

>
>If it is just for a guitar effect and the sampling rate is decently high (like
>44.1 or 48kHz), you can probably get away with linear interpolation. Electric
>guitars tend not to have too much high frequency content. But in general I
>agree with Allan.


My Fender Jaguar has 1M ohm pots. At the half way mark, the output
resistance of the guitar is just over 250k ohm. What's the equivalent
(lumped) capacitance of a guitar lead? A few hundred pF? That would
give a cutoff frequency of a few kHz.

Regards,
Allan
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
power-on reset to effect once only. Niv VHDL 8 11-28-2007 08:59 AM
The Effect of Pin Assginment Ying Hu FPGA 9 09-02-2004 08:27 PM
Re: Is the Doppler effect really linear? Clay S. Turner DSP 26 08-26-2003 04:57 AM
Re: Is the Doppler effect really linrar? Stan Pawlukiewicz DSP 7 08-21-2003 07:48 AM
Re: Is the Doppler effect really linear? robert bristow-johnson DSP 0 08-20-2003 03:23 AM


All times are GMT +1. The time now is 01:30 AM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved