# Pvshift

**URL:** <https://forum.csound.com/t/pvshift/1279>\
**Category:** General\
**Created:** [July 22, 2023, 3:57pm UTC](https://forum.csound.com/t/pvshift/1279 "2023-07-22T15:57:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gppp](https://forum.csound.com/user_avatar/forum.csound.com/gppp/32/384_2.png) [@Gppp](https://forum.csound.com/u/Gppp)\
**Post date:** [July 22, 2023, 3:57pm UTC](https://forum.csound.com/t/pvshift/1279/1 "2023-07-22T15:57:50Z")

</div>

Hello everybody,

another question to Joachim who is the father of this opcode. The first three parameters of Pvshift are supposed to be k-parameters.  
I set a simple control using line, to dynamically shift the lowest frequency of the spectrum  
But I can’t notice any shifting. Did I make something wrong?

-odac

sr = 96000  
ksmps = 256  
nchnls = 2  
0dbfs = 1

instr 1  
ilowesta = p4  
ilowestb = p5  
ishift = p6  
ikeepform = p7; 0=no formant keeping, 1=keep by amps, 2=keep by spectral envelope

klowest line ilowesta, 20, ilowestb

asig1, asig2 soundin “Mi\_03\_CTS3\_CrCl03\_08.aif”  
fsig1 pvsanal asig1, 8192, 256, 8192, 1 ; analyse it  
fshift1 pvshift fsig1, ishift, klowest, ikeepform; shift frequencies  
aout1 pvsynth fshift1; resynthesize

;asig2 soundin “Ponte\_traghetto\_3\_raw\_Sel\_raw\_01\_CTS10-R.aif”  
fsig2 pvsanal asig2, 8192, 256, 8192, 1 ; analyse it  
fshift2 pvshift fsig2, ishift, klowest, ikeepform; shift frequencies  
aout2 pvsynth fshift2; resynthesize

```
	 outs aout1, aout2

```

endin

i1 0 20 50 1000 50 0 e

---

<div class="post-metadata">

**Author:** ![ST\_Music](https://forum.csound.com/user_avatar/forum.csound.com/st_music/32/239_2.png) [@ST\_Music](https://forum.csound.com/u/ST_Music)\
**Post date:** [July 22, 2023, 8:34pm UTC](https://forum.csound.com/t/pvshift/1279/2 "2023-07-22T20:34:10Z")

</div>

I know you asked Joaquim, but in the meantime this may help.

I’m not sure exactly what result you intend to achieve, but without the soundfile (aif) it’s hard to discuss specifics.

The ishift value you have is relatively low, especially when it changes over a duration of 20 seconds, so depending on the soundfile may not be very audible.

Here, with a the ishift value changed to 500, the shifting is pretty obvious:

```csound
<CsoundSynthesizer>
<CsOptions>
 -odac
 -o pvshift.wav
</CsOptions>
;==================================
<CsInstruments>

sr = 96000
ksmps = 256
nchnls = 2
0dbfs = 1

instr 1
ilowesta = p4
ilowestb = p5
ishift = p6
ikeepform = p7; 0=no formant keeping, 1=keep by amps, 2=keep by spectral envelope

klowest line ilowesta, 19.4, ilowestb

asig1 diskin2 "fox.wav", 1, 0, 1
fsig1 pvsanal asig1, 8192, 256, 8192, 1 ; analyse it
fshift1 pvshift fsig1, ishift, klowest, ikeepform; shift frequencies
aout1 pvsynth fshift1; resynthesize

	 outs aout1, aout1
endin

</CsInstruments>
;==================================
<CsScore>

i1 0 19.4 50 1000 500 0
e

</CsScore>
</CsoundSynthesizer>

```

Best,  
Scott

---

<div class="post-metadata">

**Author:** ![joachim](https://forum.csound.com/letter_avatar_proxy/v4/letter/j/a87d85/32.png) [@joachim](https://forum.csound.com/u/joachim)\
**Post date:** [July 23, 2023, 5:49pm UTC](https://forum.csound.com/t/pvshift/1279/3 "2023-07-23T17:49:48Z")

</div>

oops? just to note that the author of the opcode is (as of nearly all  
the pvs opcodes) victor lazzarini. this is also mentioned at  
[https://csound.com/docs/manual/pvshift.html](https://csound.com/docs/manual/pvshift.html)
