[Csnd] how to improve the glissando quality with pvscale

i need microtonal glissandi on live input (accordion) for a composition.
simple usage of pvscale sounds like small steps:

instr test
   ;aSound = poscil:a(.2,400) //this is most obvious
   aSound = vco2(.2,400) //less obvious but still not good
   fSound = pvsanal(aSound,2056,512,2056,1)
   kGliss = cent(linseg:k(0,5,100))
   fGliss = pvscale(fSound,kGliss)
   aGliss = pvsynth(fGliss)
   outall(aGliss)
endin
schedule("test",0,5)

how can this be improved? pvsmooth?
or should granular synthesis be used for this purpose?

i remember a discussion here on the list years ago, but i don't remember the results.
perhaps someone did some experimenting in this field and can share some tips.

cheers -
  joachim

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        Issues · csound/csound · GitHub
Discussions of bugs and features can be posted here

Hi!

Depending on how much control need, perhaps for the effect, an old good changing delay time like vdelay would do?

Just a guess…

Tarmo

L, 12. oktoober 2024 21:02 joachim heintz <jh@joachimheintz.de> kirjutas:

i need microtonal glissandi on live input (accordion) for a composition.
simple usage of pvscale sounds like small steps:

instr test
;aSound = poscil:a(.2,400) //this is most obvious
aSound = vco2(.2,400) //less obvious but still not good
fSound = pvsanal(aSound,2056,512,2056,1)
kGliss = cent(linseg:k(0,5,100))
fGliss = pvscale(fSound,kGliss)
aGliss = pvsynth(fGliss)
outall(aGliss)
endin
schedule(“test”,0,5)

how can this be improved? pvsmooth?
or should granular synthesis be used for this purpose?

i remember a discussion here on the list years ago, but i don’t remember
the results.
perhaps someone did some experimenting in this field and can share some
tips.

cheers -
joachim

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Unrelated but why 2056? It's not a power of two and 512 does not divide it evenly. Should you not use 2048?

Prof. Victor Lazzarini
Maynooth University
Ireland

yes good idea --- i always forget about this old technique although it is very useful for many use cases ...
thanks!
  j

yes right --- this was my mistake.
it does not affect the sound output; i guess pvsanal always round to the next power of two.

It just uses a non-pow-of-two FFT, so it's not so efficient.

You can try using additive synthesis (eg pvadd or partials/tradsyn), maybe with port on the control signal.

Prof. Victor Lazzarini
Maynooth University
Ireland

thanks to tarmo's suggestion i remembered that i already worked some time ago on a UDO for live transposition (pitch-shifting) via delay. there was a good comment by jeanette at this time, too, so i looked closer now and came to a new version.

the main improvement is the use a hamming window for the cross-fade of the two delay lines. i am surprised how well this works; but most probably this is actually the description of what the hamming window is about ...

the side effect of this window is that there is not need to move the delay time (as i thought in my first version) to avoid AM artifacts when using delay times < 1/20 second.

as far as i see, there is no problem to use a delay time (= latency) of 1/100 (0.01) seconds. if i did not overlook anything, this is really a dream for live applications ...

i know here on this list are many who have much more knowledge than me in this field. so i would appreciate falsification of my big self-advertisement (only the "donate now!" button is missing ... =). i would even claim that it sounds much better than the "transpose" object in max (which because of the AM issue does noc allow latencies lower than 0.125 seconds!).

the UDO code and examples are here: csudo/misc/DelTp.csd at master · csudo/csudo · GitHub

cheers -
  joachim

This approach sounds surprisingly good for stationary sounds and small transposition intervals. It has the known drawbacks of many delay based pitchshifters, particularly short percussive sounds can break into multiple attacks because of windowing, but compared to faust’s transpose it has better quality delay. A nice detail about the faust implementation is the possibility to customize the crossfade duration which can help in certain cases. There is a csound native implementation here: https://github.com/csound-plugins/csound-plugins/blob/master/src/else/src/else.c#L5802, docs: https://csound-plugins.github.io/csound-plugins/opcodes/transpose.html. It is surprisingly efficient, probably due to the delay being just linearly interpolated

thanks for diving into it and pointing to the faust implementation!
and also for the interesting example / comparision.
your plugins collection is really "krass" (german). i am already using csound7 develop: can i use risset for it, too? or do you need to do changes?