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

NodeProxy set can be used with arbitrary objects #4090

Merged

Conversation

telephon
Copy link
Member

@telephon telephon commented Sep 25, 2018

Purpose and Motivation

NodeProxy interprets set as a mapping when the argument is another NodeProxy or BusPlug. Other objects are converted using asControlInput and passed as /n_set. The implementation assumed that other objects would only be numbers or arrays. Now it is possible to use any object that would also work with Synth.

Fixes #4087.

Types of changes

Bug Fix and tests

// this works now
(
b = Buffer.alloc(s, 128, 1);
p = NodeProxy(s);
p.set(\buffer, b);
p.controlNames
)

Checklist

  • All previous tests are passing
  • Tests were updated or created to address changes in this PR, and tests are passing
  • Updated documentation, if necessary
  • This PR is ready for review

Remaining Work

So far, arbitrary objects in NodeMap were allowed, but would result in
problems occasionally. In particular, they were treated like a
NodeProxy. Now all other objects are treated like in Synth arguments.

This fixes supercollider#4087.
@telephon telephon changed the title Topic nodeproxy any object can set NodeProxy set can be used with arbitrary objects Sep 25, 2018
@telephon telephon added the comp: class library SC class library label Sep 25, 2018
Copy link
Contributor

@adcxyz adcxyz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks very good to me!

@telephon telephon merged commit 9b130be into supercollider:develop Sep 29, 2018
@nhthn nhthn added this to the 3.11 milestone Sep 30, 2018
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.

NodeProxy role \xset and \set causing strange error: Message 'rate' not understood
3 participants