[chuck-users] noob: machine.add but can't find function
george.locke.maxmsp at gmail.com
Sun Aug 26 17:10:20 EDT 2012
Yes, that helps. I want a sort of library, so I'll wrap rand_norm in a
public class. thanks!
On Sun, Aug 26, 2012 at 3:29 PM, Kassen <signal.automatique at gmail.com>wrote:
> Hey George,
> > I add test.ck to the miniAudicle VM and the following error
> > error: line(3): undefined variable 'rand_norm'...
> > Am noob. plz help. kthx.
> That is a simple one; the two files each have their own namespace.
> This means that stuff defined (and named) in one file can only be read
> or used from that file. If you put both functions in the same file it
> should work.
> Normally this is a good thing; this way we can use a name like "drum"
> in a file and not worry about whether we already used that name
> else-where so we don't get toms where we planned a snare.
> Functions and classes also have their own namespace, for the same
> reason. If this is not what you want or need you'll have to create a
> public class and make your function a member of that. Public classes
> can be accessed from anywhere in the VM.
> Hope that helps and gets you a bit further.
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the chuck-users