Assign variables to functions

As it is now , I am having fun making stuff iff the code + play message is still in parentheses
Whenver I remove these and just keep the { } function , I can’t decalre a variable to it , which is necessary for making synthdefs
The first three lines of code play when clicking becasue I used ({ }) to encapsulate

The lines of code from 9-12 are using only the function { } and can only be played when cursor selecting
I need to sort this one really
w = { line of code }; nothing happens
I am pulling my hair out on this one because I can’t take it any further from here

Guys , can anyone just paste this code in the editor and select the last parenthese and executeand see if it works .

    ( { var depthChange, vibrato;
depthChange =, 5, 3);
vibrato = 5,  mul: depthChange, add: 440);  vibrato,   mul: 0.5) }.play )

Okay, seems to work for me - I hope that helps.

w = { ... stuff ... };
// the result of this is "a Function"

x =;
// the result of this is "Synth(some number)"

The function states what to play, but it doesn’t play anything. Therefore you also can’t stop the function, because the function doesn’t do.

The Synth does the playing. This is the thing you should free.

So, then:;  // no, this does nothing;  // yes, this frees the synth

// and after successfully freeing x;  // no, this Synth is already dead, there's no resurrection

x =;  // yes, you can make a new Synth from the old function