Author |
Message |
ge

Joined: Aug 13, 2006 Posts: 105 Location: Palo Alto, CA
|
Posted: Wed Aug 30, 2006 12:41 am Post subject:
|
 |
|
kijjaz wrote: | when i chuck things..
___ => ___ => dac;
the manual says: When a patch is compiled, ChucK looks
at what is connected to the dac and as each sample is computed ChucK
looks through the network of Ugens and grabs the next sample.
so if i unchuck .. will the CPU load for the patch be freed?
|
In short, yes. Only UGen directly or implicited connected to the dac or blackhole will compute. So => and =< dynamically modifies the UGen graph and can have significant impact on CPU usage.
On of these days, we will attempt massive optimization. For now, we are still trying to get things working and right. As my teacher always said:
make it work
make it right
make it fast
make it small
Cool program, by the way! |
|
Back to top
|
|
 |
kijjaz

Joined: Sep 20, 2004 Posts: 765 Location: bangkok, thailand
Audio files: 4
|
Posted: Thu Aug 31, 2006 10:25 am Post subject:
|
 |
|
i'm back with another newbie question again
it's about virtual machine and public class.
when i add a shred that define a public class
(for example .. public class A { ... code ... } and so on..)
it remains in the virtual machine (i can create new object of A in other shreds)
(that's quite new for me coz this is my first time working with an object-oriented language -_-")
but what if i wanna change class A in real-time?
how do i remove public class?
coz when i run a shred with the A definition, it won't let me.
( it says: [xxx]:line(x): class/type 'A' is already defined in namespace 'global' )
thank you
- kijjaz |
|
Back to top
|
|
 |
ge

Joined: Aug 13, 2006 Posts: 105 Location: Palo Alto, CA
|
Posted: Thu Aug 31, 2006 6:58 pm Post subject:
|
 |
|
kijjaz wrote: | [color=#114477]but what if i wanna change class A in real-time? how do i remove public class? |
Hi!
Currently, once a class is in the VM and type system, it's there. You'd have to restart the VM to flush it out. The reason is that there might be instances of the class that expects consistency.
Now, we have been looking into ways of making classes updateable without breaking the type system. We hope to have a solution soon. For now, either subclass and change the behavior polymorphically, or restart the VM (certainly not always feasible, especially for on-the-fly programming). This is one of the areas we are planning to address. |
|
Back to top
|
|
 |
kijjaz

Joined: Sep 20, 2004 Posts: 765 Location: bangkok, thailand
Audio files: 4
|
Posted: Fri Sep 01, 2006 12:22 am Post subject:
|
 |
|
oh thanks.  |
|
Back to top
|
|
 |
|