-
lacuna
Maybe the answer is in this video of Millers classes at 1:04:00
https://msp.ucsd.edu/syllabi/206.20s/movies/5b.may1.mp4
sorting starts at 59:19:15
overview: https://msp.ucsd.edu/syllabi/206.20s/index.htm -
lacuna
A comma in a message means "now comes another message"
so [1, 2(
is the same as
[t b b]
| |
[2( [1(So you could separate your two messages to subpatch with a comma instead of writing ;subpatch again. (where the semicolon means "send to")
-
lacuna
@jameslo And when filtering zero, there are different timings at different samplerates and dsp on/off also differs.
At 48kHz samplerate and dsp off, lowest is 4 ms but very very rarely goes as low as 2.66667 ms. -
lacuna
@jameslo wtf I expected 64 samples. It can go down to zero:
slider-min-update-rate.pd
Is this related related? [Pd-list] pd-gui update rate (2011)
https://lists.iem.at/hyperkitty/list/pd-list@lists.iem.at/thread/NFL5EIGEJQII7G5X5FXGM2WXDM6W4263/#KJSQGTRBJVBZGMQPHFYRGYBQXN7GSOZL -
lacuna
Press control+shift+escape to open the task manager, in details you can right click on wish86.exe and or pd.exe and define the allowed cores for the application.
I never tryed this but just saw it there now.
As @whale-av said, maybe you have to copy the pd folder and maybe rename the second application.
I guess there are other ways to start and run applications on a specific thread in win, but you can search for yourself as this is not Pd specific.And as @whale-av said, these instances are completly independent and they
won't run in sync. They run asynchronous. Useful for special tasks, for example to do sth with fast-forward-message while the other patch stays in real-time.If you want to spread patches across different cpu cores but still in sync, use the [pd~] object.
Either way shmem lib is very useful to share memory / share arrays between pd-instances.
(Looking at the task-manager when using [pd~] I see the cores are constanly changing, Looks like Windows is dynamicly changing the cores. Might be good enough or even better to let Windows manage it instead of assigning fixed threads. Same might be true when running asynchronous instances. )
-
-
-
lacuna
Updated the patches:
Fixed 2 bugs:
Whole array size as default output.
Now also works if array-size changed.And cleaned up messy counter.
Added array-sort example to helpfile, changed thread title.
@ddw_music This was also my second try, giving up the first. And my thoughts where similar, especially if LUA would be handy here? I did not care too much about speed as I don't need this for realtime. Anyway an object written in C would be faster.
(This array-sort is much faster than [list-abs/list-sort], did not try [text]sort.)
Still I don't understand your idea of building a list without rescanning the array or list for each peak? But don't worry if you are done with it ... If I only had known how much time I spend with this .... -
lacuna
@ddw_music Oh! Thank you! Yes, a minimal change in loading the 4th argument caused the bug! Moses! I might not have tested before uploading... blushing!!! Now I reuploaded it. Thank you
And this is quite slow... it is actually very slow. Wondering about a different approach. -
lacuna
Vanilla abstraction, made with [array-max] and [array-min] by nulling found peak and run again.
array-maxx.pd
array-maxx-help.pd
array-minn.pd -
lacuna
@porres read the first 3 or 5 posts of this thread and you will understand.
vsnapshot~ seems to return some arbitary? value.(And we are trying to restore the 'internal double precision state of phasor~' from the outside in single precision. It turned out that this thread is not about block-boundaries, sample-accuracy ect. )
-
lacuna
@jameslo said:
count the number of blocks from when dsp gets turned on, and then run a fresh phasor in fast forward that same amount of time to get back to that state.
This might be the closest we can get.
The patch may not exeed the total running time (all fast-forwards added up) of 32 bit space .And ugly ....
(For DAW <> Pd I will open another thread some day when I am at it again. )
(forget ppphasor~ ...)
@porres vsnapshot~ is off
vsnapshot~isoff.pd
-
lacuna
Thinking about [text sequence]... timing would not be double-accurate, so this might not work. Only rec/play the phaser as signal~ should work.
@FFW stop=frequency=0Hz State saving with cloned phasors~ running in parallel
-
lacuna
And single precision is not enough for you?
Do you know what is not working in Pd64?
Did you think about other ways, like rec/playback?Repeatability and linear recording/playback is the missing piece in Pd for me. I'd like to add a full blown time-line: Seamlessly connect Pd with a DAW.
You could record all patch-inputs/interaction (GUIs, ADC, HIDs) and skip to the time where you want to repeat.
I once tested this quickly with [text sequence] and sth. I don't remember now, (must have been some (IEM guts????) (send/receive canvas?????) external that sends/receives everything happening in a patch or canvas (might have been everything happening in the parent patch, as I have build a rec/playback external))... and that worked, but don't know about the precision of this. I think we can not get more than single precision in standard-pd. Here time would be single precision. But yes, everything is spooled (maybe not accurately): You can use [;pd fast-forward(. Recordings have not been editable ... so I'd prefer a DAW. But for what you are trying to do, it might be a work-around?
-
lacuna
@jameslo Also maybe this helps? https://forum.pdpatchrepo.info/topic/10192/vphasor-and-vphasor2-subsample-accurate-phasors @Maelstorm
-
lacuna
@jameslo I think all your assumptions are correct.
I'm just using it as an oscillator/LFO. Are you suggesting that there's a way to build an oscillator with [rpole~] that is as frequency-accurate as [phasor~] but without the single vs double precision issue?
No, as far as I understood:
Phasor~ is frequency-accurate, while compromising on the absolute y-value: Jitter in amplitude as little trade-off (which multiplied can become big).On the contrary to a rpole~ramp, which is accurate in amplitude and accurately reproduces 'one-shots' sample-by-sample, but therefor must jitter in frequency when oscillating.
And I assumed wrong, maybe the correct amplitude would be most important for your application.
(The term phase of a ramp can be seen as amplitude or time.)
So I mentioned rpole~ solution.the best it can do (without having to predict the future) is to return the last sample of the previous audio block.
Yes, you are right. Not a bug.
But it is not [phasor~] being slow (that is what I have been reading in your first post), it is [snapshot~] being one sample late.Anyway, this thread is helpful for me, as I am slowly working on a state-saving-thing, and have not been aware of the 1-sample difference. Thank you.
-
lacuna
Don't know about phasor's right inlet, but I guess for more precision on the outside of objects we'd have to use 'Pd double precision'.
Also remember @ddw_music different approach than [phasor~]: https://forum.pdpatchrepo.info/topic/14523/90-second-limit-on-audio-buffers
On one sample late: It is [snapshot~] who is early, not [phasor~]:
So snap=$x2[0] would be actual right...
... in subpatch with [switch~] because [fexpr~] is so expensive ...
I would call this a bug of [snapshot~] !%§$*( -
lacuna
@elden said:
Please google "dynamic time warping".
Never tried this: https://github.com/irllabs/ml-lib
https://cycling74.com/forums/machine-learning-in-max-hallelujah -
lacuna
The answers in this thread are all true... clone ... data structure design ....
@impression said:
So I think the core issue I’m running into is how to read out a list in a serial way
This is called list-drip. There are many [list-drip] objects in different libraries: Both, Vanilla abstractions and compiled ones.
And in list-help is "example3 list iterator". Changing [+ 1] to [+ 2] and [get $1 1( to [get $1 2( drips the list in pairs:
(btw where "store the remaining list" comment is wrong. It should be: read the list)