![]() |
![]() ![]() ![]() ![]() ![]()
|
next newest topic | next oldest topic |
Author | Topic: Array question |
Darwin M Member |
![]() ![]() ![]() Hi, is there a way to move through the values of an array smoothely? I tried til I turned purple last night.. and what do the error messages... "Extra characters after a period-->," Variable undeclared-->, HotVariables cannot perform the operation of:....." really mean, its obvious something is wrong with an expression.. but it is not as specific to give me insight on where to look to fix my problem... maybe the error messages could mean many things, to many to give a specific answer? thanks in advance IP: Logged |
pete Member |
![]() ![]() ![]() Hi Darwin "into" moves to points between the points in an array but it's not hot i.e it's smaltalk not cappytalk. So the way to do it is to use two identical copies of the array. One gets pointed to by the nearest int (truncated) below the index value and the other points to the 1 plus that int point. You then have to interpolate between the two derived values under the control of the fractional part of the index. If you need a more detailed explanation let me know hope it helps Pete [This message has been edited by pete (edited 03 January 2007).] IP: Logged |
HectorBenard Member |
![]() ![]() ![]() Hi Darwin and Pete, I think that into: IS capytalk, isn't it? If I understand correctly what Darwin is trying to do I think it should work. I just tried: !Fader1 into: #({0 @ 0} {0.5 @2} {0.75 @ 4 } {1 @ 10}) and it works fine. Cheers, Hector IP: Logged |
pete Member |
![]() ![]() ![]() Hector I think your right and I'm wrong. What "into" cannot do that "of " can though, is have hot elements in the array, if my memory serves me right. IP: Logged |
Darwin M Member |
![]() ![]() ![]() Pete, thanks a million, I changed of : to into : in the array, along with adding the {0@..} {1@...} it worked perfectly..the values in the array now interpolate (move smoothely). I'm not sure I really understood " One gets pointed to by the nearest int (truncated) below the index...." I will try to figure this out.. by experimenting with the into: array... thanks again Pete Darwin edit: (into: was in the Capytalk Quick Reference.. (thanks Hector for your example above) [This message has been edited by Darwin M (edited 03 January 2007).] [This message has been edited by Darwin M (edited 03 January 2007).] IP: Logged |
pete Member |
![]() ![]() ![]() It's Hector you should thank. What I was discribing was how to do !Fader1 into: #({0 @ !V1} {1 @!V2} {2 @ !V4 } {3 @ !V5}) which doesn't work This is because the elements in the "into" array are smalltalk and set up at compile time. If you wanted the elements values to change while playing you would have to use two "of" type arrays as I described above not "into" But it seems you didn't need hot elements in this case. hope this makes sense Pete IP: Logged |
cristian_vogel Member |
![]() ![]() ![]() man, interpolating through an array that consists of continuosly modulating elements could be insanely cool. I think the bank fader examples posted at the WiKi does something of the sort - I've been working on that at the moment , will post the results soon. IP: Logged |
cristian_vogel Member |
![]() ![]() ![]() Re my post above.... isn't that what the Xen Oscillator is capable of? - Maybe the Xen Oscillator at low frequencies can function as a controller array, made of dynamic control points with interpolation betweeen them... [This message has been edited by cristian_vogel (edited 08 January 2007).] IP: Logged |
SSC Administrator |
![]() ![]() ![]() One could use the InputOutputCharacteristic Sound as an audio-rate version of the into: array. Use a Constant (with an event as the value) as the input to the Sound and adjust the input and/or output values live. Smoothing controls the amount of interpolation (0 = none, 0.5 is linear, 1 is spline interpolation). IP: Logged |
All times are CT (US) | next newest topic | next oldest topic |
![]() ![]() |
This forum is provided solely for the support and edification of the customers of Symbolic Sound Corporation.