Тёмный

Events, Patterns, Sequencing I - Week 7 Fall 2021 MUS 499C - Intro to SuperCollider 

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

Lecture code files: uofi.box.com/s...
Problem sets: uofi.box.com/s...
Introduction to sequencing, including basic usage of Routines and value Patterns.

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

 

28 сен 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 10   
@zentrumsounds
@zentrumsounds Год назад
Hi Eli, sorry for being the only one commenting on this. But I'm really struggling with what happens at 5'19". According to the Harkins' Supercollider Tutorial, b[0] is synonymous with b.at(0). Why then does b.at(dir.folderName.asSymbol) result in an error and b[dir.folderName.asSymbol] work fine? Indeed i really can't quite work out why b[dir.folderName.asSymbol] puts something in the Event b()? Thanks!
@elifieldsteel
@elifieldsteel Год назад
This is actually a very good question. I've encountered this issue very occasionally, but never really stopped to think about it. This took me a few minutes to figure out. Accessing items in an Event (or some other type of Collection) isn't the problem. Both syntax styles work fine: y = (drum: 75, flute: 36, string: 9); y[\flute]; // -> 36 y.at(\flute); // -> 36 But, for whatever reason, trying to assign a new value in a Collection slot fails with the latter of these two syntax styles: y[\flute] = 50; // works y.at(\flute) = 200; // fails I don't actually know what's going on under the hood - a more seasoned SC developer could likely explain the nuance of why this happens. Reflecting on my video, however, I think I'm being sloppy. I shouldn't really be using 'at' (or its syntax shortcut) to modify items. Instead, I should almost certainly be using 'put,' which somehow "feels more correct." So, instead of: b[dir.folderName.asSymbol] = bufArray; I should be expressing this line of code as: b.put(dir.folderName.asSymbol, bufArray); Thanks for this question! I hope my answer clears things up, at least partially.
@zentrumsounds
@zentrumsounds Год назад
@@elifieldsteel That's really useful and completely clears up my confusion. I've repeatedly returned to this particular code and was always confounded by that jump. Using b.put makes the process far more clear to me. Thanks for taking the time to explain this... and indeed it did strike me as a bit inconsistent (though it had me thinking for hours rather than minutes!)
@zentrumsounds
@zentrumsounds 2 года назад
Eli... why does the line ~f() - @10:48 - cause the function preceding it to execute? Thanks!
@elifieldsteel
@elifieldsteel 2 года назад
You've omitted a period: it is ~f.() rather than ~f(). This is a syntax shortcut for calling 'value' on a function: ~f = { 2 + 2 }; ~f.value; // -> 4 ~f.(); // same result
@zentrumsounds
@zentrumsounds 2 года назад
@@elifieldsteel Ah that's great. Yes I missed the period, though didn't miss it when trying it in different situations and could tell that it was working across my examples. So it's basically just a shortcut then for .value Thanks! P.S. any chance those problem sets might be available again soon?
@elifieldsteel
@elifieldsteel 2 года назад
@@zentrumsounds Problem sets should be available again, but I've moved the answers to a separate, non-shared folder.
@zentrumsounds
@zentrumsounds Год назад
@@elifieldsteel Thanks Eli. Just checking that but can still only access the lecture codes.
@zentrumsounds
@zentrumsounds Год назад
@@elifieldsteel Sorry for asking again Eli. I'd really love to try the problems again. But still can't seem to access... Thanks1
Далее
OpenAI’s New ChatGPT: 7 Incredible Capabilities!
6:27
Being Competent With Coding Is More Fun
11:13
Просмотров 80 тыс.
Programming with Math | The Lambda Calculus
21:48
Просмотров 194 тыс.
What If The Universe DID NOT Start With The Big Bang?
18:24