I could not disagree with this more.
I think if something is complex, it should be slowly and carefully taught as such. Not given a quick hack thats familiar and nice, but will only see you so far then you will have to relearn it, and change the way you think, causing all manner of issues.
Arg style work in some cases, but when it doesn’t it is a huge conceptual leap to understand what is actually happening (for example, if you are trying to have a specific rate argument).
Whereas, if you learn NamedControl from the beginning, it is no more difficult that In
or Out
, in fact, it encourages you think more in terms of UGens which is always better.
It is 2 key presses slower: \freq.kr
vs |freq|
and those two keys (“kr”) contain a lot of important information. If you want a default value, particularly if its an array, (i.e. \freq.kr([20, 421, 424])
) named control is always easier to type and clearer. I also disagree that creative work has to be messy, once you setup and define some constraints or basic structures (assuming they are well written) it is very quick and clean to manipulate them. Further, to develop a sustainable practice, one where your work is legible and reusable, it is important to take a moment to refactor.
The way you learn the language defines your intuition and understand of said language. This is essentially the Sapir –Whorf hypothesis applied to programming languages, there are lots of articles and book on this in computer science literature. So I think this is quite a bad argument, never mind that NamedControl
is very intuitive and the arg style hides lots of important information. I think its like saying, I don’t know named control, therefore it is unfamiliar to me, therefore I don’t want to learn it.
Ultimately, I think this sums up what I’m trying to say. NamedControl works well, not just in this use case, but in all, since it is very little effort to write, encourages one to think in terms of UGens mores, allows for programmatically create controls as simply as concatenating strings, and therefore, it should be the default - or at least the way supercollider is taught and spoken about in the literature, and this forum counts as that.
… yet again a thread has turned into named control vs args… but that just goes to show how simple this is to solve with named control … ('freq' ++ 'Range').kr([0,1])
and how difficult it is with args (you’d need some type of reflection whilst inside the function…).
Anway, I think the two solutions I posted solve the issue. One is moving the mapping inside the synthdef, the other makes a new one. Perhaps someone has a better idea?