Using plot~ like Supercolliders .poll()?
Hello,
In the Max MSP synthesis tutorials, there are visual screenshots of a [cycle~] object output going into a [plot~]. I know you can use plot~ as a sort of oscilloscope, but in the tutorial it looks like it did a plot of a slice of time from audio rate data, similar to how the SuperCollider's .poll() works, where you enter a period of time you want to capture and it plots the result after that time has passed. Is this possible to do within Max?
I did some fumbling around, and I think I can now attempt to answer my own question.
I realized that I can plot a waveform and keep it perfectly still if the number of points is set to be in sync with the audio rate. So a cycle of 100Hz which is 10ms long, can be shown with 480 points and be in sync with an audio rate of 48000.

The Max tutorial for plot~ even shows that you can get the milliseconds of a certain frequency and convert it to samples to do its best to plot it in sync with the audio rate.

You can then set the number of points to 48000 for example to plot the wave after 1 second.
However what if I want to plot the ramp of a line~ object? This is the best solution I have so far.

I am not sure what is happening under Max's hood, but it seems that sync~ is in sync with the audio rate. I am not sure why it does a ramp twice a second, but I use it to bang the line~ message in sync with the audio rate.
It would be nice if the plot~ object only plots a certain number of points (or ms) and so that the ramp starts at 0, but ramp is also subject to the mysterious audio rate clock going on under the hood.
Does anyone have better solutions or care to enlighten me about what is going on here?
I am replying to myself once again. This is for anyone who is interested. I managed to make what I was looking for. The trick I think was to use the count~ object to write samples to a buffer.
https://github.com/juanedflores/MaxSignalPlotter


There are some things that I still don't understand, like why plotting longer durations causes the poke~ object to skip some samples, but otherwise it works the way I want it to. If anyone has an improvements it would be much appreciated.
Bookmarked.
Thank you for going through all this trouble(plot~ was introduced years ago, but most of us still just use the pre-made 'prototypes' yet it was definitely made for customization like this). They should add your specific work to the examples(or even just as newer prototypes), as this level of detail in signal snooping is crucial for any level of study.