Sorry again for my obsessions with pd-vanilla which makes everything harder - this one might be impossible!
I’m trying to draw a spectrogram in pd-vanilla to match our waveform visualisation options in FluCoMa for Max and SuperCollider. I saw the example with the peaks in the documentation, and did myself a sort of grid of objects (arrays) but the former is not precise enough and the latter was clogging the machine as you might imagine…
As I am not the best Pd coder, although getting less worse by the day thanks to you all, I just want to confirm that it is definitely no possible in any other way than doing the structure of arrays of rectangles.
Any pointer welcome (pun intended again)
p
On Thu, 2022-01-20 at 16:46 +0000, Pierre Alexandre Tremblay wrote:
Sorry again for my obsessions with pd-vanilla which makes everything harder - this one might be impossible!
I’m trying to draw a spectrogram in pd-vanilla to match our waveform visualisation options in FluCoMa for Max and SuperCollider. I saw the example with the peaks in the documentation,
Can you be more specific?
and did myself a sort of grid of objects (arrays) but the former is not precise enough and the latter was clogging the machine as you might imagine…
As I am not the best Pd coder, although getting less worse by the day thanks to you all, I just want to confirm that it is definitely no possible in any other way than doing the structure of arrays of rectangles.
I don't think I understand your request. Can you show an example that is visually similar to what you want?
An array of data structure rectangles doesn't sound that bad. Why are you looking for another way?
Roman
Thanks Roman
Can you be more specific?
This is the Max FluidWaveform~
And this is its SuperCollider equivalent:
You can draw a waveform, a time series, markers, etc
I’m trying to not have to write a GUI object… in the other 2 we are harvesting native technologies (JS in Max and the GUI stuff of SC) And we try to enable discussion on machine listening and machine learning across Creative Coding Environment so we kept a maximum of parity between the code bases. 8 combinations of oses and CCEs.
An array of data structure rectangles doesn't sound that bad. Why are you looking for another way?
Because if I have a spectrogram of 400 pixels by 200 pixels, the struct drawing was taxing the machine quite a lot. Actually 100 smaller than that it was taxing the machine…
But maybe I got it wrong. Obviously I’m not aiming at parity of features, but just having a spectrogram layer I could tap would be ace.
An array of data structure rectangles doesn't sound that bad. Why are you looking for another way?
Because if I have a spectrogram of 400 pixels by 200 pixels, the struct drawing was taxing the machine quite a lot. Actually 100 smaller than that it was taxing the machine…
But maybe I got it wrong. Obviously I’m not aiming at parity of features, but just having a spectrogram layer I could tap would be ace.
Do you have a Pd patch somewhere to have a look at?
Just to throw some ideas:
be to use a background of canvas objects, each with 1x1 pixels. This sounds very exotic, I did it in jmmmp/pix2canvas to "copy-paste" pictures into a Pd patch. Not sure how practicable it is in your dimensions.
- since the problem with structuts is only in the drawing, you can use your current patch to calculate the values
- If you want mouse interaction with the background it might work only with externals.
several arrays with different colors, thickness, etc. Pd's latest version also added features similar to that - but I'm not sure you can combine a new array with the background mentioned above in a canvas of your choice.
jmmmp
Do you have a Pd patch somewhere to have a look at?
I’ll tidy up what I have but it is exactly this:
- if the spectrogram + audio aren't triggered that often, one way would be to use a background of canvas objects, each with 1x1 pixels. This sounds very exotic, I did it in jmmmp/pix2canvas to "copy-paste" pictures into a Pd patch.
I was trying to do a x-y joystick that way when I did it, so I’ll revisit.
Not sure how practicable it is in your dimensions.
I’m thinking in the ballpark of 200 x 400. Redrawing is on cue, rarely.
- since the problem with structuts is only in the drawing, you can use your current patch to calculate the values
The values are baked in already.
- If you want mouse interaction with the background it might work only with externals.
No it’ll be just to draw above.
- for the pitch+confidence lines, jmmmp/multiarray already allows for several arrays with different colors, thickness, etc. Pd's latest version also added features similar to that - but I'm not sure you can combine a new array with the background mentioned above in a canvas of your choice.
Oh this is new, I’ll go spy on.
Thanks again João for your help. Wait to see the new look of the helpfile, much improved thanks to your suggestions!
p
- if the spectrogram + audio aren't triggered that often, one way would be to use a background of canvas objects, each with 1x1 pixels. This sounds very exotic, I did it in jmmmp/pix2canvas to "copy-paste" pictures into a Pd patch.
I was trying to do a x-y joystick that way when I did it, so I’ll revisit.
Not sure how practicable it is in your dimensions.
I’m thinking in the ballpark of 200 x 400. Redrawing is on cue, rarely.
if you want a quick prototype, try converting a png with 200x400 with jmmmp/pix2canvas. You can then copy-paste those canvases (takes a while to paste, and will be quite hard to move around), and then you can do random sends just to see how fast the colors can change (you'll notice how I structured the send/receive variables). Actually it might be quick to send colors, but I'm not sure at all. Anyway it will be much quicker than dinamically delete and create them.
- for the pitch+confidence lines, jmmmp/multiarray already allows for several arrays with different colors, thickness, etc. Pd's latest version also added features similar to that - but I'm not sure you can combine a new array with the background mentioned above in a canvas of your choice.
Oh this is new, I’ll go spy on.
I think I had mentioned it already a while ago in a mail.
Thanks again João for your help. Wait to see the new look of the helpfile, much improved thanks to your suggestions!
That would be nice to see, yes. Surely soon.
Best,
Joao
Ok lovely people. I cleaned it, and I even did a similar thing to João’s 'dynamic patching' to see if it would be faster. In my case, it is unusably slow for 300x400 for the struct version, and it beachballs completely with the ‘dynamic patching’ approach.
Even more funny is, if you save the patch once it is drawn, the file is now huge and cannot load ;)
I’ve included both patches for 30x40 for fun. At that size they both work relatively well. Now, change the numbers to 300 and 400 for less fun :) Any pointers to optimisation and/or other ideas welcome
p
Unfortunately, Pd's GUI capabilities are rather limited. There's probably no way around writing your own Tcl/Tk code.
Here's an advanced example from the "else" library: https://github.com/porres/pd-else/blob/master/Classes/Source/keyboard.c.
Generally, it would be better to add a GUI plugin, but there are some obstacles (see https://github.com/pure-data/pure-data/issues/1555)
Christof
On 21.01.2022 10:59, Pierre Alexandre Tremblay wrote:
Ok lovely people. I cleaned it, and I even did a similar thing to João’s 'dynamic patching' to see if it would be faster. In my case, it is unusably slow for 300x400 for the struct version, and it beachballs completely with the ‘dynamic patching’ approach.
Even more funny is, if you save the patch once it is drawn, the file is now huge and cannot load ;)
I’ve included both patches for 30x40 for fun. At that size they both work relatively well. Now, change the numbers to 300 and 400 for less fun :) Any pointers to optimisation and/or other ideas welcome
p
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Indeed I think that I will have to do an external… I wonder if there is a good (simple) how-to on GUI external for Pd that are cross platform and canvas compatible… the IEM link is dead and the example code you propose is long (i.e. 1k lines long :) - I only need to take in lists and draw a coloured point in a given coordinate after all :)
Then I can relearn TCLTK which I had to learn 25 years ago when working on v1 of Cecilia :)
On 21 Jan 2022, at 14:33, Christof Ressi info@christofressi.com wrote:
Unfortunately, Pd's GUI capabilities are rather limited. There's probably no way around writing your own Tcl/Tk code.
Here's an advanced example from the "else" library: https://github.com/porres/pd-else/blob/master/Classes/Source/keyboard.c.
Generally, it would be better to add a GUI plugin, but there are some obstacles (see https://github.com/pure-data/pure-data/issues/1555)
Christof
On 21.01.2022 10:59, Pierre Alexandre Tremblay wrote:
Ok lovely people. I cleaned it, and I even did a similar thing to João’s 'dynamic patching' to see if it would be faster. In my case, it is unusably slow for 300x400 for the struct version, and it beachballs completely with the ‘dynamic patching’ approach.
Even more funny is, if you save the patch once it is drawn, the file is now huge and cannot load ;)
I’ve included both patches for 30x40 for fun. At that size they both work relatively well. Now, change the numbers to 300 and 400 for less fun :) Any pointers to optimisation and/or other ideas welcome
p
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Am 21. Jänner 2022 15:40:48 MEZ schrieb Pierre Alexandre Tremblay tremblap@gmail.com:
the IEM link is dead
which link is dead? and where do you find that link?
mfg.sfg.jfd IOhannes
probably the link to the svn repo on sourceforge, at the end of this page: https://puredata.info/docs/guiplugins/SimpleExamples/
i was wondering about that some time ago too.
cheers,
ub
On 21.01.22 20:36, IOhannes m zmölnig wrote:
Am 21. Jänner 2022 15:40:48 MEZ schrieb Pierre Alexandre Tremblay tremblap@gmail.com:
the IEM link is dead
which link is dead? and where do you find that link?
mfg.sfg.jfd IOhannes
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
I was referring to this
http://iem.kug.ac.at/pd/externals-HOWTO
Which was referred to in a post in puredata.org
On 21 Jan 2022, at 19:44, ub ub@xdv.org wrote:
probably the link to the svn repo on sourceforge, at the end of this page: https://puredata.info/docs/guiplugins/SimpleExamples/
i was wondering about that some time ago too.
cheers,
ub
On 21.01.22 20:36, IOhannes m zmölnig wrote:
Am 21. Jänner 2022 15:40:48 MEZ schrieb Pierre Alexandre Tremblay tremblap@gmail.com:
the IEM link is dead
which link is dead? and where do you find that link?
mfg.sfg.jfd IOhannes
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Here it is: https://github.com/pure-data/externals-howto
However, this guide does not cover GUI plugins.
On 21.01.2022 21:44, Pierre Alexandre Tremblay wrote:
I was referring to this
http://iem.kug.ac.at/pd/externals-HOWTO
Which was referred to in a post in puredata.org
On 21 Jan 2022, at 19:44, ub ub@xdv.org wrote:
probably the link to the svn repo on sourceforge, at the end of this page: https://puredata.info/docs/guiplugins/SimpleExamples/
i was wondering about that some time ago too.
cheers,
ub
On 21.01.22 20:36, IOhannes m zmölnig wrote:
Am 21. Jänner 2022 15:40:48 MEZ schrieb Pierre Alexandre Tremblay tremblap@gmail.com:
the IEM link is dead
which link is dead? and where do you find that link?
mfg.sfg.jfd IOhannes
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Indeed I noticed that. I was hoping the IEM magic link was containing a first simple GUI
Well, I know what I’ll do in my free time… I’ll think of something and will look at the various versions of Max GUI writing tutorial, so I can translate a road-tested structure.
On 21 Jan 2022, at 21:48, Christof Ressi info@christofressi.com wrote:
Here it is: https://github.com/pure-data/externals-howto
However, this guide does not cover GUI plugins.
On 21.01.2022 21:44, Pierre Alexandre Tremblay wrote:
I was referring to this
http://iem.kug.ac.at/pd/externals-HOWTO
Which was referred to in a post in puredata.org
On 21 Jan 2022, at 19:44, ub ub@xdv.org wrote:
probably the link to the svn repo on sourceforge, at the end of this page: https://puredata.info/docs/guiplugins/SimpleExamples/
i was wondering about that some time ago too.
cheers,
ub
On 21.01.22 20:36, IOhannes m zmölnig wrote:
Am 21. Jänner 2022 15:40:48 MEZ schrieb Pierre Alexandre Tremblay tremblap@gmail.com:
the IEM link is dead
which link is dead? and where do you find that link?
mfg.sfg.jfd IOhannes
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
For a really usable colored spectogram Gui, one solution would be to make an external with the Cicm wrapper lib: "A C/TK library that aims to facilitate the creation of objects for Pure Data". https://github.com/CICM/CicmWrapper
You can see how nice Gui's they achieved in the CEAMMC lib for pd: https://github.com/uliss/pure-data
They might use a more recent fork of Cicm Wrapper since the original one is not maintained anymore... you can get in touch with Serge Poltavski for that.
Le sam. 22 janv. 2022 à 11:23, Pierre Alexandre Tremblay tremblap@gmail.com a écrit :
Indeed I noticed that. I was hoping the IEM magic link was containing a first simple GUI
Well, I know what I’ll do in my free time… I’ll think of something and will look at the various versions of Max GUI writing tutorial, so I can translate a road-tested structure.
On 21 Jan 2022, at 21:48, Christof Ressi info@christofressi.com wrote:
Here it is: https://github.com/pure-data/externals-howto
However, this guide does not cover GUI plugins.
On 21.01.2022 21:44, Pierre Alexandre Tremblay wrote:
I was referring to this
http://iem.kug.ac.at/pd/externals-HOWTO
Which was referred to in a post in puredata.org
On 21 Jan 2022, at 19:44, ub ub@xdv.org wrote:
probably the link to the svn repo on sourceforge, at the end of this
page: https://puredata.info/docs/guiplugins/SimpleExamples/
i was wondering about that some time ago too.
cheers,
ub
On 21.01.22 20:36, IOhannes m zmölnig wrote:
Am 21. Jänner 2022 15:40:48 MEZ schrieb Pierre Alexandre Tremblay <
tremblap@gmail.com>:
the IEM link is dead
which link is dead? and where do you find that link?
mfg.sfg.jfd IOhannes
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management ->
https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management ->
https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management ->
https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management ->
https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
some ideas:
this isn't that well as it reduces the quality as well
with multiarray, you'll need to do all that in a gop - and that adds processing weight, making everything even heavier
I didn't understood if the red lines have user interaction; if yes, I'm not sure if one can grab "objects" in gem, probably not. but by seeing the mouse values it would be easy to connect the interaction with a definite array. Disadvantage is that gem has to be downloaded and installed (or you pack it with your externals)
Indeed I think that I will have to do an external… I wonder if there is a good (simple) how-to on GUI external for Pd that are cross platform and canvas compatible… the IEM link is dead and the example code you propose is long (i.e. 1k lines long :) - I only need to take in lists and draw a coloured point in a given coordinate after all :)
Then I can relearn TCLTK which I had to learn 25 years ago when working on v1 of Cecilia :)
On 21 Jan 2022, at 14:33, Christof Ressi info@christofressi.com wrote:
Unfortunately, Pd's GUI capabilities are rather limited. There's probably no way around writing your own Tcl/Tk code.
Here's an advanced example from the "else" library: https://github.com/porres/pd-else/blob/master/Classes/Source/keyboard.c.
Generally, it would be better to add a GUI plugin, but there are some obstacles (see https://github.com/pure-data/pure-data/issues/1555)
Christof
On 21.01.2022 10:59, Pierre Alexandre Tremblay wrote:
Ok lovely people. I cleaned it, and I even did a similar thing to João’s 'dynamic patching' to see if it would be faster. In my case, it is unusably slow for 300x400 for the struct version, and it beachballs completely with the ‘dynamic patching’ approach.
Even more funny is, if you save the patch once it is drawn, the file is now huge and cannot load ;)
I’ve included both patches for 30x40 for fun. At that size they both work relatively well. Now, change the numbers to 300 and 400 for less fun :) Any pointers to optimisation and/or other ideas welcome
p