Compare commits

...

6 Commits

3 changed files with 541 additions and 249 deletions

View File

@@ -6,7 +6,7 @@
A jsui replacement for the preset object.
</digest>
<description>
tc.preset is a jsui clone of the preset object, but loaded with more features, such as preset organization through drag and drop, display as a scrollable list, auto-rewrite the saved JSON/XML file after any change.
tc.preset is a jsui clone of the preset object, but loaded with more features, such as preset organization through drag and drop, display as a scrollable list, colored slots...
Contrary to the preset object, tc.preset doesn't work alone and has to be used in conjonction with a pattrstorage object.<modification class=""></modification>
</description>
@@ -116,7 +116,7 @@
<digest>Active slot color</digest>
<description>Color of the last recalled preset</description>
</attribute>
<attribute name='autowriteagain' get='1' set='1' type='int' size='1' >
<attribute name='autowriteagain' get='1' set='1' type='bool' size='1' >
<digest>Automatic writeagain</digest>
<description>When set to 1, the jsui will automatically send a "writeagain" message to its linked pattrstorage anytime a preset have been stored, moved, renamed, (un)locked or deleted, saving any change into the preset file immediately.</description>
</attribute>
@@ -162,7 +162,7 @@
<digest>Slot color 6</digest>
<description>Slot color 6 in RGBA format. Sending this message without arguments resets the color to its default value. Has an effect only when color_mode is enabled.</description>
</attribute>
<attribute name='display_interp' get='1' set='1' type='int' size='1' >
<attribute name='display_interp' get='1' set='1' type='bool' size='1' >
<digest>Display interpolation</digest>
<description>When set to 1, the jsui will display the ongoing interpolation between presets when a recall message with three arguments or a recallmulti message with at least one argument are sent to the linked pattrstorage.
Notice that the recallmutli message needs to be sent both the pattrstorage and the jsui.</description>
@@ -189,7 +189,16 @@
If a preset is stored in a slot with a higher value than min_row, then min_row is ignored and presets are displayed up to the highest stored one.
</description>
</attribute>
<attribute name='scrollable' get='1' set='1' type='int' size='1' >
<attribute name='pattrstorage' get='1' set='1' type='symbol' size='1' >
<digest>pattrstorage object to bind to</digest>
<description>Set the name of the [pattrstorage] to bind to. Its outlet must be connected to the [tc.preset] inlet.
</description>
</attribute>
<attribute name='recall_passthrough' get='1' set='1' type='bool' size='1' >
<digest>Send recall messages to pattrstorage directly</digest>
<description>When enabled (default) recall messages triggered by clicking filled slots in tc.preset are sent directly to [pattrstorage]. When disabled, these recall messages are sent out of [tc.preset] left outlet and it's up to the user to pass them to [pattrstorage]. It can be usefull for triggering interpolations with custom logic.</description>
</attribute>
<attribute name='scrollable' get='1' set='1' type='bool' size='1' >
<digest>Scroll through your presets</digest>
<description>When set to 1, you can through the jsui to see all your presets, or at least up to the row defined by the min_rows attributes.
</description>
@@ -214,6 +223,18 @@
<digest>Stored slot color</digest>
<description>Sets the stored preset color of the object in RGBA format</description>
</attribute>
<attribute name='ui_rename' get='1' set='1' type='bool' size='1' >
<digest>Rename slots in UI</digest>
<description>Use the attached textedit, if any, to edit slot names directly in the JSUI frame when clicking a slot while holding the control key. When disabled, the textedit remains untouched but gets focused when clicking a slot while holding the control key.</description>
</attribute>
<attribute name='unique_names' get='1' set='1' type='bool' size='1' >
<digest>Force slot names to be unique</digest>
<description>When enabled, force slot names to be unique when renaming slots by appending "bis" to them. Gets applied only to subsequently renamed presets.</description>
</attribute>
<attribute name='use_uid' get='1' set='1' type='bool' size='1' >
<digest>Generate unique identifiers for each stored preset</digest>
<description>When enabled, each stored preset gets a unique identifier, following the preset when it gets renamed, moved and overwritten. Requires a [pattr preset_metadata] at the same patcher of [tc.preset]. This can be useful when doing some complex preset management.</description>
</attribute>
</attributelist>
@@ -222,6 +243,7 @@
<seealsolist>
<seealso name='pattrstorage' />
<seealso name='preset' />
<seealso name='v8ui' />
<seealso name='jsui' />
</seealsolist>

View File

