Finally, you may want to access some of the physical model links
in the
week7a
class.
In discussing data transcoding,
Jason showed a lot of snazzy links to different datasets on the web.
Here are a few:
The second part of these scripts is the run loop or the part where you actually do the algorithmic thang. To do most anything you want to do in programming, you need to be able to do something over and over and over (iterating) again, possibly changing the values of certain parameters each time. We accomplish this in RTcmix scripts using the construction:
for(var = 0; var < 14; var = var + 1) { stuff gets done in here... }The thing called "var" could be any variable name, and the numbers used in this "for" loop (var < 14, var + 1) could also be anything. In the above situation, the stuff gets done in here... statement -- anything between the open-curly-brace ("{") and closed-curly-brace ("}") -- would happen 14 times, as "var" gets moved up by 1 each time (starting at 0). Note the use of semicolons (";") in the above, more on this later.
In addition to looping, it's important in algorithmic composition to be able to make decisions based on current information/context/whatever. This is so easy! in RTcmix scripts. Just say:
if (something < somethingelse) { do something completely different! }or
if (something > somethingelse) { do something completely different! } else { face the existential void... }How these operate should be obvious. One quick comment: the RTcmix language has a fairly C-like (i.e. like the "C" programming language) syntax. In "if()" statements, the comparators are less-than ("<"), greater-than (">"), less-than-or-equal-to ("<="), greater-than-or-equal-to (">="), equal-to ("=="). Note the use of the double 'equals' in comparing. A single 'equals' is the assignment operator in C, which means that it wouldn't compare the value of a variable with something, it would instead assign that value to the variable. Think about it.
One final note about RTcmix and C-like syntax: all of the C constructions are available in RTcmix (do-loops, while-loops, nested loops, &&, || operators, etc.) with two big exceptions. RTcmix does NOT require semicolons at the end of each statement. The only place where semicolons are needed is in the for-loop setup as noted above. RTcmix also does NOT support unary pre- or post-fix operators, so "++var" and "var--" do not work.
After this brief overview, we explored the PeRColate physical model algorithms, which allow you to dynamically mess around with the phys-model params and hear the results. Fun! Check out the help patches that come with the PeRColate objects.
Then Jason had fun with transcoding. Patches above, plus more to
come in FUTURE CLASSES!