[Csnd] Calculating partials manually...
Date | 2010-04-04 13:53 |
From | Anthony Palomba |
Subject | [Csnd] Calculating partials manually... |
I would like to resonate an incoming signal with streson. Streson takes as one of its parameters a fundamental frequency. I want to have a bank of stresons set at different frequencies. These would be my partials. Does anyone know of a good way I can calculate the frequency spread of partials given a fundamental freq? I assume I would be using some function to determine partial freq and volume. Thanks, Anthony |
Date | 2010-04-04 14:10 |
From | Victor Lazzarini |
Subject | [Csnd] Re: Calculating partials manually... |
The only thing with this approach is that the result will be a bit like reverberation, as each streson generates a number of harmonics. If you use various stresons, the spectrum will be filled very quickly (a bit like speaking into piano strings with the pedal depressed). If you want to do separate partials, maybe you should use resonators or the mode opcode. As for partials, it depends on where you want them? Are they harmonic? If so, it's just the harmonic series. The spectral envelope (ie. partial amplitudes) will also depend on what target sound you want to derive it from. Victor On 4 Apr 2010, at 13:53, Anthony Palomba wrote: > I would like to resonate an incoming signal with streson. > Streson takes as one of its parameters a fundamental > frequency. I want to have a bank of stresons set at different > frequencies. These would be my partials. > > Does anyone know of a good way I can calculate the frequency > spread of partials given a fundamental freq? I assume I would > be using some function to determine partial freq and volume. > > > > Thanks, > Anthony Send bugs reports to the Sourceforge bug tracker https://sourceforge.net/tracker/?group_id=81968&atid=564599 Discussions of bugs and features can be posted here To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" |
Date | 2010-04-04 14:12 |
From | Peiman Khosravi |
Subject | [Csnd] Re: Calculating partials manually... |
Hello, Do you mean you want to carry out a partial tracking analysis on a signal and then use the data to control Streson? Do you plan to have static partials or do you want to track them in time? If it's just a question of a single (static) snapshot then you can apply an amplitude threshold to a pvs signal (a frozen FFT window or better even the average of, say, six windows to eliminate noise/errors) and only pass the bins with the highest amplitudes and use them as your 'partials'. This can be done by writing your pvs signal to a table and then reading it as a k-rate number, which can then go through your threshold. The freezing can be done (before writing the data to table) with pvsfreeze. The averaging can be done with pvsblur prior to freezing the signal. But if you're looking for a proper time-varying partial tracker then either use the ATS opcodes (which is non-real-time) or the partials opcode. I've done this with ATS analysis before with good results. Have I misunderstood your question!?? Best, Peiman On 4 Apr 2010, at 13:53, Anthony Palomba wrote: I would like to resonate an incoming signal with streson. |
Date | 2010-04-04 15:42 |
From | Anthony Palomba |
Subject | [Csnd] Re: Re: Calculating partials manually... |
Well, I guess this is a lot more complicated than I thought... The main thing I want to do is to enhance or add to the spectral content of a sound to give it more character. Ideally, I would like it to be dynamic so that lower notes would have different spectral behavior. And velocity would also control the behavior of the spectrum. So from what Victor is saying, I should probably not use streson because it already creates partials. In fact, using streson or mode is not the most scalable solution. A pvs based solution, as Pieman suggested, would give me a lot more flexibility. Pieman, I am little lost in all your suggestions. I like the idea of being able to use pvs to analyze a source spectrum to create partials in my target sound. I may want to explore this some more later on. But if I don't have a source spectrum in mind, what would be the best way to inject partials in a way that I can control. In my mind, that is some kind of function that takes as parameters velocity, time, and fundamental frequency. What is the best opcode set for that, pvs? ATS? Thanks, Anthony On Sun, Apr 4, 2010 at 8:12 AM, Peiman Khosravi <peimankhosravi@gmail.com> wrote:
|
Date | 2010-04-04 16:05 |
From | Peiman Khosravi |
Subject | [Csnd] Re: Re: Re: Calculating partials manually... |
Well if you want a harmonic (pitched) spectrum then you want the harmonic partials above the fundamental to be whole number multiples of the fundamental frequency. So if your fundamental is 200 Hz then the next harmonic would be 400 (200*2), the next 600 (200*3) and so on. The relative amplitude of the partials will alter the perceived quality of the sound: you can again have a fixed amp for your fundamental's amplitude and multiply it by decimal numbers (*0.5 gives you half the amplitude) to get the harmonic's amplitudes. In order to move away from the harmonic spectrum towards inharmonicity (bell-like spectrums) you can shift the frequency of the individual harmonics by a fixed amount (so you would add, say, 100 Hz to each harmonic). Something like this would do: kshiftFreq = 0 ;zero means the spectrum will be harmonic as there is no shifting going on kfun = 200 kpartFreq2 = kfunFreq*2+kshift kpartFreq3 = kfunFreq*3+kshift kparFreqt4 = kfunFreq*4+kshift kpartFreq5 = kfunFreq*5+kshift Best, Peiman On 4 Apr 2010, at 15:42, Anthony Palomba wrote: Well, I guess this is a lot more complicated than I thought... |
Date | 2010-04-04 16:33 |
From | Anthony Palomba |
Subject | [Csnd] Re: Re: Re: Re: Calculating partials manually... |
What is the best opcode set to achieve this goal, pvs? ATS? Some other opcode? -ap On Sun, Apr 4, 2010 at 10:05 AM, Peiman Khosravi <peimankhosravi@gmail.com> wrote:
|
Date | 2010-04-04 16:41 |
From | Peiman Khosravi |
Subject | [Csnd] Re: Re: Re: Re: Re: Calculating partials manually... |
No just do it manually as demonstrated below.
Now each one of these controls the frequency of a different filter band: kfun, kpartFreq2, kpartFreq3, etc. So in the above example you would need 5 resonant filters. You would use PVS if you wanted to analyse the partials of an incoming signal. P On 4 Apr 2010, at 16:33, Anthony Palomba wrote: What is the best opcode set to achieve this goal, pvs? ATS? Some other opcode? |
Date | 2010-04-05 00:32 |
From | Anthony Palomba |
Subject | [Csnd] Re: Re: Re: Re: Re: Re: Calculating partials manually... |
Actually, I really like your original idea of using PVS to analyze a source sound and using that as my spectral template. I think it is definitely more flexible than calculating things manually. There are many sounds that are composed of partials that don't follow a formula and would be impossible to procedurally create. I think I will try implementing your suggestion. I will post what I come up with. Thanks, Anthony On Sun, Apr 4, 2010 at 10:41 AM, Peiman Khosravi <peimankhosravi@gmail.com> wrote:
|
Date | 2010-04-05 12:30 |
From | Peiman Khosravi |
Subject | [Csnd] Re: Re: Re: Re: Re: Re: Re: Calculating partials manually... |
OK. A simple way would be to do an ATS analysis using the atsa utility. Then read the individual partial's frequency and amplitudes with the ATSread opcode. So if you have 10 resonant filters then you need ten instances of ATSread, each reading a different partial. ATSread also takes a k-rate time-pointer which means that your filter's frequencies and amps can be dynamic. Best, Peiman On 5 Apr 2010, at 00:32, Anthony Palomba wrote: Actually, I really like your original idea of using PVS to analyze a source |
Date | 2010-04-05 16:25 |
From | Aidan Collins |
Subject | [Csnd] Re: Re: Re: Re: Re: Re: Re: Re: Calculating partials manually... |
One other thought, kind of combining the two concepts here.... There are plenty of tables on the web where other people have determined the partials (frequencies, pitches and durations) for things like bells and bars. You could do the method of manually setting the frequencies of filters, but use a table of pre-determined partials as a starting point. Aidan On Mon, Apr 5, 2010 at 7:30 AM, Peiman Khosravi |
Date | 2010-04-19 16:21 |
From | Anthony Palomba |
Subject | [Csnd] Re: Re: Re: Re: Re: Re: Re: Re: Re: Calculating partials manually... |
Another thought occurred to me, one could also use a tool like SPEAR to create a table of frequencies. SPEAR outputs a text file that contains frequency values. It could be easily formatted in table form. I guess I would have to decide to use a fixed number of partials. Is there some lookup table I could load my frequencies in to and then use them? -ap On Mon, Apr 5, 2010 at 10:25 AM, Aidan Collins <mr.aidan.collins@gmail.com> wrote: One other thought, kind of combining the two concepts here.... |
Date | 2010-04-19 16:47 |
From | Peiman Khosravi |
Subject | [Csnd] Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Calculating partials manually... |
In my experience ATS can produce much better analysis than spear. Note that once you have made your ats analysis file you can actually open it with spear for viewing or playback. So you get the best of both worlds. Otherwise you can use a python script or something to access the spear text file in csound and write it into a table. I've done this in the past but haven't got he script anymore. Best, Peiman On 19 Apr 2010, at 16:21, Anthony Palomba wrote: Another thought occurred to me, one could also use |
Date | 2010-04-19 17:15 |
From | Anthony Palomba |
Subject | [Csnd] Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Calculating partials manually... |
Hmmm ATS seems pretty interesting. I have not had much time to experiment with it. I will give it a try. -ap On Mon, Apr 19, 2010 at 10:47 AM, Peiman Khosravi <peimankhosravi@gmail.com> wrote:
|