@@ -2,42 +2,27 @@
"patcher" : {
"fileversion" : 1,
"appversion" : {
"major" : 8,
"minor" : 6,
"revision" : 4,
"major" : 9,
"minor" : 1,
"revision" : 0,
"architecture" : "x64",
"modernui" : 1
}
,
"classnamespace" : "box",
"rect" : [ 391.0, 289.0, 483.0, 443.0 ],
"bglocked" : 0,
"openinpresentation" : 0,
"default_fontsize" : 12.0,
"default_fontface" : 0,
"default_fontname" : "Arial",
"gridonopen" : 1,
"rect" : [ 371.0, 273.0, 483.0, 443.0 ],
"gridsize" : [ 15.0, 15.0 ],
"gridsnaponopen" : 1,
"objectsnaponopen" : 1,
"statusbarvisible" : 2,
"toolbarvisible" : 0,
"lefttoolbarpinned" : 2,
"toptoolbarpinned" : 2,
"righttoolbarpinned" : 2,
"bottomtoolbarpinned" : 2,
"toolbars_unpinned_last_save" : 15,
"tallnewobj" : 0,
"boxanimatetime" : 200,
"enablehscroll" : 0,
"enablevscroll" : 0,
"devicewidth" : 0.0,
"description" : "",
"digest" : "",
"tags" : "",
"style" : "",
"subpatcher_template" : "",
"assistshowspatchername" : 0,
"commentary" : "",
"showcommentary" : 0,
"boxes" : [ {
"box" : {
"hidden" : 1,
@@ -60,7 +45,7 @@
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 166.5, 373.0, 150.0, 47.0 ],
"text" : "GPL 3.0\n© Théophile Clet, 2024\nClick here to support",
"text" : "GPL 3.0\n© Théophile Clet, 2025\nClick here to support",
"textcolor" : [ 0.0, 0.0, 0.0, 0.5 ],
"textjustification" : 1
}
@@ -80,7 +65,7 @@
}
, {
"box" : {
"embedstate" : [ [ "spacing", 4 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "text_bg_color", 1, 1, 1, 0.5 ], [ "color_1", 0.743, 0.41, 0.501, 1 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "select_mode", 0 ], [ "scrollable", 0 ], [ "bubblesize", 14 ], [ "margin", 4 ], [ "fontsize", 14 ], [ "color_mode", 0 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "ignoreslotzero", 1 ], [ "min_rows", 10 ], [ "stored_slot_color", 0.502, 0.502, 0.502, 1 ], [ "fontname", "Arial" ], [ "empty_slot_color", 0.349, 0.349, 0.349, 1 ], [ "text_color", 0.129, 0.129, 0.129, 1 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "display_interp", 1 ], [ "bgcolor", 0.2, 0.2, 0.2, 1 ], [ "slot_round", 0 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "active_slot_color", 0.808, 0.898, 0.91, 1 ], [ "autowriteagain", 0 ], [ "layout", 1 ] ],
"embedstate" : [ [ "margin", 4 ], [ "bgcolor", 0.2, 0.2, 0.2, 1 ], [ "scrollable", 0 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "layout", 1 ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "autowriteagain", 0 ], [ "display_interp", 1 ], [ "text_bg_color", 1, 1, 1, 0.5 ], [ "select_mode", 0 ], [ "color_mode", 0 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "empty_slot_color", 0.349, 0.349, 0.349, 1 ], [ "ignoreslotzero", 1 ], [ "color_1", 0.743, 0.41, 0.501, 1 ], [ "text_color", 0.129, 0.129, 0.129, 1 ], [ "spacing", 4 ], [ "slot_round", 0 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "active_slot_color", 0.808, 0.898, 0.91, 1 ], [ "menu_mode", 0 ], [ "bubblesize", 14 ], [ "min_rows", 10 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "fontsize", 14 ], [ "send_name", "none" ], [ "stored_slot_color", 0.502, 0.502, 0.502, 1 ], [ "fontname", "Arial" ], [ "color_3", 0.527, 0.459, 0.756, 1 ] ],
"filename" : "tc.preset",
"id" : "obj-8",
"maxclass" : "jsui",
@@ -113,8 +98,8 @@
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 9.0, 274.0, 129.0, 22.0 ],
"text" : "load tc.preset.maxhelp"
"patching_rect" : [ 9.0, 274.0, 165.0, 22.0 ],
"text" : "loadunique tc.preset.maxhelp"
}
}
@@ -134,7 +119,7 @@
}
, {
"box" : {
"embedstate" : [ [ "spacing", 4 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "text_bg_color", 1, 1, 1, 0.5 ], [ "color_1", 0.743, 0.41, 0.501, 1 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "select_mode", 0 ], [ "scrollable", 0 ], [ "bubblesize", 14 ], [ "margin", 4 ], [ "fontsize", 14 ], [ "color_mode", 0 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "ignoreslotzero", 1 ], [ "min_rows", 10 ], [ "stored_slot_color", 0.502, 0.502, 0.502, 1 ], [ "fontname", "Arial" ], [ "empty_slot_color", 0.349, 0.349, 0.349, 1 ], [ "text_color", 0.129, 0.129, 0.129, 1 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "display_interp", 1 ], [ "bgcolor", 0.2, 0.2, 0.2, 1 ], [ "slot_round", 0 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "active_slot_color", 0.808, 0.898, 0.91, 1 ], [ "autowriteagain", 0 ], [ "layout", 0 ] ],
"embedstate" : [ [ "margin", 4 ], [ "bgcolor", 0.2, 0.2, 0.2, 1 ], [ "scrollable", 0 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "layout", 0 ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "autowriteagain", 0 ], [ "display_interp", 1 ], [ "text_bg_color", 1, 1, 1, 0.5 ], [ "select_mode", 0 ], [ "color_mode", 0 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "empty_slot_color", 0.349, 0.349, 0.349, 1 ], [ "ignoreslotzero", 1 ], [ "color_1", 0.743, 0.41, 0.501, 1 ], [ "text_color", 0.129, 0.129, 0.129, 1 ], [ "spacing", 4 ], [ "slot_round", 0 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "active_slot_color", 0.808, 0.898, 0.91, 1 ], [ "menu_mode", 0 ], [ "bubblesize", 14 ], [ "min_rows", 10 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "fontsize", 14 ], [ "send_name", "none" ], [ "stored_slot_color", 0.502, 0.502, 0.502, 1 ], [ "fontname", "Arial" ], [ "color_3", 0.527, 0.459, 0.756, 1 ] ],
"filename" : "tc.preset",
"id" : "obj-3",
"maxclass" : "jsui",
@@ -205,8 +190,8 @@
],
"dependency_cache" : [ {
"name" : "tc.preset.js",
"bootpath" : "~/Documents/Max 8/Packages/tc.preset/code",
"patcherrelativepath" : "../code",
"bootpath" : "~/Documents/Max 9/Packages/tc.preset/javascript",
"patcherrelativepath" : "../javascript",
"type" : "TEXT",
"implicit" : 1
}

File diff suppressed because it is too large Load Diff