-
ben.wes
posted in technical issues • read more@jameslo said:
Woah! Look how similar my patch is and how little is missing:
haha, that really seems quite similar - and elegant.

actually,
cnv-help.pdexplains everything quite well! see thepd propertiesandpd positionsubpatches.
i slightly changed the color for the background cnv. so that's not completely coincidental, i admit.
-
ben.wes
posted in technical issues • read moremaybe it's not a bad idea to check out data structures again after they received some updates with the latest pd versions! - but in this case,
cnvobjects withelse/canvas.mouseseem to work reasonably well.
not sure this is the most elegant way - but it works:

here's the patch: reaktor-control.zip -
ben.wes
posted in technical issues • read more@HannaGen said:
a pre-cooked filter for the A-weighting curve
not sure if precise enough (although the error curves look really good!) - but here is a nice source for biquad coefficients for an A-weighting filter at 44.1 and 48 kHz:
https://jenshee.dk/signalprocessing/aweighting.pdf (from https://jenshee.dk/signalprocessing/signalprocessing.html)In Pd, at 48kHz, this translates to:
[biquad~ 1.34731 -0.349058 0.965251 -1.3473 0.382051] | [biquad~ 1.89387 -0.89516 0.94697 -1.89394 0.94697] | [biquad~ 1.34731 -0.349058 0.646665 -0.383622 -0.263043] -
ben.wes
posted in technical issues • read more@morast said:
i posted the issue to the mailing list.
hi moritz! i might have missed something - but i can't seem to find a report on the pd-list?
please feel free to create an issue for this on https://github.com/pure-data/pure-data/issues (ideally with system details and the above screenshot). certainly sounds like a relevant issue. -
ben.wes
posted in technical issues • read more@whale-av thank you for the pointer, david! i've stumbled upon her site multiple times in the past years (mainly through old threads on this forum, i think). she made incredible contributions to the Pd world! i've yet to properly work through this stuff though ...
-
ben.wes
posted in technical issues • read moreglad you found a good solution! and thanks for your words
- but i'm actually just starting to learn a bit more about that frequency domain stuff. and i think that my patch still has quite some flaws concerning the scales for example! anyway - i'll try to clean this up a bit more and share when ready (also to document it for myself) ... would be fun to check out your result as well! -
ben.wes
posted in technical issues • read moreok, damn ... this solution with iem_tab was really pointless! feeding back the signal as you did is smarter and certainly more efficient! i also like the approach using
max~to keep the immediate peaks. so here's now an all vanilla solution (except for thetabredrawi'm using to redraw the array). thanks a lot for the inspiration!video: 2025-05-08 16-44-26.mp4

-
ben.wes
posted in technical issues • read moreyep - smoothing the spectrum with a lop~ was not a good idea, i assume. and also my convolution with the kernel i used was not a good idea, since it created an offset of the frequencies in the final spectrum. but that smoothing kernel can also be properly represented really symmetrically if half of it is in the negative frequencies (at the end of the array). and i omitted the convolution with
tab_convin favor of frequency domain convolution with vanilla objects which should be quite fast as well:
the smoothing kernel in this case is just a 64 sample hann window (split in half). barely visible here - and possibly, it might be a good idea to use an uneven width and offset it. not sure ...

here's the result (original, smoothed values and smoothed spectrum) - looks quite correct. there's a 4000Hz signal peak here besides the pink noise now that makes it more obvious:

-
ben.wes
posted in technical issues • read morethis is not a precise imitation and i'm not sure if it can be done more efficiently - but it works quite well by smoothing the graph value updates, effectively low-passing them by only adding a fraction of the difference (i'm also differentiating between rising and falling values - the rising ones are less filtered):
this could be done in vanilla - but the
tab_*objects of theiem_tablibrary are certainly a lot faster.
for smoothing the graph itself, i use convolution (tab_conv) with a small smoothing kernel. another option there is tabreceive~ -> lop~ -> tabsend~. the result looks ok as well, but it's obviously not symmetrically smoothed then.not sure if these explanations make sense. but since i was working on some spectrogram stuff today, this question resonated and made me try to respond.

