-
Notifications
You must be signed in to change notification settings - Fork 18
POC for better buffer object chaining #140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
relies on some pending updates to core
A motivating example, courtesy of James
|
Forgive me if something is not yet implemented or you're aware. I'll also try keep my thoughts granular so theyre easier to dismiss if needed 😆 In this scenario my first hunch was that I would get the name of the buffer explicitly set for that case. Just putting that out there as an instinctual feeling. Again, it may be that you agree and it's just not the case right now for the code. |
Right, that's a bug: I forgot to consider setting the attrs in the box, so it's getting overridden in the object constructor. It sticks if you do it by message |
Nice. I still get a valid buffer empty buffer with a |
Another scenario is this: I find the route/list processing interaction not as nice as it could be. As you've said a more idiomatic way is to have separate outlets which would nullify the need for such parsing. I suppose that is another level of discussion over the interface though, whether or not wholesale breakage is worth it. |
Exactly |
]
and my answer would be yes lol |
I guess another thing that might surprise people is that you always get everything and that would in theory increase the work of some jobs (maybe)? In the case of |
Only buffer sizing (when its needed) and data copying, by and large/ Again, NMF is the awkward one as I think it has loads of switches in there to decide whether or not to irs output buffers, and will do resynthesis iff the resynth buffer is present. Which is perhaps more of a case for simplifying the nmf interface than complicating anything else 😆 |
Separate NMF objects for creating activations + bases and then NMF can take any data in? The mind runs wild |
Or just a message to resynthesize – we didn't have messages when the object was designed |
This exciting development has a lot of potentials, and this POC will help make a list of pros and cons. I have started my own list and I reckon we should hold a meeting around it all - the breakage is quite significant in terms of interface and pedagogy which is where I mostly live. I am also curious to see how that fits in the overall idea of a buffer rectangle message-object, and the idea of removing many outlets to our objects. In the light of the workshops, there are a few ideas to bounce off here too. Let's talk about the horizon of this on Monday's meeting and schedule a brainstorming interface session to get all interface-breaking stuff at once, at least on the public side of things. |
Hey there, @jamesb93 brought this very tasty thread in my attention. I had an idea to use names and some sense of OOP-style object dictionaries, it is probably a bad idea, and most likely I don't know what I'm talking about, but I couldn't handle myself, so here it is: |
It's always good to hear many perspectives, especially people with your breadth of experience :) This is likely to be a long form evolution and change rather than something quick so its great to have things in the mix early! |
This been extended Now depends on flucoma/flucoma-core#115 New things, to pile up the breaking changes: |
Hey there! When I try to compile this for Windows with flucoma-core#115 in release mode I get a lot of two errors. These examples are from bufcompose, but it happens basically everywhere. First one:
The line: mProxies.push_back(proxy_new(this, i + 1, &this->mProxyNumber)); And the other error is:
The line: static const std::string param_name = lowerCase(x->params().template descriptorAt<N>().name); Any help would be appreciated. :)) |
Thanks for testing @balintlaczko – more entries to the Big Fun Book of Things That Upset MSVC But Not Other Compilers Last push should fix it for you.
|
What's nice is the fact that now CI wont horrifically break. Thanks for testing Balint! |
Thanks for showing me how to compile and live on the edge! I believe now! |
@weefuzzy it seems the fancy "progress on the object box" works quite well! My only issue is that if I use the |
ok compilation errors - yes I deleted the build folder - and 103 is merged in core so I'm at the tip of dev there and tip of pr140 on Max. I get this:
|
tried again cleaning everything, still no luck. @jamesb93 and @balintlaczko you manage to compile? |
latest |
no, I always compile against 7.3.3 |
sounds like that is the issue. Try compiling against 8.2/3 |
I compiled successfully after the last change, but yes, I have latest max-sdk-base. NB. as I remember the CLASS_ATTR_LONG had issues on debug build, but no issues on release. |
r.e. latest sdk, I will wait to check with @weefuzzy to make sure we don't break max7 support here. r.e. build type, I'm always in release until something breaks :) |
sorry it depends on flucoma/flucoma-core#115 - will try again |
Especially true if things break because of the debug mode. 😄 |
indeed although the inverse tend to happen - we've had bugs in release that were not there in debug, and Owen created a Test type to give us some optimisation on to find those gremlins... |
this sorted it - I'm now super excited of trying that new interface ;) |
ok this is very exciting, and definitely a keeper and the interface is very good and consistent I think - but definitely intermediate to advanced as the magic of all of it working without seeing buffers/datasets is frighteningly slick... the workload to get it to release is ambitious though, so here is a proposal of things in order:
** this would be the point where we merge this in the max dev branch ** then the list of todos for the next official release:
** then we can do a beta6 (or v1 if we are there) so our less adventurous users will not have conflicting documentation/help/interface ** for SC, I am tempted to do the same interface, i.e. if no buffer is provided, push one. with a default of 1024 buffers on the server that shouldn't be an issue, and we could flag that in our helper for advanced users, no? Ideally we woun't do like Max and create a magic empty buffer at instantiation, so that count would stay under control whilst beginner manually create their buffers... I'll continue playing with it all a bit, but this is fun and makes the code much less cluttered once the workflow is clear (and when tasks like transforming vs predicting are clear in one's head) |
Which means a complete freeze on documentation and clear out of outstanding PRs that deal with help files because diffing Max help files in I also would suggest that we make an explicit video on how these changes work. It can be relatively rough, but at least a walkthrough of what once was and now is would be good to pair with the release.
Not sure what the route on the first page is but I think a shared tab would be ideal to put in every buffer dealing object's help.
I think resynth is what people will do most of the time and so should be first, otherwise we get an "always using the right outlet and now my patch is messy" situation, ala fluid.dataset~.
I can't think of any.
I agree
Yeah this definitely a complete rewrite. I didn't think about dataset~ changing outlets too. It'll be much faster to teach though it will change the dynamic of how we chain together things a little. For example: How, and at what point do you explain why the output is a message and not a bang and why does it include the output? I would opt for number 1 in this screenshot, with the caveat of We'll explain why it does this later.
Beta6. I sense we are not done breaking just yet.
I think we have had that conversation to death. What does "pushing" a buffer mean? Do you get it as a return from the instance method or is it passed via action function? @tedmoore has the most articulate reasoning against both. |
indeed these are next on my list #139 has been merged but without the requested changes. So I reckon we should do that too.
it is a good idea
I mean that the first tab of all helps should not use the shortcuts.
we'll have to pick one for the left and the idea is to entice our users to think about something else. resynth is sexy indeed but we will do a specialised message for it. the 'default' message of 'buffer' will generate bases/activations, hence me proposing to move them to the main outlet positions.
We'll need to have a discussion on which approach is the most relevant. I am not convinced about the shortcut first, especially since transformers and predictors will need to be explained... too much magic at the front has bitten us in the past.
We'll need to consolidate soon, considering the time left on the project!
not enough it seems, since SC users in Oslo had ideas and were envious... @tedmoore said he would poke them and see, so I just made my proposal here. |
A separate issue has been filed to track the status of that object's documentation. I don't think it is pressing right now and it is not forgotten.
Agree.
Is that your idea or everyone's? Maybe I missed the memo. In my mind the most useful and creatively stimulating function of bufnmf~ is unsupervised decomposition. Indeed if bang only does b/a then making those left/right is sensical. I actually think bang should resynth and we should have a message for the other things possibly... I don't know... but sidelining the resynthesis (a massive wow moment for musicians) seems a shame just gauging the response of every room it has been presented in to first timers.
But that is not a shortcut nor what I am proposing as an ethos. The first examples simply abuses the fact that anything going into a message's left inlet triggers the message. If I add the
Version 1.0 demands all the documentation be up to date too
⏰ |
@weefuzzy I have a use case which might be unaccounted for or at least minorly worth making viable. I think that |
Actually I am dumb, you already know it in advance, but if you don't provide a dataset~ name perhaps it can spew it out for you? |
actually, you are not dumb at all - one could have set the dataset to refer to something else, and if we are to adopt this paradigm of chaining, we might as well pass on the data when there are no cost and that reinforces the consistent syntax/behaviour. |
Be that as it may, it would need to be a separate mechanism to the stuff in this PR: the dataset name is not derived from an output parameter of the function. It could be added later as a nice-to-have by making |
If you think it is not a blocker, and retrieving is possible by other means, I am happy to oblige. On a related matter: is tobuffer passing the name of its destination buffer ? |
Yes, and both |
ok this is great. In the light of all the workshops, I am completely convinced of our (old) buffer interface decision was good, and that this is an improvement for more advanced users. |
* optional args: add to wrapper * MaxWrapper: Add choices param (list of symbols <-> bitset) * changing preset and interface for noveltyslice examples * correct typos and misconnections in helpfiles (onsetslice and bufselectevery) * Buf2List(2Buf): Correct atom type Fixes MSVC debug builds * kdtreehelp: now loads programatically, in order, from the stored labelset (#184) * now loads programatically, in order, from the stored labelset * corrected a view * also, fluid.umap helpfile now uses the loader * fix #185 `ControlIn` objects – properly adjust `ac` when adjusting `av` – ensure mListSize is always intialized to something – fix resize logic * Enhance/max params (#182) * CMake: Centralise C++ version and set to 17 * Wrapper: Handle new LongRuntimeMax parameter type * POC for better buffer object chaining (#140) * start of POC for buffer management stuff, needs fix to ParamDesc NumOf in core * working POC for managing internal output buffers and process chaining relies on some pending updates to core * Don't override box arguments with default buffers * NRT: One outlet per output buffer, no progress outlet, draw progress on box * Messages: Default instances for output container args * updates to message default instances that don't break all other objects * Add optional range arguments to buffer message in left inlet * Stop MSVC being sad * Wrapper: fix merge casuality * [Fix] Broken patches due to new dataset/buffer interface interface (#195) * update dataset * fix broken cabling in datasetquery * update kmeans * make more max-like in style * "maxify" the style * fix connections and maxify style of labelset~ * fix connections in umap and maxify * fix connections and mafixy fluid.grid~ * update kdtree~ help with fixed cables and max style * fix connections and maxify style of normalize * cosmetic upgrades * update fluid.plotter cables * fix bufstats due to tb * [Fix] Missing OnsetSlice Files (#197) * restore to previous state * fix some style errors * fix style issues * Wrapper: Update for new `maxFFTSize` * [Docs] BufCompose Help File (#155) * griddify patch tab s * update first tab * second tab * macros * subsections tab * small cosmetic changes * update final tabs of help file * make tab 2 playable * clean tab 3 * cosmetic * PAs addendums * Wrapper: Fix reset for shared objects. fixes #43 Will 'reset' to whatever was in the box that the message was called on, so potential for confusion... * Wrapper: Fix managed object aliasing in message invocations. fixes #190 * List2Buf: Correct outlet type. fixes #196 * [Docs] BufSpectralShape Help File (#156) * grid it out * bufspectralshape help file * add a layout of results tab * add @select tab and final changes * translate SC -> Max (#187) * Wrapper: call params::set() properly for long array attrs To ensure that client objects like attrui update properly in shared instances * touch up ampslice example with Rod's audio * prepare help file * shell out the tabs * ampslice updates * Wrapper: Use raw value for maxFFT when refreshing attribute * [Help] Pitch and BufPitch SC Translations (#200) * layout * cleanup and translate * update bufpitch to match sc * fix various errors in help files (#204) * [Docs] NoveltySlice Help Files (#146) * update noveltyslice * shell out bufnovelty * small cosmetic updates * small layout issues * update bufnoveltyslice to be similar to RT algo * cosmetic * tune parameters for second tab * add a progression for tweaking parameters * [Fix] Saner maximum sizes for modulatable examples (#205) * add bigger maximums for noveltyslice for modulation fun * set a bigger maximum kernelsize for realtime playing * maximum parameter tweaks * [Fix] Various Bug Fixes From PA (#210) * fix bufcompose * fix bufampslice playback * change from groove to play * corrected players of 2nd tabs fixing #202 * Wrapper: Trying once again to get maxParams logic correct * neaten and provide an example (#216) perfect thanks! * [Docs] HPSS and BufHPSS translation (#219) * prepare help files with grid/fonts * cleanup help file layout * cleanup help files * update remaining tabs for hpss * [Docs] MFCC and BufMFCC Translation (#217) * update rt mfcc * update bufmfcc to match translation better * PAs review * [Docs] MelBands + BufMelBands Translation (#214) * translate rt version * add ioscbank and size $1 * translate bufmelbands * fix loadbang mistake * [Docs] BufFlatten Translation (#218) * update bufflatten * normalise fonts and grid size * cosmetic movements * change language around buffer management * [Docs] Update fluid.list2buf (#188) * update list2buf help file * change language in resize tab * resize destination buffers downwards * list2buf - list typo * bufmelbands - corrected loadbang issue * bufmfcc - typo * Enhance/generate stubs (#231) * CMake: Generate .cpp files * CMake: Ensure MSVC compiles commonsyms.c Enable C as a language for project... * Remove all old handwritten CMake and stubs * CMake: Tidy up Max SDK setup * CMake: ensure correct MSVC runtime by default * CMake: Correct hints for Max SDK libs * CMake: Asking once again to compile happily on two platforms * CMake: install prefix is a cache variable * CMake: Move install prefix override * CMake reinstate target for triggering docs in ALL * CMake: Tidy up * CMake: typo * Wrapper: FFT max set properly after initialization * CI: Update nightly workflow * CI: use correct branches * CI: remove reference to docs job * CMake: belatedly add branch selection for flucoma deps upon which CI relies * Reinstate package-json generation * [Docs] NMFFilter Translation (#222) * translate nmffilter * make ezdac local * [Docs] BufStats translation (#220) * prepare bufstats help file * in progress * full translation * add a derivative tab * cosmetics * remove debug print * [Docs] NMFMatch Translation (#221) * prepare and grid * work on compressor example * work in compressor parameters * finish translation * alter compressor example to be less idiosyncratic with vector sizes * [Docs] MLPClassifier Translation (#226) * wip * mlpclassifier translation * add caveat about predicting whole dataset * layout * [Docs] BufNMF Translation (#229) * grid and format * WIP * translation of nmf sc * remove nooiseplay vocoder * cleanup small errors * make channel offset permanent * vocoder pfft patch * add back vocoder example with tweaks * mds translation (#235) * [Docs] RobustScaler SC Translation (#234) * translate standardisation * grid out * translation * add scaler visualisation back * scaler comparison re-usable tab * update with visualisation and comparison together * [Docs] Standardise SC Translation (#233) * translate standardisation * grid out * translation * add scaler visualisation back * scaler comparison re-usable tab * update with visualisation and comparison together * commit patch * update title * add scaler comparison * [Docs] MLPRegressor Translation (#228) * prepare help file * shell out tabs * mlpregressor translation * [Fix] Plotter internal state management (#242) * refactor code to be handle state in a more legible manner * only output position on mousedown (not mouseup) * instantiate fluid.plotter with no border * dont reset domain/range state with clear * fix help file * CMake: Pick up new Client tag to control tildes in external names better * updated nmf examples with new interface * change @SiZe to @history (#243) * [Enhance] Manual Documentation for CCE Objects (#250) * install the contents of manual_docs to release-packaging docs * add manual docs * rename manual_docs to local_docs * update CMake to respect new path name * use more robust path for local docs * add default arguments and buffer messages * en-quote * add max list size as argument * provide use case for spectrogram * caveat about manual interaction with slices * update descriptions and digest * return destination -> source * [Fix] Various patcher bugs (#253) * fix bufselect~ * blank out bufstats values in messages * fix feature patches with new interface * cosmetic fix on kmeans * add feature objects to landing page * [Docs] Stats SC Translation (#245) * grid it out * update first tab * mimic Ted's real use case tab * normalize hehe the normalize help file with other scalers (#246) * [Docs] PCA SC Translation (#247) * add whitening tab * add stackexchange link * [Docs] BufNNDSVD SC Translation (#251) * update nndsvd help file to match sc * fix numchans error * translation (#255) * [Docs] STFT SC Translation (#248) * prepare help file * rework first tab * in progress * cleanup first tab * musical stft example * mild cleanup * finish musical example * change sound file examples * translate knnregressor (#256) * [Docs] NMFMorph SC Translation (#258) * start editing * wip * translate nmfmorph * [Docs] BufNMFCross SC Translation (#254) * prepare help file * translation * delete superfluous tab * typo in bufnmf help * [Fix] Various load issues (#261) * fix maxsize argument for bufaudiotransport * fix broken patch cables in bufchroma * fix loading error * fix broken dataset cables * fix maxsize * maxsize * cosmetic * broken cables * stats maxsize * typo * cosmetic * small cosmeti fixes * cosmetic touch ups * always load even if loadbang is disabled * non local ezdac (#262) * change of interface (#260) * typo * skmeans translation from SC (missing one tab also missing in kmeans) (#264) * [CI] Update Release Workflow (#266) * cleanup nightly release * normalise naming extensions * update release * Revert "normalise naming extensions" This reverts commit 2398518. * update extension * remove workflow dispatch variables * [Docs] Transients Family Translation (#259) * translate transientslice * translate buftransientslice * fluid.transients~ translation * cosmetic * translate buftransients * make mc example dual mono * add zoom on content * [Docs] AmpGate SC Translation (#241) * grid help file * translate ampgate * cosmetic * silence removal example * neaten patch * finish off lookahead/lookback prettification * fix onset/offset conceptual break * defer loading of tab 3 * cosmetic * MaxWrapper: Ensure box is properly released from `progress` upon cancel * [Docs] (S)Kmeans Distances Tab (#267) * add distance tab * add argument for choosing default dataaset * add distances tab * add distances tab * cleanup * beta testing patches updated for beta7 (#268) * typo * typo * typo * fix release worflow * fix bad path * fix branch
depends on flucoma/flucoma-core#103
As discussed a great, great many times, we would be able to reduce
buffer~
boilerplate in pipelines offluid.buf*
processes substantially, ifThis is the minimal-breakage version of that idea:
buffer <symbol>
sets source buffer(s). Objects with multiple sources acquire additional inlets, that will dispatch incomingbuffer
messages to the correct attribute to updatebuffer <X>
for each of their output buffers, followed by abang
, meaning that the source for the following process can be setThe reason this is the minimal breakage version is that all of these messages come out of the existing 0th outlet, whereas the idiomatic thing to do would actually be to introduce new extra outlets for additional output buffers (e.g. in HPSS) and to make
buffer
received in inlet 0 trigger processing.As it stands, this addition is no use at all in
@blocking 2
, because the output buffers couldn't be resized on the flyAlso, an object like fluid.bufnmf is a weird edge case, where
@bases
and@activations
are both input and output, depending on the configurationAnyway, kick its tyres @tremblap and @jamesb93 and we can work out remaining design questions