Complex Waveforms
Why not just do it in a wavetable using tabosc4~?
The math is essentially the same, add a bunch of sine waves with different phases and amplitudes.
Help on storing some values in array $0
I've had a look at the patch and I also didn't really understood what you try to do. However, there are two possibilities to work with arrays/tables:
1. at control rate: for this you can use [tabwrite]and [tabread] to get data in and out, or you can also get data in and out by sending messages to the table with a simple object. There are some more options which can be found in the help-browser.
2. at audio rate: usually [tabwrite~] is used to write audio streams to tables. To read them out, there's a number of options: [tabplay~], [tabread4~], [tabosc4~], among others. Again right-click those objects to open their - usually comprehensive - help patches.
Hope this helps?
D.
Guard points for tabosc4~
I was just wondering if someone could explain guard points to me please. Specifically, the guard points that tabosc4 requires its table to have. The documentation is a bit confusing:
Lets say i've got my 2^n sized table here holding these values:
[1 2 3 4 5 6 7 8]
According to audio.examples/B01.wavetables.pd,
"...tabosc4~ requires that the table have a power of two plus three points (64+3=67, 128+3=131, 256+3=259, etc.) If you want wraparound to work smoothly, you should make the last three points copies of the first three. "
so, in order for wraparound to work "smoothly" my table should look like this?
[1 2 3 4 5 6 7 8 1 2 3]
tabosc4~help.pd says something different:
"The table should have a power of two points plus three "guard points", one at the beginning and two at the end, which should be wraparound copies of the last point and the first two points, respectively."
so should my table should look like this?
[8 1 2 3 4 5 6 7 8 1 2]
I'm so confused! I know that tables must be of size (2^n)+3 thats fine, i just don't understand what these guard points are all about. Can someone help me?
Thank you 
Blending/Crossfading wavetables
tabsend~ won't do since it works at the rate of the patch's blocksize. For tabosc4~ the table size has to be 2^x+3. That plus 3 gets in the way.
You can try using a blocksize that is larger than the table size but I'm not sure if that will work.
Blending/Crossfading wavetables
@saturno said:
you can either mix the output of the tabosc4~ object (I'm assuming you're using that to playback the wavetable) or you can mix them with a tabplay~ and write that onto a new array making a new wavetable.
As far as the mixing Vixus' comment explains it.
Well yes, kind off...
I'm trying to get the result output into an array called 'blend' and the synth is using using that table to derive its waveform. The table has to be updated realtime...I think [tabsend~] is the way to go, but I need to figure the correct rate to drive the [tabosc4~] feeding it. Or, maybe there is a better way ??
cheers
Blending/Crossfading wavetables
you can either mix the output of the tabosc4~ object (I'm assuming you're using that to playback the wavetable) or you can mix them with a tabplay~ and write that onto a new array making a new wavetable.
As far as the mixing Vixus' comment explains it.
Is this possible in PD?
Was quite intrigued by this algorithm so I whipped an implementation up. Took me a while but I got it mostly right. Well... got something working. Haven't actually checked out the original to see how it compares.
There is one big difference though. I use a block size of 512 samples and fix the fundamental frequency to that size (comes out to about 86.13Hz). Then I scale the amplitude list proportionally to an arbitrarily chosen base frequency and the played frequency. This way it's easier to work with tabosc4~ and at 512 samples the computation time is short enough to play live (raise the sampling rate to get better results).
Requires PD-Extended and you need to unzip it onto your path.
On Mac OS X it would look like this:
~/Library/Pd/zynpadsynth/help-zynPadsynth.pd
~/Library/Pd/zynpadsynth/relF.pd
~/Library/Pd/zynpadsynth/waitblock.pd
~/Library/Pd/zynpadsynth/presets/melow.txt
~/Library/Pd/zynpadsynth/presets/reed.txt
~/Library/Pd/zynPadsynth.pd
~/Library/Pd/zynPadsynthGUI.pd
Open zynpadsynth/help-zynPadsynth.pd
Let me know what you think.
Snare synthesis
Using noise by itself leaves the snare a little to hihaty. I like using it in conjunction with wavetable synthesis to lower the noise's pitch.
This example here uses [tabosc4~] to do just that. It's just a demonstration. You can set the pitch to taste, add filters and change the envelope.
You could also use it mixed with the unaltered noise to get more high frequencies.
Just open help-snare-wt~.pd and click on the bang.
Tabosc4~ change from .38 to .40?
ummmm... I built this wav table synth patch in .38 (to make use of some extended functions) but when I learned the beauties of GOP in .40 I had to upgrade. But the tabosc4~ seems to be reproducing all sorts of weird noise and overtones that I didn't get in my original patch. I'm talking about nyquist foldover artifacts (the pitches that move in retrograde to the direction you sweep the oscilator) at very low frequencies. Has anyone else experienced this?
The patch worked marvelously in .38, and I made sure my arrays followed the n^2+3 rule for tabosc4~...
peace and humptiness forever
Pd 040-1 UB on OS X
has anyone had any trouble with tabosc4~ operation with this version of pd? i've tested the tabosc4~ on a PC running XP Pro SP2a and 040-1 and did not experience any problems.
when i run the Help patch for tabosc4~ for example the object doesn't respond correctly to sig~ and things can quickly blow up.
