I was just trying to hack up a quick step sequencer for a class exercise.
-
Abstraction containing an array, where the array sets its "Save contents" flag = true. Well, the array object exists in the abstraction file, but not in the containing patch -- so it isn't saved. Scratch that idea.
-
Use toggles with "init = true" to save the sequence data and provide simple switches (in graph-on-parent). Problem: It's undocumented how to query a toggle for its current state, without changing the state. I suppose I could close a spigot, send bang, then re-open the spigot and send another bang, but... usability, anyone? As workarounds go, that would not be anything to be proud of.
-
Finally revert to subpatches containing graph-on-parent arrays (which, btw, don't limit the data to the specified range -- after mouse manipulation, it's pretty ugly -- I could include logic to clip out of range values, but I was short on time and it didn't leap out of the documentation whether arrays send a message when they are changed graphically. If you can't detect the change from a message, then the only other way is to run a busy loop constantly checking the values, which... nah, I'm really not gonna model that for the students).
So how does one really handle this? I'm not quite convinced that any of these is a really beautiful solution.
hjh