• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
FIR convolution & delayline buffer question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FIR convolution & delayline buffer question


  • Subject: FIR convolution & delayline buffer question
  • From: Salvator|TriTone Digital <email@hidden>
  • Date: Tue, 23 Jun 2009 15:13:56 +0200

Hello,

I'm writing a simple convolution plugin, and face a problem with the convolution 'tail' beyond buffer size. 
Actually the convolution take place fine within the buffer size boundaries, but at each end of buffer, the tail of convolution is either truncated, or feedingback.

Here's the simple code :

void MultitapAU::MultitapKernel::Process(const Float32 * inSourceP,
Float32 *inDestP,
UInt32 inFramesToProcess,
UInt32 inNumChannels,
bool &ioSilence )
{
float coefficients [10] = {1.,0.9,0.8,0.7,0.6,0.5,0.4,0.3,0.2,0.1} ;
int numTaps = 10;
float delay[inFramesToProcess+numTaps]; // my coefficients 


memcpy(delay, delay+inFramesToProcess, sizeof(float) * numTaps-1); // i.e. save content by moving samples at beginning
memcpy(delay+numTaps-1, inSourceP, sizeof(float) * inFramesToProcess);  // i.e. fill the last samples with input signal


vDSP_conv(delay,1,coefficients+numTaps-1,-1,inDestP,1,inFramesToProcess,numTaps);// convolve "delay" with "coefficient" & output into inDestP

}


Any hints on how making the convolution preserving the samples that would be beyond "inFramesToProcess" ?
I also tried a circular buffer implementation, but face the exact same problem so I posted this one as it's simpler to read.

Thanks !

Salvator
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: FIR convolution & delayline buffer question
      • From: Brian Willoughby <email@hidden>
  • Prev by Date: AU Lab passing bad MIDI CCs?
  • Next by Date: Re: Audio mixing in kernel ?
  • Previous by thread: Re: AU Lab passing bad MIDI CCs?
  • Next by thread: Re: FIR convolution & delayline buffer question
  • Index(es):
    • Date
    • Thread