didascalie-net / span

Spaces And Nodes - Environnement for real time media controls and organisation
didascalie-net.github.com/span
3 stars 0 forks source link

making module json files #22

Closed tmays closed 12 years ago

tmays commented 12 years ago

I've been reworking the patch module-makejson2.maxpat found in sdk of tapemovie2 (that I think should go back to the sdk of span, but that's another discussion). I needed to create .txt files for ctlmap, events, oscsend and mouse because they only had .json files. The "elements" key has been removed, and I've re-formalized a bit how the module-name.txt file can or should be formatted.

When creating a modulename.txt file, Tthere is no longer any restriction on what key names can be included (i.e. address, tags, inputs, outputs, filename, description) for the main attributes of the module. Te only real requirements to follow are that 1) all attributes are liste BEFORE the parameters, controls and messages (what used to be "elements", and 2) each "element" that is listed must start with a line by itself with the name of the element. After that, each attribute of the element is listed, then a new element by itself on a line, then its attributes, etc. In this way, there can be attributes of an element and they will not be confused with the main attributes.

Attributes do not have to be present. We can revert to default values wherever the modulename.json is used.

For development purposes, I suggest we leave the modulename.txt files in the folders of each module, alongside the modulename.json file that is created with module-makejson.


The example of "events.txt" is as follows:

address events tags control event inputs 0 outputs 0 filename span_events description "Events Manager" sw address sw description "on/off switch" class parameter type boolean initval 0 unit none range 0 1 repetition 0 clipmode both ramp 0 rampfunction none localsend address localsend description "switch on or off localsend" class parameter type boolean initval 1 unit none range 0 1 repetition 0 clipmode both ramp 0 rampfunction none oscsendname address oscsendname description "oscsend name to send the events to" class parameter type string initval none type address type description "type of event to create" class parameter type string initval empty subfolder address subfolder description "event storage subfolder" class parameter type string initval none create address create description "create an event" class message type bang

reno- commented 12 years ago

This is a tapemovie 2 feature… So I close this issue.