[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-dev] Event-set resolution



On Sun, Dec 30, 2012 at 8:15 PM, Tim Blechmann <tim@xxxxxxxxxx> wrote:
> hi all (especially ron),
>
> the semantics of Event-set is a bit confusing as it does not go through
> the resolution:
>
> x = (dur: inf).play
> x.set(\freq, 110) // works,
> x.set(\octave, 6) // does not update freq
>
> i wonder, is this on purpose? in a way i'd expect dependent values to be
> updated, though i must admit it adds some complexity to the
> implementation as it will require some tracking of dependent variables
> (atm there is no way to determine which environment variables are
> accessed by a FunctionDef)

As I understand it, Event:set is supposed to be used with "node events," e.g.

e = (degree: 0).synth.play;

In this example, the frequency you hear is 440 Hz -- a', not c' as the
given degree specifies. So it seems the current behavior of 'set' is
consistent with the behavior of other node-event methods.

AFAIK the behavior of using 'set' on a different kind of event is not defined.

Maybe the current functionality in NodeEvents.sc should be moved into
a subclass. Calling .synth on an event would return an instance of
this subclass. Then normal events and NodeEvents could have different,
appropriate 'set' implementations.

hjh


-- 
James Harkins /// dewdrop world
jamshark70@xxxxxxxxxxxxxxxxx
http://www.dewdrop-world.net

"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal."  -- Whitman

blog: http://www.dewdrop-world.net/words
audio clips: http://www.dewdrop-world.net/audio
more audio: http://soundcloud.com/dewdrop_world/tracks

_______________________________________________
sc-dev mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-dev/
search: https://listarc.bham.ac.uk/lists/sc-dev/search/