feedback
@oid phase cancellation due to a signal added to itself delayed by 1 (or more) sample(s) is the building block of most digital filters.
you basically recreated [rpole~ -1]
(and if you subtract the 1-sample delayed input instead of the output it's [rzero~ 1]
)
One way to think about it is that a signal with a delay added to itself is a comb filter, and if the delay is 1 sample then there will just be 1 comb 'tooth' in the amplitude response
(so you can analyze the frequency response of comb filters for other sample lengths of delay)
https://ccrma.stanford.edu/~jos/pasp/Comb_Filters.html
allpass filters (used to build phasers) are very related
https://ccrma.stanford.edu/~jos/pasp/Allpass_Two_Combs.html
this isn't so much a 'pd' thing, more of a 'digital/sampled audio' thing
90-second limit on audio buffers?
phasor~ way isn't sufficient for many use cases; perhaps a new object would be useful, or, the accumulator technique would be useful as a more prominent part of pd culture.
@ddw_music Just chiming in, to say thank you.
I am always interested in how to make Pd sound better: Not only looking for more Pd-double developement, but also for such basic insights.
Vanilla's oscillators use the "Höldrich method", of which I get an idea, but – like most of us? - do not understand fully in depth.
So don’t want to muddy the waters.
Just sharing some related links on the topic:
[phasor~]'s source:
https://github.com/pure-data/pure-data/blob/master/src/d_osc.c
Miller on the method:
http://lalists.stanford.edu/lad/2000/Sep/0188.html
@seb-harmonik.ar explaining:
https://forum.pdpatchrepo.info/topic/8691/generating-sines-in-plain-c-on-arm-understanding-osc-guts/3
Does Pd have a "sound"? (vs. SC)
https://lists.puredata.info/pipermail/pd-list/2016-02/113248.html
(...discussion containing partly false information, too I think...)
A stub, not explaining the method:
https://github.com/TonicAudio/Tonic/wiki/Fast-Phasor-ala-R.-Hoelderich
(The quoted paper appears to be the wrong one or missing:
1995 ICMC“An Accurate Signal Representation for Sound Resynthesis Utilizing a Time-Frequency Mapping of the DFT-Magnitude”
it is not. )
Control Pd headless from another instance of Pd on another computer?
@cfry Why it might not help much.....https://lists.puredata.info/pipermail/pd-list/2012-02/094145.html
What happens as Pd connects to the Gui.........https://puredata.info/docs/developer/PdStartupOrder
Command flags........ https://puredata.info/docs/faq/commandline/?searchterm=flags
You will need to start Pd with the -guiport or the -guicmd flags depending on how you will achieve your aim.
There is help mentioned at the bottom of the page for that...... here is a direct link....... https://lists.puredata.info/pipermail/pd-list/2007-08/052604.html ...... but it's not very helpful.
Everything would have to pass through a network connection though...... so I am not sure that things will improve.
If your VNC connection is stable you can edit your patch through the VNC viewer.
When you want to run it then you can start Pd on the RPI with the -nogui flag (see the command link above) which will help.
David.
using 0..10hz osc~ as amplitude modulation, when i get to 0, there's an audible click
@esaruoho when it gets to 0 frequency, use a [line~] going into the same inlet as the osc~ and ramp from
0 to the difference between the output value at the phase you want to set and the current output value (get w/ [snapshot~]). (so if current output of the osc~ is -0.25 and will be 1 when the phase gets set, ramp from 0 to 1,25).
then after the ramp is done, set the osc~ phase and reset the line~ to 0 at the same time.
this technique is called 'switch and ramp' and is explained by miller in his book http://msp.ucsd.edu/techniques/v0.11/book-html/node63.html
(here I did it in reverse by ramping first and then switching, but you could also simply add the discontinuity when you change the phase and ramp to 0. that would work to eliminate the discontinuity as well, but in that case the artifact might be more prominent bc the frequency is higher)
How do I clean the output from the fiddle~ object
@MCS740 First of all. 0.5 ms wont exactly smooth your output. If you are running at 48khz with a block size of 64, the update rate of your pitch/amp outputs will happen every 1.33333 ms. 1000*blocksize/samplerate
is the formula. If you want things to change in a more smooth fashion you need to tell your [line~] object to work slower than that. Also consider that any fluctuation faster than 50ms is perceived by the ear in the tonal range, hence it will be noisy / clicky. Also try @ddw_music 's averaging filter before you add [line~] to the mix
Now about the peaks changing place by the order of amplitude causing pitch to glitch, you can perhaps ameliorate this by running your sample through a lowpass filter, imposing a 3db/octave roll off - and make up for it with a high shelf filter on your final output.
BUT what I was really on about was you don't need to do all that. In order to synthesize your guitar sample all you need is the amplitudes of each partial / envelope of the harmonic spectrum. Fiddle is not ideal for this purpose. Sigmund might be better? FFT is better suited, but will take a completely different (and hairy) approach.
Guru meditation: http://www.pd-tutorial.com/english/ch03s08.html + http://msp.ucsd.edu/techniques/v0.11/book-html/node179.html
Are there any resources on manipulating waveforms in interesting ways, like for example mirroring a waveform along either axis, or something similar to the bend options in serum?
@schitz I don't know serum but I glanced at a few demo vids, and like @seb-harmonik.ar says, the stuff you want to look into is waveshaping and wavetables.
For the particular mirror effect, I take it you mean the possibilty to draw a wave segment and have it played back with a mirrored segment as discussed here: https://www.youtube.com/watch?v=JVCH-IiDmnc&t=311s
- I made a crude demo patch to illustrate how that can be done with some basic waveshaping and table tricks. Mind you, this is "proof of concept", not "plug and play" -> WaveDrawMirror.pd
Since you asked for resources, why not check out Miller Puckette's book -> http://msp.ucsd.edu/techniques/latest/book-html/node26.html (wavetables) + http://msp.ucsd.edu/techniques/latest/book-html/node78.html (waveshaping) - Don't get scared by the hairy math, there are illustrative examples with counterparts in your pd installation (help->browser->puredata->3.audio.examples)
bug: [osc~], [cos~], [circle~] asymmetry drifting out of phase
Several times I've been wondering why multiple [osc~] or [cos~] are drifting apart.
Now, just found it's a bug, that is known since 2015 (!) but didn't see it come up here on the forum yet:
Pd's cosine table has some small DC-offset.
Here is the pull request:
https://github.com/pure-data/pure-data/pull/106
And there the two relevant patches of this topic from the Pd-mailing-list:
demonstration of drift in FM:
test.pd
https://lists.puredata.info/pipermail/pd-list/2015-11/112204.html
workaround with symmetric and bigger cosine array and [tabosc4~]:
fm-fix.pd
https://lists.puredata.info/pipermail/pd-list/2015-11/112244.html
EDIT
And in here is another patch comparing different tables:
https://github.com/pure-data/pure-data/issues/105
This patch should be proper, as the array uses +3 samples for interpolation.
4 ch (quad) reverb
@cfry said:
@bocanegra I like [vfreeverb~] although I find it strange that it seems to react different to parameter changes than (original) [freeverb~].
The version @whale-av posted is modified to keep the original freeverb(tm) tuning in miliseconds regardless of samplerate (???)
I have yet to try out rev2 and rev3, but I will. Why are there four outlets on these?
Miller Puckette's idea is to create a "rotary" mixing matrix of delay lines and feed the mix back into them. Here's his original design: http://msp.ucsd.edu/techniques/latest/book-html/node124.html
You can tap up to 16 different outputs from [rev~3] and mix them anyhow you find suitable for your "room".
Miller Puckette's book with MathML (EPUB3/HTML5)
I found that the images depicting equations were a bit difficult to read due to their low resolution, so I converted all of the equations to MathML with the help of LaTeXML.
For the HTML version, I recommend using Firefox to read it, as it's the only browser thus far to offer exceptionally good MathML support. MathJax can also be used to render the MathML in other browsers. It is not included by default but it has been tested and catered to in terms of CSS styling. I would suggest getting a local installation via NPM like so:
npm install --prefix ./ mathjax
and then, using a regex-replace method with your favorite text editor, this line of html would be added to each node*.html file's head section:
<script id="MathJax-script" async src="node_modules/mathjax/es5/tex-mml-chtml.js"></script>
Several EPUB3 readers are able to render MathML via MathJax. A table showing the MathML support for various readers can be found here: https://docs.mathjax.org/en/v2.7-latest/misc/epub.html
book-mathml.zip
(Apr 13, 2021)
Miller's Pitch Shifting Example From His Book
@whale-av said:
@katjav gave it a lot more thought here........ https://www.katjaas.nl/pitchshift/pitchshift.html
I could be wrong but I don't see why the samplerate would be part of the calculation (it isn't)...... as all variables are relative.
I was confused because R represents sample rate earlier in the text.
"If the frequency of the sawtooth wave is $f$ (in cycles per second), then its value sweeps from 0 to 1 every $R/f$ samples (where $R$ is the sample rate)."