Hallo, Enrique Erne hat gesagt: // Enrique Erne wrote:
could you explain the polyphony example?
doesn't each voice have the same parameter, coming from the gui?
I might want to save settings even though I didn't use a GUI to set them. Settings don't necessarily come from a GUI.
For example say I use an algorithm to generate settings, or I may write my settings into a textfile or a message box - there also is no GUI involved. Settings in Pd however all are manipulated by sending messages, even GUIs are just a way to generate a message. So the way to save state in Pd IMO is to intercept message, not to watch GUI elements.
In regard to polyphony, it's pretty common to duplicate a synth voice many times, manually or using e.g. polypoly or rjlib's u_makepoly. There is no need to have a GUI in those hidden objects, but I still need to access their parameters to set them. So what I need is a way to peek into the abstraction and eavesdrop their messages.
In rjlib that peeping hole is the rightmost inlet. [sssad] is used in a wrapper u_dispatch at that inlet that also dispatches messages coming in to local senders. So the abstractions all know their state even though most of them don't have a GUI. If I want a GUI, I just make one that produces messages for the control inlet.
Maybe some OO programming language experts can say smart things about how this is related to a Model-View-Controller paradigm, where the GUI elements constitute one of many possible Views, the [textfile] is a Model and [sssad] is the controller but I'm not good at this stuff.
Frank Barknecht Do You RjDj.me? _ ______footils.org__