[chuck-users] assigning a Blit array (George Locke)
George Locke
george.locke.maxmsp at gmail.com
Sun Feb 2 15:56:50 EST 2014
this is a very reasonable workaround. thanks.
On Sun, Feb 2, 2014 at 1:59 PM, Perry R Cook <prc at cs.princeton.edu> wrote:
> Further research shows that this also fails,
> for either fred[10] or fred[]:
>
> Mandolin bob[10];
> UGen fred[10];
>
> bob @=> fred;
>
> but this works just fine:
>
> Mandolin bob[10];
> UGen fred[10];
>
> 0 => int i;
> while (i < bob.cap()) (bob[i]) => fred[i++];
>
> So it appears that object array copies require
> identical objects and structures, but individual
> object assignment is OK via the class structure.
>
> Maybe Ge/Spencer can pipe in here on the specifics.
>
> PRC
>
> ----- Original Message -----
> Not exactly sure why this is failing.
> Also tried declaring Blit osc[], but nope.
> Here's a fix for now, assigning all elements
> individually:
>
> BlitSquare pls[10];
> BlitSaw saw[10];
> Blit osc[10];
> if (myVariable) {
> for (0 => int i; i < pls.cap(); i++)
> pls[i] => osc[i];
> } else {
> for (0 => int i; i < pls.cap(); i++)
> saw[i] => osc[i];
> }
>
>
> 1. how do I assign a Blit array with a BlitSquare array?
> (George Locke)
> _______________________________________________
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20140202/03d9254b/attachment.html>
More information about the chuck-users
mailing list