byulparan / cl-collider

A SuperCollider client for CommonLisp
Other
216 stars 23 forks source link

Reorder nodes #134

Open cianoc opened 4 months ago

cianoc commented 4 months ago

This is an awesome library, which is making me fall back in love with SuperCollider after a long break.

I've noticed that there doesn't seem to be a way to reorder nodes/groups in cl-collider.

It's fairly easy to add this, and I'd be happy to do this. I was thinking move-node, and something like the following structure: (defun move-group ( id to &key (server s) (pos :after) )

And that it would take the ids :after :before :head :tail

In addition I'd write it so that it works seemlessly with group, node objects as well as ids. Any objections to this approach?

Also, I use expRand all the time in SuperCollider so I wrote a little utility function for this. I could do a pull request for that as well if you have no objection to adding exp-rand as a new function?

defaultxr commented 4 months ago

FYI, for expRand, cl-collider does have exp-rand.ir and exp-range already. Not sure how your utility function differs from those, though.

cianoc commented 4 months ago

Well you can't use exp-rand.ir on the client side, so my function just does the same thing there. That's it really. Not the most exciting piece of code, but I find it useful.

byulparan commented 4 months ago

Implementation of sclang features not found in cl-collider is always welcome :-)