-
Notifications
You must be signed in to change notification settings - Fork 16
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
resizable and layoutable guis #83
Conversation
Hi @elgiano, Sorry, just seeing this now! (in the future, feel free to request or @ me) Thank you for this! I'm looking forward to checking it all out. The resizing is definitely something that these objects need. I'm heading off tomorrow for another trip of workshops, so it may be a couple weeks, but I assure you I'll get to it.
There is no good reason, I also prefer parent! (and yet it was I who called it Cheers. T |
Hi @tedmoore, thanks!!! Now main branch was updated, and there are conflicts... you have workshops, I have a piece coming... so let's definitely take it easy, I'll solve the conflicts after the piece, in a couple of weeks, as I don't feel like updating flucoma right now :) Looking forward for what's coming! EDIT: I see, you made FluidPlotter zoomable <3 I'll definitely look into it in a couple of weeks then :D, but for sure resizing and zooming have to be compatible. |
This looks great. I wish we had the composability of views in Max. I think that to complete the PR some additional documentation would be really good @elgiano. Then it would have my approval for sure. I think that we could also aim to merge this for the next major release! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With documentation that shows how to use the three modes, this is good to go (from my non-SC specialist perspective). I'm sure @tedmoore will have more concise and important feedback.
Thanks @jamesb93 I'll do the docs in a couple of weeks! FluidPlotter's mouseMoveAction gets the FluidPlotter as first argument, not the UserView. I totally support it (you can always get EDIT: let's make it clearly intended :) |
9dd737f
to
08f8751
Compare
8ab3c37
to
ddf4bc3
Compare
@tedmoore |
This way views are immediately available upon creation, for example to be added to layouts. Views are still correctly updated with data from within the fork, whenever they are ready.
ddf4bc3
to
7759613
Compare
Thanks @elgiano, I'll take a look this week! |
Thanks @elgiano! I love this. Thanks for doing the implementing and thanks for your patience while we were busy for a couple weeks there. |
* ignore more varieties of build folder * deal with some warnings * FluidWaveform 'lineWidth' argument now also affects feature lines * add back the nmf-jit-classifier example * novelty interface change in example * resizable and layoutable guis (#83) * resizable and layoutable guis * FluidWaveform: rename 'win' to 'parent' * FluidWaveform/FluidPlotter: update help * FluidWaveform/Plotter: make views before forking This way views are immediately available upon creation, for example to be added to layouts. Views are still correctly updated with data from within the fork, whenever they are ready. * Thanks @elgiano! + a few small edits Co-authored-by: Ted Moore <[email protected]> * slicers: add enums for algorithms (#86) * typo * FluidBufNMF class: add resynthMode argument * add PCA whitening parameter (#65) * add PCA whitening parameter * FluidPCA: Ensure whiten parameter is sent to kr query UGen Co-authored-by: Gerard <[email protected]> Co-authored-by: weefuzzy <[email protected]> * Enhance/optional message args (#77) * optional args: sc wrapper updates * optional args: KDTree try out * Enhance/choices param (#78) * NRTWrapper: Add choices param (long <-> bitset) * Update `FluidBufStats` with `select` control * BufStats class: Fix bitfield for `select` and warn on duplicate items * Update SpectralShape classes for new param * `PCA.sc`: add batch `inverseTranform` method * Wrapper: integer sign warnings * Enhance/max params (#93) * CMake: Centralise C++ version and set to 17 * Wrapper: handle new LongRuntimeMax param type * POC for new LongRuntimeMax param with MFCC numCoeffs * Wrapper: Make MSVC happy about constexpr lambda capture * All scalers: replace 'invert' parameter with `inverseTransform` messages * Wrapper: Work around 32 char limit for plugin commands If too long, remove vowels. Sorry. Better ideas welcome * fix #96 * typo * Update SC classes for new style `max<X>` parameters * SpectralShape SC class: maxFFT * RealTime wrapper: play it safer with output channel count This really relies on the SC class being correct, but then everything ultimately does... * RT FFT Object SC Classes: Provide maxFFTSize default * BufSTFT SC class: Add maxFFT (now needed due to core type change) * Add select param to Loudness and Pitch SC clases (#101) * Wrapper: workaround scsynth 32 char cmd length limit with extra dispatch layer also avoids need for formerly truncated plugin names in some cases * removed invert from scalers class definitions (#102) * Enhance/generate stubs (#104) * CMake: generate .cpp stubs * Remove old cpp stubs * Ensure correct MSVC runtime by default * CMake: invoke docs properly * CMake: Tidy up * CMake: Tidy up * CMake: typo * CI: Update nightly * CI: remove lingering references to docs job * CMake: belatedly add branch selection for flucoma deps upon which CI relies * CMake: Actually commit important code for best collaborative results * CMake: This file is now redundant, in fact * cmake: missing slash in install * bufnmf: added the maxFFTsize parameter in the server call * FluidStats: Change where output Array reshape happens to keep SynthDescLib happy * FluidBufNNDSVD: maxfftsize now needed in server call, or booooom fixes #161 * BufNMFCross: Needs MaxFFTSize * BufNNDSVD: Ensure activations buffer is queried at finish * FluidBufToKr ensure that numFrames is an int (not a float) * Added *(Buf)Feature objects to guide (and deleted old guide) NNDSVD --> NMFSeed in Guide fixed bad links in Guide * change interface and file name (#113) * hidden --> hiddenLayers in class definition (#114) * reordered some max<X> arguments * change interp to interpolation in nmfmorph class (#115) * Feature/skmeans (#66) * add PCA whitening parameter * add FluidSKMeans * SKMeans correction * added RT query * <fit>transform<point> -> <fit>encode<point> * added to overview Co-authored-by: Gerard <[email protected]> Co-authored-by: tremblap <[email protected]> * [CI] Update Release Workflow (#118) * cleanup nightly.yaml * use new release style * refactor release * remove workflow dispatch variables
* ignore more varieties of build folder * deal with some warnings * FluidWaveform 'lineWidth' argument now also affects feature lines * add back the nmf-jit-classifier example * novelty interface change in example * resizable and layoutable guis (#83) * resizable and layoutable guis * FluidWaveform: rename 'win' to 'parent' * FluidWaveform/FluidPlotter: update help * FluidWaveform/Plotter: make views before forking This way views are immediately available upon creation, for example to be added to layouts. Views are still correctly updated with data from within the fork, whenever they are ready. * Thanks @elgiano! + a few small edits Co-authored-by: Ted Moore <[email protected]> * slicers: add enums for algorithms (#86) * typo * FluidBufNMF class: add resynthMode argument * add PCA whitening parameter (#65) * add PCA whitening parameter * FluidPCA: Ensure whiten parameter is sent to kr query UGen Co-authored-by: Gerard <[email protected]> Co-authored-by: weefuzzy <[email protected]> * Enhance/optional message args (#77) * optional args: sc wrapper updates * optional args: KDTree try out * Enhance/choices param (#78) * NRTWrapper: Add choices param (long <-> bitset) * Update `FluidBufStats` with `select` control * BufStats class: Fix bitfield for `select` and warn on duplicate items * Update SpectralShape classes for new param * `PCA.sc`: add batch `inverseTranform` method * Wrapper: integer sign warnings * Enhance/max params (#93) * CMake: Centralise C++ version and set to 17 * Wrapper: handle new LongRuntimeMax param type * POC for new LongRuntimeMax param with MFCC numCoeffs * Wrapper: Make MSVC happy about constexpr lambda capture * All scalers: replace 'invert' parameter with `inverseTransform` messages * Wrapper: Work around 32 char limit for plugin commands If too long, remove vowels. Sorry. Better ideas welcome * fix #96 * typo * Update SC classes for new style `max<X>` parameters * SpectralShape SC class: maxFFT * RealTime wrapper: play it safer with output channel count This really relies on the SC class being correct, but then everything ultimately does... * RT FFT Object SC Classes: Provide maxFFTSize default * BufSTFT SC class: Add maxFFT (now needed due to core type change) * Add select param to Loudness and Pitch SC clases (#101) * Wrapper: workaround scsynth 32 char cmd length limit with extra dispatch layer also avoids need for formerly truncated plugin names in some cases * removed invert from scalers class definitions (#102) * Enhance/generate stubs (#104) * CMake: generate .cpp stubs * Remove old cpp stubs * Ensure correct MSVC runtime by default * CMake: invoke docs properly * CMake: Tidy up * CMake: Tidy up * CMake: typo * CI: Update nightly * CI: remove lingering references to docs job * CMake: belatedly add branch selection for flucoma deps upon which CI relies * CMake: Actually commit important code for best collaborative results * CMake: This file is now redundant, in fact * cmake: missing slash in install * bufnmf: added the maxFFTsize parameter in the server call * FluidStats: Change where output Array reshape happens to keep SynthDescLib happy * FluidBufNNDSVD: maxfftsize now needed in server call, or booooom fixes #161 * BufNMFCross: Needs MaxFFTSize * BufNNDSVD: Ensure activations buffer is queried at finish * FluidBufToKr ensure that numFrames is an int (not a float) * Added *(Buf)Feature objects to guide (and deleted old guide) NNDSVD --> NMFSeed in Guide fixed bad links in Guide * change interface and file name (#113) * hidden --> hiddenLayers in class definition (#114) * reordered some max<X> arguments * change interp to interpolation in nmfmorph class (#115) * Feature/skmeans (#66) * add PCA whitening parameter * add FluidSKMeans * SKMeans correction * added RT query * <fit>transform<point> -> <fit>encode<point> * added to overview Co-authored-by: Gerard <[email protected]> Co-authored-by: tremblap <[email protected]> * [CI] Update Release Workflow (#118) * cleanup nightly.yaml * use new release style * refactor release * remove workflow dispatch variables * interface changes in 8c * knearest interface change in 10a * waveform help nmf interface change * capitalise beatRemember * two more changes of interface * typo * sign binaries * add -nightly affix * sign releases too * enforce concurrency of jobs * UMAP kr method should not allow user to pass numDimensions * slicers: change algo/metric select to symbols (#103) * slicers: change algo/metric selection to symbols * slicers: algo/metric accept UGen * FluidDataSetWr example code (#124)
Before this PR FluidWaveform and FluidPlotter can instantiate Views as "standalone" windows, or by directly placing them in an external window with
parent
andbounds
and in none of these cases plots resize when their parent window is resized. This PR makes the "standalone" mode resizable, and introduces a third mode, which creates a view withoutparent
norbounds
, so that it can be used with SC's Layout Management. This new mode is activated by setting thestandalone
argument to false.There shouldn't be any breaking change, but GUIs have now three modes:
parent=nil, standalone=true (default)
: create a new (resizable) windowparent.notNil, bounds: a Rect
: create a view and place it inparent
atbounds
parent=nil, standalone = false
: create a View without parent or BoundsExample usage with Layout Management:
TODO:
[] add Layout Management example?
Notes:
^super.new.init(...args)
withsuper.newCopyArgs(...args).init
everywhere I could in these two files. It saves a lot of unnecessary code duplication, and some init functions were even removed altogether as they were only there to copy those args.forkIfNeeded
. If a Function needs to wait for the gui to be ready (such asrefresh
, which needs to wait for layers to refresh the view), it will run alllayer.draw
calls as part of its own thread (likeprocessBlocking
). Draw is called only internally (and I think it's meant to be private, right?). External functions will need todefer { fluidWaveform.refresh }
, but notfront
, which forks automatically..win
, while FluidPlotter does is with.parent
. Is there any good reason they shouldn't both do it with the same method name (I prefer parent)?