Skip to content
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

Add position arg to .meter to set s.meter position (width and height are automatically calculated) #6283

Open
wants to merge 24 commits into
base: develop
Choose a base branch
from

Conversation

prko
Copy link
Contributor

@prko prko commented May 1, 2024

Purpose and Motivation

It is not currently possible to specify the position of the meter on a server instance.
For example, s.meter always makes its window a left bottom corner of the main screen.
With this PR it is possible to set the position of the `.meter' for a server instance.

It is easier and more effective than using meterView in a `window' instance.

  • currently:
    (
        var numIns, numOuts;
        numIns = s.options.numInputBusChannels;
        numOuts = s.options.numOutputBusChannels; 
        w = Window("test", Rect(400, 400, ServerMeterView.getWidth(numIns, numOuts),    ServerMeterView.height));
        ServerMeterView(s, w, 0@0, numIns, numOuts);
        w.front
    )
    
  • with this PR:
    s.meter(position: 400@400)
    

This PR is a part of #6230

Types of changes

  • Documentation
  • New feature

To-do list

  • Code is tested
  • All tests are passing
  • Updated documentation
  • This PR is ready for review

prko added 24 commits March 6, 2024 13:51
documentation update for the method .scope to define the location of scope window
documentation update for the method .scope to define the scope window location
update .scope method to locate scope window position
added variables to have a singleton plotTreeWindow and a singleton scopeWindowDefined
changed position argument in scope method to bounds
The position arguments for the server scope method and the function scope method are changed to bounds. And the server scope is changed so that it displays only one scope and works fine when users use manually assigned bounds and the default bound value of nil in succession.
has been modified to show only one boundary and to work fine when users are using manually assigned bounds and the default boundary value of nil, one after the other. Also, pressing m will change its size based on user-defined bounds, if any.
position argument for scope method is changed to bounds, so the documentation is updated
added bounds argument to the method `.plotTree`
documentation update for the added argument `bounds` for the method `.plotTree`
added point to define the server meter position.
documentation update for the added position argument for .meter method.
spaces within curly brackets are added
The behaviour of resizing has been corrected. It now retains the position as before if the new width and height do not exceed the screen boundary. If the new height exceeds the screen boundary, the vertical point is modified so that it does not exceed the screen boundary. If the new width exceeds the screen boundary, then the horizontal point is modified so that it does not exceed the screen boundary.
added the behaviour of change size if the new size exceeds the screen boundary.
The implementation of .scope has been simplified.
The implementation of .scope has been simplified.
added bounds for scope argument for Bus
bounds = nil in arg 
-> 
bounds
position = nil in arg
-> 
position
@prko
Copy link
Contributor Author

prko commented May 5, 2024

updated Purpose and Motivation section

@JordanHendersonMusic JordanHendersonMusic added the comp: class library SC class library label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: class library SC class library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants