[Csnd] pitch shifting
Date | 2022-06-02 17:12 |
From | Anders Genell |
Subject | [Csnd] pitch shifting |
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... Regards, Anders |
Date | 2022-06-02 17:51 |
From | Victor Lazzarini |
Subject | Re: [Csnd] [EXTERNAL] [Csnd] pitch shifting |
You can try a delay line pitch shifter. Look at Russell Pinkerton's chapter in the Csound book (2000). Prof. Victor Lazzarini
Maynooth University
Ireland
On 2 Jun 2022, at 17:13, Anders Genell <anders.genell@gmail.com> wrote:
|
Date | 2022-06-02 17:59 |
From | Victor Lazzarini |
Subject | Re: [Csnd] [EXTERNAL] [Csnd] pitch shifting |
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
On 2 Jun 2022, at 17:13, Anders Genell <anders.genell@gmail.com> wrote:
|
Date | 2022-06-02 18:56 |
From | Anders Genell |
Subject | Re: [Csnd] [EXTERNAL] [Csnd] pitch shifting |
Thank you, Victor! I shall explore both these avenues, though a priori I am partial to the temposcal solution. Regards, Anders tors 2 juni 2022 kl. 18:59 skrev Victor Lazzarini <Victor.Lazzarini@mu.ie>:
|
Date | 2022-06-02 23:10 |
From | Oeyvind Brandtsegg |
Subject | Re: [Csnd] pitch shifting |
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 tor. 2. jun. 2022, 6:12 p.m. skrev Anders Genell <anders.genell@gmail.com>:
|
Date | 2022-07-21 20:22 |
From | Jonathan Cohen |
Subject | [Csnd] outvalue callback behavior question |
Dear CSound Folks, I have a question about the expected behavior of the outvalue callback. I'm using the CSound version 6.16 library via Python 3.83 under Windows 10. The callback is working fine, but if I use it at k-rate, there seems to be an extra invocation of it at init time. For example, if in the python code I set up the callback with: and the CSound code looks something like:
Then out_value_callback will be triggered twice, once when the instr begins and once when the instr ends. The output results in Python will be:
My workaround is to ignore the callback when the channel value ==
0, but I was wondering whether the invocation of the callback at
init time was expected behavior, or if not, what I have done to
trigger it unintentionally. Thank you very much. Cheers, - j
|
Date | 2022-07-21 22:59 |
From | Eduardo Moguillansky |
Subject | Re: [Csnd] outvalue callback behavior question |
Looking at the code, there is a hardcoded invocation of the
callback at init time together with the comment "send output now
for use during i-pass". I don't think that you can avoid it. On 21.07.22 21:22, Jonathan Cohen
wrote:
|
Date | 2022-07-22 21:34 |
From | Jonathan Cohen |
Subject | Re: [Csnd] outvalue callback behavior question |
Thank you Eduardo--much appreciated. (Will try looking at the
source next time I have a question.) Cheers, - j
|