On 10/13/07, dan trueman <dtrueman@princeton.edu> wrote:
i knew there'd be some good questions!


Yes, it's unavoidable that things like this will lead to questions, but questions are good. Let's be happy so many aspects of ChucK are so questionable! ;¬)
 


i'll have to ask Ge how to do that; i don't know how to set things up
so you can chuck to a function that needs two arguments. i agree it
is more chuckian this way, and i first wrote the example that way
before finding it didn't work. actually, is there another example of
a method that has two args but will allow you to chuck to the first
arg? if there is, i might be able to look at the source and figure it
out. can't think of one offhand at the moment....

I tried to think of one too. but I can't come up with a very clear one. In my own opinion this write operation is somewhat like writing to a array so I think that's one reason to follow the proposed syntax...

LiSa simpson => dac.chan(4);

is somewhat like it as well, except that is a very different operation and we're not doing the actual writing ourselves manually.

Erm... I don't know. Would like to be able to write classes that have member functions that work like that as well now that I think of it, but that is clearly Ge's area. Seems like a sub-section of "cross-chucking" in some way as well. Might be functionality we should have, funny how it only comes up now in this way.
 


LiSa is most definitely interpolating on read, but not on write. i'll
look into the latter at some point....


That would be good, I think, because with this particular write operation there would be a implicit cast from float to int so that's implicit data-loss. I don't think it's all that obvious exactly *what* interpolation would mean in the case of writing single values and it gets more complicated;

buf.valueAt(i) +=> lisa.valueAt( i::samp);

That doesn't sound unreasonable to me either (basically it's a sort of mixing over-dub). Perhaps we should simply round to the nearest integer sample so people who have their own opinion on what interpolated writes mean in this context can implement that themselves in ChucK?

Yours,
Kas.