EDIT: btw., the signal in the video is just pink noise on/off.
-
ben.wes
posted in technical issues • read more@oid you're right that my subpatch naming is a bit confusing here.
pd $0-mainonly serves as the canvas where everything is created. so the idea here was that opening this file would directly create a running patch (which could have more dependencies created similarly to everything.pd). but your suggestion sounds good to just create an installer and let the user choose where to install.the reason for the dynamic patching of
everythingintopd $0-mainhere is that i had no luck withiemguts/initbangsince it would not trigger first in a subpatch used for file creation unfortunately (this is mentioned in its help file). -
ben.wes
posted in technical issues • read moreinteresting discussion! i hadn't considered using the
savetofilemessage before. combined with thedirmessage topdcontrolfor retrieving the patch path, this should be quite reliable, no?
... this works well for me and might actually be an option to keep everything in one file. thanks!
-
ben.wes
posted in technical issues • read moreactually, there has been quite some work on it in the recent months - including updates of the pd version (to 0.54 - so 0.55 is still due). the current builds on github are just 2 months old: https://github.com/agraef/purr-data/releases/tag/2.20.0
... there is no build for silicon mac yet though and i didn't attempt to build it myself - so unfortunately, i can't say anything about vstplugin~ in this version (only that it works perfectly well in vanilla for me, too).
-
ben.wes
posted in patch~ • read morealso adding my attempt to create a software oscilloscope with Gem (trying to simulate some physical characteristics). Requires
pmpdlib besidesGem: https://github.com/ben-wes/pd-osci_xy
-
ben.wes
posted in patch~ • read morei just uploaded a spectrogram built with Gem. It's not very efficient and i might give it another try with shaders doing the drawing and logarithmic mapping. but anyway - seemed like an appropriate contribution to this thread:
https://github.com/ben-wes/pd-spectro_tilde
-
ben.wes
posted in technical issues • read moreresponding to myself here ... it's possible to iteratively append data to a top-level array with
purest_json(which avoids the restriction to symbols of MAXPDSTRING size).that's not possible for nested keys though (which is a requirement in my case). i changed the purest_json code now so that i can add to nested keys via messages like
array LoudspeakerLayouts.Loudspeakers $1. not sure if that's the "right" way and i'd still be curious if other people see better options in Pd for it! -
ben.wes
posted in technical issues • read morei'm trying to use
json-encodefrom the purest_json library to create config files for the IEM AllRADecoder. now it might be a questionable endeavor to do this with Pd in general - but i'd like to see if it's possible anyway.the aim is to create a file like https://plugins.iem.at/allradecoder/layoutWithAdditionalImaginaryLoudspeakers.json
... what i have so far works up until 10 speakers with some test data. but then, the symbol obviously gets too long and i get unnecessary escapings and the last parts of the data look like this:
\"Channel\":11\\,*"}
any ideas on how to solve this?here's the patch.
test-json-encode.pd (ATTENTION: this writes a test.json file on bang in the patch directory) -
ben.wes
posted in technical issues • read moreHas anyone implemented or experimented with the Fractional Fourier Transform (FrFT) in Pure Data and might point me to relevant resources? So far, I badly failed at implementing an external that would allow continuous rotation between time and frequency domains (see https://en.wikipedia.org/wiki/Fractional_Fourier_transform).
I've heard about quite interesting musical applications of this in a talk and demos by Günther Rabl (who implemented this years ago in his own tools AMP/VASP) and would love to experiment with it in Pd.
-
ben.wes
posted in technical issues • read more@trummerschlunk said:
hm, too bad. Same is true for the external, I guess?
yep. vanilla patches are the only option for that ... but when it comes to 1-sample feedback without
block~ 1, the only options are the filter objects (rpole~etc.). i'm honestly not completely sure if this dynamic smoothing here could be achieved in some other way (like obtaining x[n-1] viarzero_rev~ 0) - but i don't think so. -
ben.wes
posted in technical issues • read moreah - and i forgot to mention in the previous response: i made another little update to the abstractions so that you can set the channel count via a
channels <count>message:unfortunately, it's necessary to set the count of send~ objects manually that way.
-
ben.wes
posted in technical issues • read more@trummerschlunk said:
[...] Maybe because I am on a arm/silicon Mac?
the builds include binaries for both, silicon and intel Macs (on M2 here myself - so that's even the only build that's actually tested
).Would dynsmooth~ then be the accurate or the efficient version?
dynsmooth~initializes the accurate version. if you createdynsmooth~ -e, it'll use the efficient algorithm. also, you can initialize base frequency and sensitivity with creation args like this:dynsmooth~ -e 100 0.01for example.Would it run in 'compiled mode' in plugdata?
compiled mode only supports the object that are known by the heavy compiler:
https://github.com/Wasted-Audio/hvcc/blob/develop/docs/09.supported_vanilla_objects.md... unfortunately,
block~(for the 1-sample feedback) is not supported - so i'm afraid that it's not an option to use the abstractions in that mode.