what's the opinion of the list as the most efficient method to make a large bank of harmonically related sines (say 50-200 partials)? is it just a group of osc~, or phasor~ or something else entirely?
++++++++ tom erbe . soundhack 608 carla way . la jolla . ca . 92037 http://www.soundhack.com . soundhack@san.rr.com aim/ichat: thomaserbe ++++++++
You could draw the spectrum in an array, send it to rifft~, and send the output to another array that you could use as a wavetable - something like
[tabreceive~ spectrum] | [rifft~] | [tabsend~ wavetable]
then
[phasor~] | [*~ <arraysize>] | [tabread4~ wavetable]
Ben
On Monday 08 December 2003 12:52 pm, Tom Erbe wrote:
what's the opinion of the list as the most efficient method to make a large bank of harmonically related sines (say 50-200 partials)? is it just a group of osc~, or phasor~ or something else entirely?
++++++++ tom erbe . soundhack 608 carla way . la jolla . ca . 92037 http://www.soundhack.com . soundhack@san.rr.com aim/ichat: thomaserbe ++++++++
PD-list mailing list PD-list@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-list
You could draw the spectrum in an array, send it to rifft~, and send the output to another array that you could use as a wavetable - something like
[tabreceive~ spectrum] | [rifft~] | [tabsend~ wavetable]
then
[phasor~] | [*~ <arraysize>] | [tabread4~ wavetable]
Yes, this is a good idea
just keep in mind that if you want to control graphically the amplitude of 500 partials (for example), the "spectrum" array / table must have a width of 500 pixels or more
Hmmm, methinks that method works only for static sound. For applications with independent volume envelopes of the partials you'd have to think of something else.... the question is, whether the volume changes can be instantaneous (where a real oscillator bank has to be used) or can have some fixed granularity (then inverse fft is possible)
greetings, Thomas
----- Original Message ----- From: julien.breval@tremplin-utc.net To: "Ben Saylor" bensaylor@fastmail.fm Cc: "Tom Erbe" tomerbe@san.rr.com; PD-list@iem.at Sent: Tuesday, December 09, 2003 12:49 PM Subject: Re: [PD] efficient bank of sines
You could draw the spectrum in an array, send it to rifft~, and send the output to another array that you could use as a wavetable - something like
[tabreceive~ spectrum] | [rifft~] | [tabsend~ wavetable]
then
[phasor~] | [*~ <arraysize>] | [tabread4~ wavetable]
Yes, this is a good idea
just keep in mind that if you want to control graphically the amplitude of 500 partials (for example), the "spectrum" array / table must have a width of 500 pixels or more
PD-list mailing list PD-list@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-list
On Monday 08 December 2003 12:52 pm, Tom Erbe wrote:
what's the opinion of the list as the most efficient method to make a large bank of harmonically related sines (say 50-200 partials)? is it just a group of osc~, or phasor~ or something else entirely?
All really depends on how much control you want over it.
If you only need to change the fundamental pitch and overall amplitude, you just need to implement a wavetable synth, and generate the appropriate wavetable, like Ben describes. Could also be done with the sinesum (?) message to an array.
If you need frame-based control over the individual amplitudes, you can do the overlap-add ifft-synthesis with block~ and rifft~.
If you need to change the spectrum only once in a while, you can put the rifft~ and tabsend~ in a subpatch. Switch~ it off with bang~, so it runs only once each time you switch~ it on.
An improved version of this uses multiple wavetables and crossfades between them so that there are no clicks when changing the spectrum.
If audio-rate control over the individual amplitudes and/or pitches is required, you'll need osc~'s and a fast computer.
Correct me if I'm wrong somewhere.
BTW: Are those guard points still required for correct use of tabread4~? How can we generate them elegantly when not generating the wavetable with sinesum?
j#|@
thanks for all the good ideas... i will actually be writing an external tonight based on the table->rifft->tablelookuposc idea, as i think that will give me the best performance (and i do want frame-based control over all of the partials).
On Dec 9, 2003, at 4:21 AM, Johannes Taelman wrote:
On Monday 08 December 2003 12:52 pm, Tom Erbe wrote:
what's the opinion of the list as the most efficient method to make a large bank of harmonically related sines (say 50-200 partials)? is it just a group of osc~, or phasor~ or something else entirely?
All really depends on how much control you want over it.
If you only need to change the fundamental pitch and overall amplitude, you just need to implement a wavetable synth, and generate the appropriate wavetable, like Ben describes. Could also be done with the sinesum (?) message to an array.
If you need frame-based control over the individual amplitudes, you can do the overlap-add ifft-synthesis with block~ and rifft~.
If you need to change the spectrum only once in a while, you can put the rifft~ and tabsend~ in a subpatch. Switch~ it off with bang~, so it runs only once each time you switch~ it on.
An improved version of this uses multiple wavetables and crossfades between them so that there are no clicks when changing the spectrum.
If audio-rate control over the individual amplitudes and/or pitches is required, you'll need osc~'s and a fast computer.
Correct me if I'm wrong somewhere.
BTW: Are those guard points still required for correct use of tabread4~? How can we generate them elegantly when not generating the wavetable with sinesum?
j#|@
PD-list mailing list PD-list@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-list
++++++++ tom erbe . soundhack 608 carla way . la jolla . ca . 92037 http://www.soundhack.com . soundhack@san.rr.com aim/ichat: thomaserbe ++++++++
Hi,
Before you do, I've already made an external that does that (however, it requires the FFTW3 library and is hardcoded for 64 partials). It's bandlimited (partials that would be above the nyquist are muted).
http://home.gci.net/~pamsaylor/ben/sosc~-0.1.tar.gz
Ben
On Tuesday 09 December 2003 4:57 pm, Tom Erbe wrote:
thanks for all the good ideas... i will actually be writing an external tonight based on the table->rifft->tablelookuposc idea, as i think that will give me the best performance (and i do want frame-based control over all of the partials).
On Dec 9, 2003, at 4:21 AM, Johannes Taelman wrote:
On Monday 08 December 2003 12:52 pm, Tom Erbe wrote:
what's the opinion of the list as the most efficient method to make a large bank of harmonically related sines (say 50-200 partials)? is it just a group of osc~, or phasor~ or something else entirely?
All really depends on how much control you want over it.
If you only need to change the fundamental pitch and overall amplitude, you just need to implement a wavetable synth, and generate the appropriate wavetable, like Ben describes. Could also be done with the sinesum (?) message to an array.
If you need frame-based control over the individual amplitudes, you can do the overlap-add ifft-synthesis with block~ and rifft~.
If you need to change the spectrum only once in a while, you can put the rifft~ and tabsend~ in a subpatch. Switch~ it off with bang~, so it runs only once each time you switch~ it on.
An improved version of this uses multiple wavetables and crossfades between them so that there are no clicks when changing the spectrum.
If audio-rate control over the individual amplitudes and/or pitches is required, you'll need osc~'s and a fast computer.
Correct me if I'm wrong somewhere.
BTW: Are those guard points still required for correct use of tabread4~? How can we generate them elegantly when not generating the wavetable with sinesum?
j#|@
PD-list mailing list PD-list@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-list
++++++++ tom erbe . soundhack 608 carla way . la jolla . ca . 92037 http://www.soundhack.com . soundhack@san.rr.com aim/ichat: thomaserbe ++++++++
PD-list mailing list PD-list@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-list
Hi Tom, the efficiency of the method depends mostly on the relationship of the several partials. If they all are multiples of a base frequency, like in a discrete Fourier transform, or follow some other _fixed_ pattern, an implementation as an external (as existent in Max/MSP) should be much more efficient than a patch with many instances of osc~.
greetings, Thomas
----- Original Message ----- From: "Tom Erbe" tomerbe@san.rr.com To: PD-list@iem.at Sent: Monday, December 08, 2003 10:52 PM Subject: [PD] efficient bank of sines
what's the opinion of the list as the most efficient method to make a large bank of harmonically related sines (say 50-200 partials)? is it just a group of osc~, or phasor~ or something else entirely?
++++++++ tom erbe . soundhack 608 carla way . la jolla . ca . 92037 http://www.soundhack.com . soundhack@san.rr.com aim/ichat: thomaserbe ++++++++
PD-list mailing list PD-list@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-list