PDA

View Full Version : Using pitchshifter


junioreq
07-25-2010, 09:11 PM
Just wondering what the following are?

void set_nch(int nch) = prob num chans...
void set_formant_shift(double shift)
int ws_ms, int os_ms


Is that number of channels and not sure what formant shift is..

processing function:

void PitchShift(WDL_SIMPLEPITCHSHIFT_SAMPLETYPE *inputs, WDL_SIMPLEPITCHSHIFT_SAMPLETYPE *outputs, int nch, int length, double pitch, double srate, int ws_ms, int os_ms);



I tried pitchShift.set_srate(SR);
pitchShift.set_nch(2);
pitchShift.set_shift(2.0);
pitchShift.set_tempo(120.0);
pitchShift.set_formant_shift(2.0);
pitchShift.PitchShift(*in1,*out1,2,2,2.0,SR,23,2);

but got the error, could not convert parameter 1 from double to double... that being *in11


If I remove the pointer from in1 I get: IPlugExample.obj : error LNK2019: unresolved external symbol "public: void __thiscall WDL_SimplePitchShifter::PitchShift(double *,double *,int,int,double,double,int,int)" (?PitchShift@WDL_SimplePitchShifter@@QAEXPAN0HHNNH H@Z) referenced in function "public: virtual void __thiscall PlugExample::ProcessDoubleReplacing(double * *,double * *,int)" (?ProcessDoubleReplacing@PlugExample@@UAEXPAPAN0H@ Z)


!Rob.

Tale
07-26-2010, 05:31 AM
You get the unresolved external because there is no WDL_SimplePitchShifter::PitchShift() (at least, not in simple_pitchshift.h). Perhaps you meant PitchShiftBlock()? However, that is a private method, so you cannot call it directly.

junioreq
07-26-2010, 09:02 AM
Its there, and its public:


void PitchShift(WDL_SIMPLEPITCHSHIFT_SAMPLETYPE *inputs, WDL_SIMPLEPITCHSHIFT_SAMPLETYPE *outputs, int nch, int length, double pitch, double srate, int ws_ms, int os_ms);


????

Well, I'm prob out of my league here in using this anyway lol.. if I dont understand the above line lol.. I always find it hard being able to tell WHAT I need to pull out of the .h to make stuff work.... I figured that is the processing function.. the others set the variables.

bvesco
07-26-2010, 11:03 PM
What are the ws_ms and os_ms params for?

Also, your compilation error stems from the fact you are trying to pass the first value of your input array instead of passing a pointer to the beginning of the first byte of memory in the array. Pass a pointer, don't dereference it.

Tale
07-27-2010, 12:41 AM
Its there, and its public:
I have found it now, in WDL v2010.06.07. However, the pitch shifter has been updated in the latest WDL (v2010.07.14), and in the new version there no public PitchShifter() method.

eviluess
03-06-2018, 09:59 PM
I have found it now, in WDL v2010.06.07. However, the pitch shifter has been updated in the latest WDL (v2010.07.14), and in the new version there no public PitchShifter() method.

I think the class is discarded by WDL because it's not better than any other algorithm.

Xenakios
03-07-2018, 11:24 AM
I think the class is discarded by WDL because it's not better than any other algorithm.

I think it's probably still in WDL and working because Reaper itself has it available, as the "simple windowed (fast)" option. (And actually it's pretty much the worst possible algorithm, but that's what makes it interesting for sound mangling use... ;) )