Login / Register  0 items | $0.00 NewWhat is KVR? Submit News Advertise
mezmay
KVRer
 
14 posts since 3 Mar, 2016, from Russia

Postby mezmay; Mon Jun 12, 2017 10:56 pm Imitate moving sound away in common headphones?

I need to imitate a moving sound away from a listener.
For example, a musician is playing on a guitar, and I should process (in real-time) the sound in such a way that it will seems to him that the sound is "moving away". The problem is that this should be done for usual headphones, and both the channels have to "move away" simultaneously. I have a microphone, a musician and a headhones. How this can be imitate programmatically (by real-time dsp processing)?
Now I have only one idea: decrease the volume and increase the delay simultaneously.
Any ideas?
BertKoor
KVRAF
 
9798 posts since 8 Mar, 2005, from Utrecht, Holland

Postby BertKoor; Tue Jun 13, 2017 1:20 am Re: Imitate moving sound away in common headphones?

Use a reverb and slowly turn it's mix from 100% dry to 100% wet (while also decreasing volume)
Maybe also slowly cut off the low tones (reverse of proximity effect)
We are the KVR collective. Resistance is futile. You will be assimilated. Image
My MusicCalc is back online!!
User avatar
nonnaci
KVRist
 
161 posts since 7 Feb, 2017

Postby nonnaci; Tue Jun 13, 2017 1:25 am Re: Imitate moving sound away in common headphones?

Do you want accurate Doppler effect with this? If so, you'll need to resample part of the the dry output as a first-order approximation.
mcbpete
KVRian
 
572 posts since 24 Jun, 2006, from London, England

Postby mcbpete; Tue Jun 13, 2017 1:45 am Re: Imitate moving sound away in common headphones?

Use Tokyo Dawn Labs' free Proximity plugin, automate the distance parameter .... And you're done :) http://www.tokyodawn.net/proximity/

EDIT: Damn, sorry - I didn't see this was in the DSP/Plug-In development subfolder .... Ignore this !
Last edited by mcbpete on Tue Jun 13, 2017 3:31 am, edited 1 time in total.
mezmay
KVRer
 
14 posts since 3 Mar, 2016, from Russia

Postby mezmay; Tue Jun 13, 2017 3:19 am Re: Imitate moving sound away in common headphones?

nonnaci wrote:resample part of the the dry output as a first-order approximation.

Could you explain what is it in this case?

For example I've found the code in the Chaotic-DAW sources:
Code: Select all
// rosic-includes:
#include "../math/rosic_RealFunctions.h"

namespace rosic
{
 //This class combines a first order low-shelving and a first order high-shelving
 //filter into one biquad-section to be used as bass/treble control.

 class ToneControl
 {
 public:
  // parameter settings:

  void setSampleRate(double newSampleRate);
  ///< Sets the sample-rate for this filter.

  void setLowCornerFreq(double newLowCornerFreq);
  /**< Sets the corner frequency of the low-shelving filter - the corner
       frequency is defined to be the frequency whe the gain in dB is at it's
       half-point. */

  void setLowGain(double newLowGain);
  /**< Sets the gain of the low-shelving filter in dB */

  void setHighCornerFreq(double newHighCornerFreq);
  /**< Sets the corner frequency of the high-shelving filter. */

  void setHighGain(double newHighGain);
  /**< Sets the gain of the high-shelving filter in dB. */
  // audio processing:

  INLINE double getSample(double in);
  ///< Calculates one output sample at a time.
//...
//...
inline double ToneControl::getSample(double in)
 {
  // calculate output-sample:
  out = b0*in + b1*x1 + b2*x2 + a1*y1 + a2*y2;

  // update buffer-variables:
  x2 = x1;
  x1 = in;
  y2 = y1;
  y1 = out;

  return out;
 }

Is this what I need?

Moderator: Moderators (Main)

Return to DSP and Plug-in Development