Dear sounders!
I am trying to mimic a recorded sound by creating an impulse response based on the recording and convolving white noise. The recording is broadband in its nature, but with some tone-like characters. The synthesis works as well as can be expected, but now I want to be able to pitch shift the resulting sound. Since I don’t really use oscillators, I wonder if there are some simple tricks to apply? I tried pvscale, but I get comb filter-like artefacts that I really would like to avoid. One idea I have is to read the impulse response with diskin using pitch shift, and writing the result to a table (with e.g. tabw) and then to use dconv based on that table to get the result. The IR is about 0.5 seconds, so I suppose it should be ok, but it feels a bit cumbersome. I guess I could also do something clever with doppler to have something like a continuous approaching or receding sound…
Also alternatively you can write the sound to a function table and read it with temposcal (or mincer). That uses time-domain resampling instead of frequency-domain pitch shifting.
You can do this in a streaming fashion by using tablew to write the table. Of course there will be some latency, but I suppose you’re not worried about it.
Prof. Victor Lazzarini
Maynooth University
Ireland
Also alternatively you can write the sound to a function table and read it with temposcal (or mincer). That uses time-domain resampling instead of frequency-domain pitch shifting.
You can do this in a streaming fashion by using tablew to write the table. Of course there will be some latency, but I suppose you’re not worried about it.
Prof. Victor Lazzarini
Maynooth University
Ireland
Warning
This email originated from outside of Maynooth University’s Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
Dear sounders!
I am trying to mimic a recorded sound by creating an impulse response based on the recording and convolving white noise. The recording is broadband in its nature, but with some tone-like characters. The synthesis works as well as can be expected, but now I want to be able to pitch shift the resulting sound. Since I don’t really use oscillators, I wonder if there are some simple tricks to apply? I tried pvscale, but I get comb filter-like artefacts that I really would like to avoid. One idea I have is to read the impulse response with diskin using pitch shift, and writing the result to a table (with e.g. tabw) and then to use dconv based on that table to get the result. The IR is about 0.5 seconds, so I suppose it should be ok, but it feels a bit cumbersome. I guess I could also do something clever with doppler to have something like a continuous approaching or receding sound…
Hi,
The liveconvolver csd at https://github.com/Oeyvind/liveconvolver has functionality for pitch shifting the IR. It is similar to what you describe in reading the sound faster/slower and then writing to a new IR. The pitching happens around line 470.
Øyvind
Dear sounders!
I am trying to mimic a recorded sound by creating an impulse response based on the recording and convolving white noise. The recording is broadband in its nature, but with some tone-like characters. The synthesis works as well as can be expected, but now I want to be able to pitch shift the resulting sound. Since I don’t really use oscillators, I wonder if there are some simple tricks to apply? I tried pvscale, but I get comb filter-like artefacts that I really would like to avoid. One idea I have is to read the impulse response with diskin using pitch shift, and writing the result to a table (with e.g. tabw) and then to use dconv based on that table to get the result. The IR is about 0.5 seconds, so I suppose it should be ok, but it feels a bit cumbersome. I guess I could also do something clever with doppler to have something like a continuous approaching or receding sound…
Hello again!
Before delving into the live convolver (and before digging up my copy oth The Csound Book) I have been trying a bit with temposcal. This is what I have so far
;;try temposcal with continuously updated table
andx lphasor 1, 0, 2*ksmps, 1, ksmps ; loop through ksmps indices
tablew asig, andx, ifTabNo ; write sound to table
atps temposcal 1, 1, p5, k(ifTabNo), 0 ; play audio from table using pitch shift
I of course need the writing to be a bit ahead of the reading for it to work, and here I just shifted the writing forward half the table size. I initialize the table with silence (sine wave of amplitude zero). Is there a smarter way to achieve this, so that e.g. the reading of the table is delayed ksmps samples?
Öyvind,
If I understand the live convolver code correctly, pitch shifting is basically just looping through the IR table indices at different rates?
The lines
andx_source line 0, 1, idirection/gi_sourcebuf_len_sec
andx_source wrap (andx_source*ipitch)+kndx_start-ipresample, 0, 1
andx_IR line 0, 1, 1/giIR_maxlen_sec
a1 table andx_source, gi_sourcebuf, 1
in your example is what I am looking at.
Or have I misunderstood what is being done?