[chuck-users] assigning a Blit array (George Locke)
Perry R Cook
prc at CS.Princeton.EDU
Sun Feb 2 13:59:27 EST 2014
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)
More information about the chuck-users
mailing list