[Csnd] how to sustain a recorded tone
Date | 2014-08-15 22:18 |
From | Pablo Fernandez |
Subject | [Csnd] how to sustain a recorded tone |
Greetings Csound community! I have a simple question. I would like to write a csound program that sustains a recorded tone from a classical guitar for an arbitrary long time. More precisely, to sustain the steady timber that remains approx. 200 ms after plucking the string. I have been playing around with granular synthesis, but the result always has this "underwater" quality. I would like the tone to prolong as naturally as possible (and to be able to process it in real time as well). Before trying fft and additive synthesis I thought I'd better ask the experts. Any suggestions will be greatly appreciated since I am a novice user fumbling in the dark. Thanks in advance! pablo |
Date | 2014-08-15 22:25 |
From | Kevin Welsh |
Subject | Re: [Csnd] how to sustain a recorded tone |
How about looping sections of the sample with loscil? It allows you to set separate loop points for sustain and for release. http://csound.github.io/docs/manual/loscil.html On Fri, Aug 15, 2014 at 5:18 PM, Pablo Fernandez |
Date | 2014-08-16 08:57 |
From | Rory Walsh |
Subject | Re: [Csnd] how to sustain a recorded tone |
For real time, or from samples? If it's from samples then it's very easy to do with a number of opcodes, including loscil. I did something like this for real time whereby a certain amplitude value from the live signal of my guitar would trigger some samples to be written to a table and looped for an arbitrary length of time. I was looking for some kind of infinite sustain effect. Unfortunately I can't find the code right now. On 15 August 2014 23:25, Kevin Welsh |
Date | 2014-08-16 09:29 |
From | Iain McCurdy |
Subject | RE: [Csnd] how to sustain a recorded tone |
A simple method is to use pvsfreeze and to trigger ampitude and frequency freezing shortly after a note onset though amplitude tracking and a threshold trigger. I have used this in the bundled example for pvsfreeze in Cabbage. You will hear that the timbre is very static - well, frozen - if you want some spectral movement, and therefore probably greater resemblence to the source sound, I would suggest a very long time stretch using pvsbuffer/pvsbufread which could be triggered and retriggered in a similar fashion to the pvsfreeze example mentioned above. Using pvsbuffer/pvsbufread would be a bit more complicated and uinfortunately I don't have a ready-made example to give you. I > From: blopaaf@gmail.com > Date: Fri, 15 Aug 2014 23:18:27 +0200 > To: csound@lists.bath.ac.uk > Subject: [Csnd] how to sustain a recorded tone > > Greetings Csound community! > > I have a simple question. I would like to > write a csound program that sustains a recorded > tone from a classical guitar for an arbitrary long time. > More precisely, to sustain the steady timber > that remains approx. 200 ms after plucking > the string. I have been playing around with > granular synthesis, but the result always > has this "underwater" quality. I would > like the tone to prolong as naturally > as possible (and to be able to process > it in real time as well). Before trying fft and > additive synthesis I thought I'd better > ask the experts. Any suggestions will > be greatly appreciated since I am a > novice user fumbling in the dark. > Thanks in advance! > > pablo > > > Send bugs reports to > https://github.com/csound/csound/issues > Discussions of bugs and features can be posted here > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" > > > |
Date | 2014-08-16 09:54 |
From | Kevin Welsh |
Subject | Re: [Csnd] how to sustain a recorded tone |
Ah, I missed the mention of real time in your first email... Ian's suggestion of pvsfreeze would definitely be a good one to try. Another very simple alternate method could be to use a very short delay line (~.1-.2 second or so, and longer times will seem to introduce a vibrato effect) with near 100% feedback. Don't send audio for the attack and initial decay so that only the sustain gets through and is looped in the delay line, this could be done with a gate. I haven't tried this method on the guitar specifically, but I've used it for bell like recordings with success. It will lose the natural release of the note, but can sustain a very natural sounding tone for a long time. On Sat, Aug 16, 2014 at 4:29 AM, Iain McCurdy |
Date | 2014-08-16 11:46 |
From | Pablo Fernandez |
Subject | Re: [Csnd] how to sustain a recorded tone |
Thank you all for the suggestions!
I will give pvsfreeze and the delay with feedback a serious try. On 16.08.2014 10:29, Iain McCurdy wrote:
|
Date | 2014-08-16 18:47 |
From | Justin Smith |
Subject | Re: [Csnd] how to sustain a recorded tone |
I have had good luck with pvsread, with a brownian wiggle back and forth on the ktimpnt parameter (within the defined range of sustain) during the hold (so we get non-repetitive and "realistic" shifting of tonal content during the sustain, instead of an artificial freeze or obvious loop).
On Sat, Aug 16, 2014 at 3:46 AM, Pablo Fernandez <blopaaf@gmail.com> wrote:
|
Date | 2014-08-16 20:21 |
From | jpff@cs.bath.ac.uk |
Subject | [Csnd] Re: |
Attachments | None |
Date | 2014-08-19 07:57 |
From | Oeyvind Brandtsegg |
Subject | Re: [Csnd] how to sustain a recorded tone |
Also, if you decide to go back and try more on the granular approach, have a look at small random variations in the time pointer, and also slight modulations of grain rate. Use long grains (3/grainrate), and if you modulate the time pointer appropriately you can try with higher grain rates than you'd expect would work (in the 40-80 Hz range, whereas for time stretch you might normally go for something in the 10-25 Hz range) best Oeyvind 2014-08-16 19:47 GMT+02:00 Justin Smith |
Date | 2014-08-19 10:10 |
From | peiman khosravi |
Subject | Re: [Csnd] how to sustain a recorded tone |
I've just made a Max4Live device that does this with granular synthesis. Happy to send it to you if you've got live. As Oeyvind mentioned the parameters have to be carefully tweaked and the smallest amount of noise has to be added to the position of the 'playhead' to get a more natural sound.
A simple spectral freeze works too, but to get the best result this is what I'd try:
input signal --> pvsanal --> pvsblur [Average the spectral changes by 6 frames or so] --> pvsfreeze --> pvstencil [optional: to pass only the most prominent bins to avoid buzziness]
In my experience spectral averaging is the magic ingredient here. Instead of freezing a single frame you want to freeze the running average of N frames. Then running the signal through some kind of simple noise reduction ensures that you only get the most prominent harmonic content of the sound, which sounds more natural.
Another option would be to track the most prominent FFT bins and then resynthesise them with a bank of oscillators. That works well too.
Another thing, you want to add a compressor to the signal before freezing it. Use a really high ratio with quite a long attack time so that you can maximise the resonance but leave the attack portion of the note alone. And while you're at it, you might even want to use the compressors amplitude follower to also trigger your freeze...
P On 19 August 2014 07:57, Oeyvind Brandtsegg <oyvind.brandtsegg@ntnu.no> wrote: Also, if you decide to go back and try more on the granular approach, |
Date | 2014-08-19 11:15 |
From | Pablo Fernandez |
Subject | Re: [Csnd] how to sustain a recorded tone |
thanks Peiman and Oeyvind for the suggestions! I will definitely
play around with the spectral averaging. I do not use live, but thanks for the offer. So far the pv-approach seems to work quite fine for my purpose, which is to stretch a note as naturally as possible, without trying to make it richer. It seems to me that granular synthesis is more appropriate when one wants to generate a new sound. But maybe I am wrong and there is a good reason for me to stick to it... On 19/08/14 11:10, peiman khosravi
wrote:
|
Date | 2014-08-21 16:03 |
From | Matti Koskinen |
Subject | Re: [Csnd] how to sustain a recorded tone |
hi all, Do you have any csd doing this? I made in June I think, some code to do this with granular synthesis. Csound is triggered from a c++ -programme via OSC. The webcam takes a frame and writes enough frames for some time, say 5 sec, the sound (of course has to be from a previous frame) is freezed for this 5 secs. And the whole thing runs for any time, recording frames, such as freezing the reality. I went to linkedIn after long time, and saw a virtual video-project. Never done any video, but I think my concept would work (so says my alter ego). But for this I'd need something like Pablo, freezing the recorded sound. I'd like to concentrate on the video, and prefer not to start from the scratch with pv-opcodes. So, if you gentlemen have anything, even to start with, I'd most grateful. btw. This thing was inspired by Univ. of Edinburgh Warhol-course (where there was some Vicki Lazzarini?) tnx -m On 08/19/2014 01:15 PM, Pablo Fernandez
wrote:
thanks Peiman and Oeyvind for the suggestions! I will definitely play around |