Тёмный

GUI - Week 12 Fall 2022 MUS 499C - Intro to SuperCollider 

Eli Fieldsteel
Подписаться 12 тыс.
Просмотров 1,5 тыс.
50% 1

Lecture code files: uofi.box.com/s/b2hapggp6taaea...
Homework assignments: uofi.box.com/s/fi1ibe34biouft...
An introduction to creating graphical user interfaces (GUIs) in SuperCollider.

Видеоклипы

Опубликовано:

 

7 янв 2023

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 3   
@zentrumsounds
@zentrumsounds Год назад
Hi Eli. I note that an alternative to using 8.collect({Slider.new()}) to generate the sliders (@15mins) is to use {Slider.new(win)}!8. I'm a little confused why this works yet 8.do({Slider.new()}) does not work. In fact this probably boils down to the fact that i still can't wrap my head around the distinction between .collect and .do (whose help files seem so similar).
@elifieldsteel
@elifieldsteel Год назад
The difference between 'do' and 'collect' involves _what_ _these_ _methods_ _return._ 'do' returns its receiver, but 'collect' returns a collection populated with the returned values of its function. Therefore, 8.do({Thing}) will always return '8,' but 8.collect({Thing}) will return an array of eight Things. In this case, 'collect' is a good choice because it returns an array of Sliders. We capture this array in a variable so that we can reference the Sliders later on. Because 'do' only returns its receiver (the number 8), it's not a good choice here - there's no point is capturing a reference to the number 8. A good question is - what is 'do' actually useful for? I think it's safe to say that anything you can do with 'do', you can also do with 'collect', but not the other way around. So, 'do' is useful when you simply want to do something a certain number of times, but don't need to capture and retain some result, for example, setting a value for each Slider in the array. (And 'do' is only two characters long, which is a small bonus). Relatedly, it's important to be aware that 8.do and 8.collect are shortcuts for [0,1,2,3,4,5,6,7].do and [0,1,2,3,4,5,6,7].collect. There are lots of other iteration methods in the same family as 'do/collect' (select, reject, detect, any, every, etc.). Understanding these may help put 'do' and 'collect' into context. See the Collection help file for examples and descriptions.
@zentrumsounds
@zentrumsounds Год назад
@@elifieldsteel Thanks Eli. Sometimes I wish you wrote the Help files! That such a clear explanation compared to the command+D cryptogram!
Далее
Crazy Girl destroy RC CARS 👩🤪🚘🚨
00:20
Просмотров 2,8 млн
SuperCollider Tutorial: 14. GUI
40:06
Просмотров 21 тыс.
Pure Data vs SuperCollider race to the finish
12:48
Просмотров 8 тыс.
JANAGA - Интервью (Official Music Video)
2:38
Просмотров 278 тыс.
Gulinur - Chaki chaki (Official Music Video 2024)
3:32
Janona
4:09
Просмотров 643 тыс.