add interp_mode, change drag_mode behavior, add option hold to switch

between drag modes, change interp multi for gaussian distribution, doc
update
This commit is contained in:
2026-07-14 16:34:04 +02:00
parent 08f97d61de
commit e5d871456e
4 changed files with 1086 additions and 293 deletions

View File

@@ -185,6 +185,11 @@
<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>
</attribute>
<attribute name='drag_mode' get='1' set='1' type='int' size='1' >
<digest>Drag Mode</digest>
<description>Sets the behavior of click+drag interactions. 0 disables them, 1 (default) allows to move presets around, while 2 interpolates through presets, according to interp_mode. You can temporarily switch between modes 1 and 2 by holding option/alt.
</description>
</attribute>
<attribute name='edited_color' get='1' set='1' type='list' size='4' >
<digest>Edited Dot Color</digest>
<description>Defines the color of the dot shown on top of a slot when the corresponding preset is edited. See poll_edited attribute.</description>
@@ -193,6 +198,17 @@
<digest>Empty slot color</digest>
<description>Sets the empty slot color of the object in RGBA format</description>
</attribute>
<attribute name='interp_mode' get='1' set='1' type='int' size='1' >
<digest>Interpolation mode</digest>
<description>Defines the interpolation behavior occuring when click+dragging while drag_mode is set to 2. If 0 (disabled), nothing happens. If 1 (in-line interp), interpolation happens across adjacent presets, even if separated by empty slots. In mode 2 (multi interp), presets are interpolated using recallmulti pattrstorage feature. The closest a preset is from the mouse cursor, the more it will be weighted, according to a gaussian distribution. See interp_multi_radius to change the way distance from mouse affects the weight.
If recall_passthrough is disabled, recall and recallmulti messages generated by dragging interactions are sent to tc.preset leftmost outlet only, letting the user to trigger custom logic before potentially re-routing them toward pattrstorage (recall) or both pattrstorage and tc.preset (recallmulti).
</description>
</attribute>
<attribute name='interp_multi_radius' get='1' set='1' type='float' size='1' >
<digest>Interp_multi Radius</digest>
<description> Defines how distance between a preset and the mouse affects the weight of that preset when interpolating using interp_mode 2. A value of 3 means that all filled preset slots closer than roughly 3 slots in the presets grid will be part of the generated recallmulti message.
</description>
</attribute>
<attribute name='layout' get='1' set='1' type='int' size='1' >
<digest>How presets are displayed</digest>
<description>When set to 0, the jsui mimics the default preset object: slots are displayed in a grid. When set to 1, they are displayed as a vertical list, with the preset slots on the left and their name on the right.</description>
@@ -227,7 +243,7 @@
</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>
<description>When enabled (default) recall messages triggered by clicking filled slots in tc.preset, or recall and recallmulti messages resulting from a dragging interaction with drag_mode set to 2, are sent directly to [pattrstorage]. When disabled, these recall/recallmulti messages are sent out of tc.prese] left outlet and it's up to the user to pass them to [pattrstorage].</description>
</attribute>
<attribute name='scrollable' get='1' set='1' type='bool' size='1' >
<digest>Scroll through your presets</digest>

View File

@@ -10,7 +10,7 @@
}
,
"classnamespace" : "box",
"rect" : [ 344.0, 246.0, 899.0, 646.0 ],
"rect" : [ 344.0, 246.0, 904.0, 646.0 ],
"bglocked" : 0,
"openinpresentation" : 0,
"default_fontsize" : 12.0,
@@ -42,6 +42,410 @@
"assistshowspatchername" : 0,
"integercoordinates" : 1,
"boxes" : [ {
"box" : {
"id" : "obj-2",
"maxclass" : "newobj",
"numinlets" : 0,
"numoutlets" : 0,
"patcher" : {
"fileversion" : 1,
"appversion" : {
"major" : 8,
"minor" : 6,
"revision" : 5,
"architecture" : "x64",
"modernui" : 1
}
,
"classnamespace" : "box",
"rect" : [ 344.0, 272.0, 904.0, 620.0 ],
"bglocked" : 0,
"openinpresentation" : 0,
"default_fontsize" : 12.0,
"default_fontface" : 0,
"default_fontname" : "Arial",
"gridonopen" : 1,
"gridsize" : [ 15.0, 15.0 ],
"gridsnaponopen" : 1,
"objectsnaponopen" : 1,
"statusbarvisible" : 2,
"toolbarvisible" : 1,
"lefttoolbarpinned" : 0,
"toptoolbarpinned" : 0,
"righttoolbarpinned" : 0,
"bottomtoolbarpinned" : 0,
"toolbars_unpinned_last_save" : 0,
"tallnewobj" : 0,
"boxanimatetime" : 200,
"enablehscroll" : 1,
"enablevscroll" : 1,
"devicewidth" : 0.0,
"description" : "",
"digest" : "",
"tags" : "",
"style" : "",
"subpatcher_template" : "",
"showontab" : 1,
"assistshowspatchername" : 0,
"integercoordinates" : 1,
"boxes" : [ {
"box" : {
"bubble" : 1,
"bubblepoint" : 0.0,
"id" : "obj-16",
"linecount" : 2,
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 203.0, 499.0, 207.0, 37.0 ],
"text" : "Click and drag around to recall multiple presets with interpolation!"
}
}
, {
"box" : {
"hidden" : 1,
"id" : "obj-15",
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 186.0, 180.0, 89.0, 22.0 ],
"text" : "loadmess set 2"
}
}
, {
"box" : {
"hidden" : 1,
"id" : "obj-13",
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 44.0, 70.0, 89.0, 22.0 ],
"text" : "loadmess set 2"
}
}
, {
"box" : {
"id" : "obj-9",
"maxclass" : "tab",
"mode" : 1,
"numinlets" : 1,
"numoutlets" : 3,
"outlettype" : [ "int", "", "" ],
"parameter_enable" : 0,
"patching_rect" : [ 44.0, 98.0, 180.0, 24.0 ],
"tabs" : [ "off", "move", "interpolate" ]
}
}
, {
"box" : {
"id" : "obj-8",
"maxclass" : "tab",
"numinlets" : 1,
"numoutlets" : 3,
"outlettype" : [ "int", "", "" ],
"parameter_enable" : 0,
"patching_rect" : [ 186.0, 209.0, 150.0, 26.0 ],
"tabs" : [ "off", "in-line", "multi" ]
}
}
, {
"box" : {
"id" : "obj-14",
"linecount" : 9,
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 545.0, 367.0, 274.0, 127.0 ],
"text" : "If recall_passthrough is disabled, the recall/recallmulti messages are output from tc.preset leftmost outlet without triggering any recall. This allows to trigger custom logic before the interpolation happens.\nSimple recall messages can then be re-routed directly to pattrstorage, while recallmulti messages (happening with interp_mode 2) have to be routed to both pattrstorage and tc.preset."
}
}
, {
"box" : {
"bubble" : 1,
"id" : "obj-12",
"linecount" : 6,
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 338.0, 174.0, 463.0, 91.0 ],
"text" : "interp_mode defines the way interpolation through dragging behaves:\nIn mode 0, interpolating by dragging is disabled\nIn mode 1, interpolation happens across adjacent presets\nIn mode 2, interpolation happens with any filled preset around the mouse. Presets are weighted by a gaussian distribution of their distance from the mouse cursor. You can select the \"range\" of interpolated presets by changing interp_multi_radius"
}
}
, {
"box" : {
"bubble" : 1,
"id" : "obj-11",
"linecount" : 6,
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 229.0, 65.0, 485.0, 91.0 ],
"text" : "With drag_mode you can chose the behavior of a click+drag on a filled slot:\n0: Nothing happens\n1: Move preset (default)\n2: Interpolate through presets, according to interp_mode\n\nWhen mode 1 is selected, you can hold option|alt to access mode 2, and vice versa."
}
}
, {
"box" : {
"dontreplace" : 1,
"id" : "obj-3",
"maxclass" : "message",
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 10.0, 514.0, 107.0, 22.0 ]
}
}
, {
"box" : {
"id" : "obj-38",
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 3,
"outlettype" : [ "", "", "" ],
"patching_rect" : [ 286.0, 378.0, 40.0, 22.0 ],
"restore" : [ -0.491674737222271, -0.13386532069175, -0.202102600162062, 0.112940503294379, 0.61887056400379, 0.375818456094497, 0.691588247313825, 0.526121526460706, 0.431649499259424, -0.09358295094112, -0.001737060618565, -0.460217681717535, -0.458843066739609, -0.561134533604532, -0.46144612532222, -0.206967618908832 ],
"saved_object_attributes" : {
"parameter_enable" : 0,
"parameter_mappable" : 0
}
,
"text" : "pattr",
"varname" : "u099005226"
}
}
, {
"box" : {
"id" : "obj-34",
"maxclass" : "multislider",
"numinlets" : 1,
"numoutlets" : 2,
"outlettype" : [ "", "" ],
"parameter_enable" : 0,
"patching_rect" : [ 297.0, 405.0, 136.0, 78.0 ],
"size" : 16,
"varname" : "multislider"
}
}
, {
"box" : {
"border" : 0,
"embedstate" : [ [ "bgcolor", 0.125, 0.125, 0.125, 1 ], [ "fontname", "Arial" ], [ "pattrstorage", "tcpreset_help" ], [ "interp_mode", 2 ], [ "timestamp", 0 ], [ "stored_slot_color", 0.458595350062755, 0.458595237564901, 0.458595266962388, 1 ], [ "edited_color", 1, 0.49, 0.263, 1 ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "menu_mode", 0 ], [ "ignoreslotzero", 0 ], [ "autoname", 0 ], [ "select_mode", 0 ], [ "active_slot_color", 0.618934978328545, 0.744701397656435, 0.953750108255376, 1 ], [ "poll_edited", 0 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "spacing", 4 ], [ "unique_names", 0 ], [ "display_interp", 1 ], [ "slot_round", 0 ], [ "empty_slot_color", 0.221327066888467, 0.221327006361825, 0.221327022178404, 1 ], [ "ui_rename", 0 ], [ "interp_multi_radius", 2 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "send_name", "none" ], [ "use_uid", 0 ], [ "bubblesize", 32 ], [ "scrollable", 0 ], [ "store_passthrough", 1 ], [ "drag_mode", 2 ], [ "color_1", 0.743, 0.41, 0.501, 1 ], [ "text_color", 0.85, 0.85, 0.85, 1 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "recall_passthrough", 1 ], [ "margin", 4 ], [ "click_mode", 1 ], [ "min_rows", 10 ], [ "color_mode", 0 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "fontsize", 13 ], [ "nbslot_edit", 1 ], [ "layout", 0 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "autowriteagain", 0 ] ],
"filename" : "tc.preset.js",
"id" : "obj-10",
"maxclass" : "jsui",
"numinlets" : 1,
"numoutlets" : 5,
"outlettype" : [ "", "", "", "", "" ],
"parameter_enable" : 0,
"patching_rect" : [ 10.0, 378.0, 257.0, 112.0 ]
}
}
, {
"box" : {
"id" : "obj-1",
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 10.0, 342.0, 229.0, 22.0 ],
"saved_object_attributes" : {
"client_rect" : [ 100, 172, 596, 755 ],
"parameter_enable" : 0,
"parameter_mappable" : 0,
"storage_rect" : [ 365, 44, 816, 172 ]
}
,
"text" : "pattrstorage tcpreset_help @savemode 0",
"varname" : "tcpreset_help"
}
}
, {
"box" : {
"border" : 0,
"filename" : "helpname.js",
"id" : "obj-4",
"ignoreclick" : 1,
"jsarguments" : [ "tc.preset" ],
"maxclass" : "jsui",
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "" ],
"parameter_enable" : 0,
"patching_rect" : [ 10.0, 10.0, 188.288009643554688, 57.599853515625 ]
}
}
, {
"box" : {
"attr" : "interp_mode",
"id" : "obj-5",
"lock" : 1,
"maxclass" : "attrui",
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "" ],
"parameter_enable" : 0,
"patching_rect" : [ 186.0, 242.0, 116.0, 22.0 ],
"text_width" : 87.0
}
}
, {
"box" : {
"attr" : "interp_multi_radius",
"id" : "obj-6",
"lock" : 1,
"maxclass" : "attrui",
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "" ],
"parameter_enable" : 0,
"patching_rect" : [ 630.0, 267.0, 171.0, 22.0 ],
"text_width" : 121.0
}
}
, {
"box" : {
"attr" : "drag_mode",
"id" : "obj-7",
"lock" : 1,
"maxclass" : "attrui",
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "" ],
"parameter_enable" : 0,
"patching_rect" : [ 44.0, 130.0, 113.0, 22.0 ],
"text_width" : 81.0
}
}
, {
"box" : {
"attr" : "recall_passthrough",
"id" : "obj-2",
"lock" : 1,
"maxclass" : "attrui",
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "" ],
"parameter_enable" : 0,
"patching_rect" : [ 545.0, 342.0, 150.0, 22.0 ],
"text_width" : 118.0
}
}
],
"lines" : [ {
"patchline" : {
"destination" : [ "obj-10", 0 ],
"source" : [ "obj-1", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-3", 1 ],
"source" : [ "obj-10", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-9", 0 ],
"hidden" : 1,
"source" : [ "obj-13", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-8", 0 ],
"hidden" : 1,
"source" : [ "obj-15", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-10", 0 ],
"source" : [ "obj-2", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-34", 0 ],
"source" : [ "obj-38", 1 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-10", 0 ],
"source" : [ "obj-5", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-10", 0 ],
"source" : [ "obj-6", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-10", 0 ],
"source" : [ "obj-7", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-5", 0 ],
"source" : [ "obj-8", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-7", 0 ],
"source" : [ "obj-9", 0 ]
}
}
]
}
,
"patching_rect" : [ 462.0, 27.0, 84.0, 22.0 ],
"saved_object_attributes" : {
"description" : "",
"digest" : "",
"globalpatchername" : "",
"tags" : ""
}
,
"text" : "p interpolation",
"varname" : "behavior[1]"
}
}
, {
"box" : {
"id" : "obj-19",
"maxclass" : "newobj",
@@ -58,7 +462,7 @@
}
,
"classnamespace" : "box",
"rect" : [ 0.0, 26.0, 899.0, 620.0 ],
"rect" : [ 0.0, 26.0, 904.0, 620.0 ],
"bglocked" : 0,
"openinpresentation" : 0,
"default_fontsize" : 12.0,
@@ -92,7 +496,7 @@
"lines" : [ ]
}
,
"patching_rect" : [ 756.0, 25.7999267578125, 50.0, 22.0 ],
"patching_rect" : [ 816.0, 27.0, 50.0, 22.0 ],
"saved_object_attributes" : {
"description" : "",
"digest" : "",
@@ -139,7 +543,7 @@
}
,
"classnamespace" : "box",
"rect" : [ 0.0, 26.0, 899.0, 620.0 ],
"rect" : [ 0.0, 26.0, 904.0, 620.0 ],
"bglocked" : 0,
"openinpresentation" : 0,
"default_fontsize" : 12.0,
@@ -666,7 +1070,7 @@
, {
"box" : {
"border" : 0,
"embedstate" : [ [ "spacing", 4 ], [ "edited_color", 1, 0.49, 0.263, 1 ], [ "recall_passthrough", 1 ], [ "stored_slot_color", 0.458595350062755, 0.458595237564901, 0.458595266962388, 1.0 ], [ "min_rows", 10 ], [ "color_1", 0.743, 0.41, 0.501, 1 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "nbslot_edit", 1 ], [ "send_name", "none" ], [ "layout", 0 ], [ "use_uid", 0 ], [ "timestamp", 0 ], [ "autoname", 0 ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "empty_slot_color", 0.221327066888467, 0.221327006361825, 0.221327022178404, 1.0 ], [ "text_color", 0.85, 0.85, 0.85, 1.0 ], [ "scrollable", 0 ], [ "margin", 4 ], [ "ui_rename", 0 ], [ "fontsize", 13 ], [ "active_slot_color", 0.618934978328545, 0.744701397656435, 0.953750108255376, 1.0 ], [ "bubblesize", 14 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "display_interp", 1 ], [ "poll_edited", 0 ], [ "slot_round", 0 ], [ "fontname", "Arial" ], [ "pattrstorage", "tcpreset_help" ], [ "color_mode", 0 ], [ "click_mode", 0 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "menu_mode", 0 ], [ "select_mode", 0 ], [ "ignoreslotzero", 1 ], [ "unique_names", 0 ], [ "bgcolor", 0.125, 0.125, 0.125, 1.0 ], [ "autowriteagain", 0 ], [ "color_3", 0.527, 0.459, 0.756, 1 ] ],
"embedstate" : [ [ "bgcolor", 0.125, 0.125, 0.125, 1.0 ], [ "fontname", "Arial" ], [ "pattrstorage", "tcpreset_help" ], [ "interp_mode", 1 ], [ "timestamp", 0 ], [ "stored_slot_color", 0.458595350062755, 0.458595237564901, 0.458595266962388, 1.0 ], [ "edited_color", 1, 0.49, 0.263, 1 ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "menu_mode", 0 ], [ "ignoreslotzero", 1 ], [ "autoname", 0 ], [ "select_mode", 0 ], [ "active_slot_color", 0.618934978328545, 0.744701397656435, 0.953750108255376, 1.0 ], [ "poll_edited", 0 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "spacing", 4 ], [ "unique_names", 0 ], [ "display_interp", 1 ], [ "slot_round", 0 ], [ "empty_slot_color", 0.221327066888467, 0.221327006361825, 0.221327022178404, 1.0 ], [ "ui_rename", 0 ], [ "interp_multi_radius", 1.5 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "send_name", "none" ], [ "use_uid", 0 ], [ "bubblesize", 14 ], [ "scrollable", 0 ], [ "store_passthrough", 1 ], [ "drag_mode", 1 ], [ "color_1", 0.743, 0.41, 0.501, 1 ], [ "text_color", 0.85, 0.85, 0.85, 1.0 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "recall_passthrough", 1 ], [ "margin", 4 ], [ "click_mode", 0 ], [ "min_rows", 10 ], [ "color_mode", 0 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "fontsize", 13 ], [ "nbslot_edit", 1 ], [ "layout", 0 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "autowriteagain", 0 ] ],
"filename" : "tc.preset.js",
"id" : "obj-10",
"maxclass" : "jsui",
@@ -952,7 +1356,7 @@
}
,
"classnamespace" : "box",
"rect" : [ 344.0, 272.0, 899.0, 620.0 ],
"rect" : [ 0.0, 26.0, 904.0, 620.0 ],
"bglocked" : 0,
"openinpresentation" : 0,
"default_fontsize" : 12.0,
@@ -1520,7 +1924,7 @@
, {
"box" : {
"border" : 0,
"embedstate" : [ [ "spacing", 4 ], [ "edited_color", 1, 0.49, 0.263, 1 ], [ "recall_passthrough", 0 ], [ "stored_slot_color", 0.458595350062755, 0.458595237564901, 0.458595266962388, 1.0 ], [ "min_rows", 10 ], [ "color_1", 0.743, 0.41, 0.501, 1 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "nbslot_edit", 1 ], [ "send_name", "none" ], [ "layout", 0 ], [ "use_uid", 0 ], [ "timestamp", 0 ], [ "autoname", 0 ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "empty_slot_color", 0.221327066888467, 0.221327006361825, 0.221327022178404, 1.0 ], [ "text_color", 0.85, 0.85, 0.85, 1.0 ], [ "scrollable", 0 ], [ "margin", 4 ], [ "ui_rename", 1 ], [ "fontsize", 13 ], [ "active_slot_color", 0.618934978328545, 0.744701397656435, 0.953750108255376, 1.0 ], [ "bubblesize", 14 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "display_interp", 1 ], [ "poll_edited", 1 ], [ "slot_round", 0 ], [ "fontname", "Arial" ], [ "pattrstorage", "tcpreset_help" ], [ "color_mode", 0 ], [ "click_mode", 1 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "menu_mode", 0 ], [ "select_mode", 0 ], [ "ignoreslotzero", 1 ], [ "unique_names", 0 ], [ "bgcolor", 0.125, 0.125, 0.125, 1.0 ], [ "autowriteagain", 0 ], [ "color_3", 0.527, 0.459, 0.756, 1 ] ],
"embedstate" : [ [ "bgcolor", 0.125, 0.125, 0.125, 1.0 ], [ "fontname", "Arial" ], [ "pattrstorage", "tcpreset_help" ], [ "interp_mode", 1 ], [ "timestamp", 0 ], [ "stored_slot_color", 0.458595350062755, 0.458595237564901, 0.458595266962388, 1.0 ], [ "edited_color", 1, 0.49, 0.263, 1 ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "menu_mode", 0 ], [ "ignoreslotzero", 1 ], [ "autoname", 0 ], [ "select_mode", 0 ], [ "active_slot_color", 0.618934978328545, 0.744701397656435, 0.953750108255376, 1.0 ], [ "poll_edited", 1 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "spacing", 4 ], [ "unique_names", 0 ], [ "display_interp", 1 ], [ "slot_round", 0 ], [ "empty_slot_color", 0.221327066888467, 0.221327006361825, 0.221327022178404, 1.0 ], [ "ui_rename", 1 ], [ "interp_multi_radius", 1.5 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "send_name", "none" ], [ "use_uid", 0 ], [ "bubblesize", 14 ], [ "scrollable", 0 ], [ "store_passthrough", 1 ], [ "drag_mode", 1 ], [ "color_1", 0.743, 0.41, 0.501, 1 ], [ "text_color", 0.85, 0.85, 0.85, 1.0 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "recall_passthrough", 0 ], [ "margin", 4 ], [ "click_mode", 1 ], [ "min_rows", 10 ], [ "color_mode", 0 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "fontsize", 13 ], [ "nbslot_edit", 1 ], [ "layout", 0 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "autowriteagain", 0 ] ],
"filename" : "tc.preset.js",
"id" : "obj-10",
"maxclass" : "jsui",
@@ -1575,7 +1979,7 @@
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 10.0, 101.0, 250.0, 87.0 ],
"patching_rect" : [ 10.0, 101.0, 254.0, 87.0 ],
"text" : "Click mode sets the behavior of single clicks. In Select mode, a single click selects a stored preset without recalling it. A double click recalls the preset. It allows to drag it, set its name and lock state while keeping the last recalled preset active."
}
@@ -1913,7 +2317,7 @@
}
,
"classnamespace" : "box",
"rect" : [ 0.0, 26.0, 899.0, 620.0 ],
"rect" : [ 0.0, 26.0, 904.0, 620.0 ],
"bglocked" : 0,
"openinpresentation" : 0,
"default_fontsize" : 12.0,
@@ -2043,7 +2447,7 @@
, {
"box" : {
"border" : 0,
"embedstate" : [ [ "spacing", 4 ], [ "edited_color", 1, 0.49, 0.263, 1 ], [ "recall_passthrough", 1 ], [ "stored_slot_color", 0.458595350062755, 0.458595237564901, 0.458595266962388, 1.0 ], [ "min_rows", 10 ], [ "color_1", 0.743, 0.41, 0.501, 1 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "nbslot_edit", 1 ], [ "send_name", "none" ], [ "layout", 1 ], [ "use_uid", 0 ], [ "timestamp", 0 ], [ "autoname", 0 ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "empty_slot_color", 0.221327066888467, 0.221327006361825, 0.221327022178404, 1.0 ], [ "text_color", 0.85, 0.85, 0.85, 1.0 ], [ "scrollable", 1 ], [ "margin", 4 ], [ "ui_rename", 1 ], [ "fontsize", 13 ], [ "active_slot_color", 0.618934978328545, 0.744701397656435, 0.953750108255376, 1.0 ], [ "bubblesize", 14 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "display_interp", 1 ], [ "poll_edited", 0 ], [ "slot_round", 0 ], [ "fontname", "Arial" ], [ "pattrstorage", "mypat" ], [ "color_mode", 0 ], [ "click_mode", 0 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "menu_mode", 0 ], [ "select_mode", 0 ], [ "ignoreslotzero", 1 ], [ "unique_names", 0 ], [ "bgcolor", 0.125, 0.125, 0.125, 1.0 ], [ "autowriteagain", 0 ], [ "color_3", 0.527, 0.459, 0.756, 1 ] ],
"embedstate" : [ [ "bgcolor", 0.125, 0.125, 0.125, 1.0 ], [ "fontname", "Arial" ], [ "pattrstorage", "mypat" ], [ "interp_mode", 1 ], [ "timestamp", 0 ], [ "stored_slot_color", 0.458595350062755, 0.458595237564901, 0.458595266962388, 1.0 ], [ "edited_color", 1, 0.49, 0.263, 1 ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "menu_mode", 0 ], [ "ignoreslotzero", 1 ], [ "autoname", 0 ], [ "select_mode", 0 ], [ "active_slot_color", 0.618934978328545, 0.744701397656435, 0.953750108255376, 1.0 ], [ "poll_edited", 0 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "spacing", 4 ], [ "unique_names", 0 ], [ "display_interp", 1 ], [ "slot_round", 0 ], [ "empty_slot_color", 0.221327066888467, 0.221327006361825, 0.221327022178404, 1.0 ], [ "ui_rename", 1 ], [ "interp_multi_radius", 1.5 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "send_name", "none" ], [ "use_uid", 0 ], [ "bubblesize", 14 ], [ "scrollable", 1 ], [ "store_passthrough", 1 ], [ "drag_mode", 1 ], [ "color_1", 0.743, 0.41, 0.501, 1 ], [ "text_color", 0.85, 0.85, 0.85, 1.0 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "recall_passthrough", 1 ], [ "margin", 4 ], [ "click_mode", 0 ], [ "min_rows", 10 ], [ "color_mode", 0 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "fontsize", 13 ], [ "nbslot_edit", 1 ], [ "layout", 1 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "autowriteagain", 0 ] ],
"filename" : "tc.preset.js",
"id" : "obj-10",
"maxclass" : "jsui",
@@ -2185,7 +2589,7 @@
, {
"box" : {
"border" : 0,
"embedstate" : [ [ "spacing", 4 ], [ "edited_color", 1, 0.49, 0.263, 1 ], [ "recall_passthrough", 1 ], [ "stored_slot_color", 0.458595350062755, 0.458595237564901, 0.458595266962388, 1.0 ], [ "min_rows", 10 ], [ "color_1", 0.743, 0.41, 0.501, 1 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "nbslot_edit", 1 ], [ "send_name", "none" ], [ "layout", 0 ], [ "use_uid", 0 ], [ "timestamp", 0 ], [ "autoname", 0 ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "empty_slot_color", 0.221327066888467, 0.221327006361825, 0.221327022178404, 1.0 ], [ "text_color", 0.85, 0.85, 0.85, 1.0 ], [ "scrollable", 0 ], [ "margin", 4 ], [ "ui_rename", 0 ], [ "fontsize", 13 ], [ "active_slot_color", 0.618934978328545, 0.744701397656435, 0.953750108255376, 1.0 ], [ "bubblesize", 14 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "display_interp", 1 ], [ "poll_edited", 0 ], [ "slot_round", 0 ], [ "fontname", "Arial" ], [ "pattrstorage", "mypat" ], [ "color_mode", 0 ], [ "click_mode", 0 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "menu_mode", 0 ], [ "select_mode", 0 ], [ "ignoreslotzero", 1 ], [ "unique_names", 0 ], [ "bgcolor", 0.125, 0.125, 0.125, 1.0 ], [ "autowriteagain", 0 ], [ "color_3", 0.527, 0.459, 0.756, 1 ] ],
"embedstate" : [ [ "bgcolor", 0.125, 0.125, 0.125, 1.0 ], [ "fontname", "Arial" ], [ "pattrstorage", "mypat" ], [ "interp_mode", 1 ], [ "timestamp", 0 ], [ "stored_slot_color", 0.458595350062755, 0.458595237564901, 0.458595266962388, 1.0 ], [ "edited_color", 1, 0.49, 0.263, 1 ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "menu_mode", 0 ], [ "ignoreslotzero", 1 ], [ "autoname", 0 ], [ "select_mode", 0 ], [ "active_slot_color", 0.618934978328545, 0.744701397656435, 0.953750108255376, 1.0 ], [ "poll_edited", 0 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "spacing", 4 ], [ "unique_names", 0 ], [ "display_interp", 1 ], [ "slot_round", 0 ], [ "empty_slot_color", 0.221327066888467, 0.221327006361825, 0.221327022178404, 1.0 ], [ "ui_rename", 0 ], [ "interp_multi_radius", 1.5 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "send_name", "none" ], [ "use_uid", 0 ], [ "bubblesize", 14 ], [ "scrollable", 0 ], [ "store_passthrough", 1 ], [ "drag_mode", 1 ], [ "color_1", 0.743, 0.41, 0.501, 1 ], [ "text_color", 0.85, 0.85, 0.85, 1.0 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "recall_passthrough", 1 ], [ "margin", 4 ], [ "click_mode", 0 ], [ "min_rows", 10 ], [ "color_mode", 0 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "fontsize", 13 ], [ "nbslot_edit", 1 ], [ "layout", 0 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "autowriteagain", 0 ] ],
"filename" : "tc.preset.js",
"id" : "obj-2",
"maxclass" : "jsui",
@@ -2820,7 +3224,7 @@
, {
"box" : {
"border" : 0,
"embedstate" : [ [ "spacing", 4 ], [ "edited_color", 1, 0.49, 0.263, 1 ], [ "recall_passthrough", 0 ], [ "stored_slot_color", 0.458595350062755, 0.458595237564901, 0.458595266962388, 1.0 ], [ "min_rows", 10 ], [ "color_1", 0.743, 0.41, 0.501, 1 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "nbslot_edit", 1 ], [ "send_name", "none" ], [ "layout", 0 ], [ "use_uid", 0 ], [ "timestamp", 0 ], [ "autoname", 0 ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "empty_slot_color", 0.221327066888467, 0.221327006361825, 0.221327022178404, 1.0 ], [ "text_color", 0.85, 0.85, 0.85, 1.0 ], [ "scrollable", 0 ], [ "margin", 4 ], [ "ui_rename", 1 ], [ "fontsize", 13 ], [ "active_slot_color", 0.618934978328545, 0.744701397656435, 0.953750108255376, 1.0 ], [ "bubblesize", 14 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "display_interp", 1 ], [ "poll_edited", 0 ], [ "slot_round", 0 ], [ "fontname", "Arial" ], [ "pattrstorage", "mypat" ], [ "color_mode", 0 ], [ "click_mode", 0 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "menu_mode", 0 ], [ "select_mode", 0 ], [ "ignoreslotzero", 1 ], [ "unique_names", 0 ], [ "bgcolor", 0.125, 0.125, 0.125, 1.0 ], [ "autowriteagain", 0 ], [ "color_3", 0.527, 0.459, 0.756, 1 ] ],
"embedstate" : [ [ "bgcolor", 0.125, 0.125, 0.125, 1.0 ], [ "fontname", "Arial" ], [ "pattrstorage", "mypat" ], [ "interp_mode", 1 ], [ "timestamp", 0 ], [ "stored_slot_color", 0.458595350062755, 0.458595237564901, 0.458595266962388, 1.0 ], [ "edited_color", 1, 0.49, 0.263, 1 ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "menu_mode", 0 ], [ "ignoreslotzero", 1 ], [ "autoname", 0 ], [ "select_mode", 0 ], [ "active_slot_color", 0.618934978328545, 0.744701397656435, 0.953750108255376, 1.0 ], [ "poll_edited", 0 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "spacing", 4 ], [ "unique_names", 0 ], [ "display_interp", 1 ], [ "slot_round", 0 ], [ "empty_slot_color", 0.221327066888467, 0.221327006361825, 0.221327022178404, 1.0 ], [ "ui_rename", 1 ], [ "interp_multi_radius", 1.5 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "send_name", "none" ], [ "use_uid", 0 ], [ "bubblesize", 14 ], [ "scrollable", 0 ], [ "store_passthrough", 1 ], [ "drag_mode", 1 ], [ "color_1", 0.743, 0.41, 0.501, 1 ], [ "text_color", 0.85, 0.85, 0.85, 1.0 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "recall_passthrough", 0 ], [ "margin", 4 ], [ "click_mode", 0 ], [ "min_rows", 10 ], [ "color_mode", 0 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "fontsize", 13 ], [ "nbslot_edit", 1 ], [ "layout", 0 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "autowriteagain", 0 ] ],
"filename" : "tc.preset.js",
"id" : "obj-10",
"maxclass" : "jsui",
@@ -2929,7 +3333,7 @@
"lines" : [ ]
}
,
"patching_rect" : [ 687.0, 25.7999267578125, 63.0, 22.0 ],
"patching_rect" : [ 749.0, 27.0, 63.0, 22.0 ],
"saved_object_attributes" : {
"description" : "",
"digest" : "",
@@ -2959,7 +3363,7 @@
}
,
"classnamespace" : "box",
"rect" : [ 0.0, 26.0, 899.0, 620.0 ],
"rect" : [ 0.0, 26.0, 904.0, 620.0 ],
"bglocked" : 0,
"openinpresentation" : 0,
"default_fontsize" : 12.0,
@@ -3119,7 +3523,7 @@
, {
"box" : {
"border" : 0,
"embedstate" : [ [ "spacing", 4 ], [ "edited_color", 1, 0.49, 0.263, 1 ], [ "recall_passthrough", 1 ], [ "stored_slot_color", 0.458595350062755, 0.458595237564901, 0.458595266962388, 1.0 ], [ "min_rows", 10 ], [ "color_1", 0.743, 0.41, 0.501, 1 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "nbslot_edit", 1 ], [ "send_name", "none" ], [ "layout", 1 ], [ "use_uid", 0 ], [ "timestamp", 0 ], [ "autoname", 0 ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "empty_slot_color", 0.221327066888467, 0.221327006361825, 0.221327022178404, 1.0 ], [ "text_color", 0.85, 0.85, 0.85, 1.0 ], [ "scrollable", 1 ], [ "margin", 4 ], [ "ui_rename", 0 ], [ "fontsize", 13 ], [ "active_slot_color", 0.618934978328545, 0.744701397656435, 0.953750108255376, 1.0 ], [ "bubblesize", 14 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "display_interp", 1 ], [ "poll_edited", 0 ], [ "slot_round", 0 ], [ "fontname", "Arial" ], [ "pattrstorage", "tcpreset_help" ], [ "color_mode", 0 ], [ "click_mode", 0 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "menu_mode", 0 ], [ "select_mode", 0 ], [ "ignoreslotzero", 1 ], [ "unique_names", 0 ], [ "bgcolor", 0.125, 0.125, 0.125, 1.0 ], [ "autowriteagain", 0 ], [ "color_3", 0.527, 0.459, 0.756, 1 ] ],
"embedstate" : [ [ "bgcolor", 0.125, 0.125, 0.125, 1.0 ], [ "fontname", "Arial" ], [ "pattrstorage", "tcpreset_help" ], [ "interp_mode", 1 ], [ "timestamp", 0 ], [ "stored_slot_color", 0.458595350062755, 0.458595237564901, 0.458595266962388, 1.0 ], [ "edited_color", 1, 0.49, 0.263, 1 ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "menu_mode", 0 ], [ "ignoreslotzero", 1 ], [ "autoname", 0 ], [ "select_mode", 0 ], [ "active_slot_color", 0.618934978328545, 0.744701397656435, 0.953750108255376, 1.0 ], [ "poll_edited", 0 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "spacing", 4 ], [ "unique_names", 0 ], [ "display_interp", 1 ], [ "slot_round", 0 ], [ "empty_slot_color", 0.221327066888467, 0.221327006361825, 0.221327022178404, 1.0 ], [ "ui_rename", 0 ], [ "interp_multi_radius", 1.5 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "send_name", "none" ], [ "use_uid", 0 ], [ "bubblesize", 14 ], [ "scrollable", 1 ], [ "store_passthrough", 1 ], [ "drag_mode", 1 ], [ "color_1", 0.743, 0.41, 0.501, 1 ], [ "text_color", 0.85, 0.85, 0.85, 1.0 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "recall_passthrough", 1 ], [ "margin", 4 ], [ "click_mode", 0 ], [ "min_rows", 10 ], [ "color_mode", 0 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "fontsize", 13 ], [ "nbslot_edit", 1 ], [ "layout", 1 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "autowriteagain", 0 ] ],
"filename" : "tc.preset.js",
"id" : "obj-10",
"maxclass" : "jsui",
@@ -3414,7 +3818,7 @@
]
}
,
"patching_rect" : [ 468.0, 26.7999267578125, 82.0, 22.0 ],
"patching_rect" : [ 551.0, 27.0, 82.0, 22.0 ],
"saved_object_attributes" : {
"description" : "",
"digest" : "",
@@ -3444,7 +3848,7 @@
}
,
"classnamespace" : "box",
"rect" : [ 0.0, 26.0, 899.0, 620.0 ],
"rect" : [ 0.0, 26.0, 904.0, 620.0 ],
"bglocked" : 0,
"openinpresentation" : 0,
"default_fontsize" : 12.0,
@@ -5085,7 +5489,7 @@
, {
"box" : {
"border" : 0,
"embedstate" : [ [ "spacing", 4 ], [ "edited_color", 1, 0.49, 0.263, 1 ], [ "recall_passthrough", 1 ], [ "stored_slot_color", 0.458595350062755, 0.458595237564901, 0.458595266962388, 1.0 ], [ "min_rows", 10 ], [ "color_1", 0.743, 0.41, 0.501, 1 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "nbslot_edit", 1 ], [ "send_name", "none" ], [ "layout", 0 ], [ "use_uid", 1 ], [ "timestamp", 1 ], [ "autoname", 0 ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "empty_slot_color", 0.221327066888467, 0.221327006361825, 0.221327022178404, 1.0 ], [ "text_color", 0.85, 0.85, 0.85, 1.0 ], [ "scrollable", 0 ], [ "margin", 4 ], [ "ui_rename", 0 ], [ "fontsize", 13 ], [ "active_slot_color", 0.618934978328545, 0.744701397656435, 0.953750108255376, 1.0 ], [ "bubblesize", 14 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "display_interp", 1 ], [ "poll_edited", 0 ], [ "slot_round", 0 ], [ "fontname", "Arial" ], [ "pattrstorage", "colors" ], [ "color_mode", 1 ], [ "click_mode", 0 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "menu_mode", 0 ], [ "select_mode", 0 ], [ "ignoreslotzero", 1 ], [ "unique_names", 0 ], [ "bgcolor", 0.125, 0.125, 0.125, 1.0 ], [ "autowriteagain", 0 ], [ "color_3", 0.527, 0.459, 0.756, 1 ] ],
"embedstate" : [ [ "bgcolor", 0.125, 0.125, 0.125, 1.0 ], [ "fontname", "Arial" ], [ "pattrstorage", "colors" ], [ "interp_mode", 1 ], [ "timestamp", 1 ], [ "stored_slot_color", 0.458595350062755, 0.458595237564901, 0.458595266962388, 1.0 ], [ "edited_color", 1, 0.49, 0.263, 1 ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "menu_mode", 0 ], [ "ignoreslotzero", 1 ], [ "autoname", 0 ], [ "select_mode", 0 ], [ "active_slot_color", 0.618934978328545, 0.744701397656435, 0.953750108255376, 1.0 ], [ "poll_edited", 0 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "spacing", 4 ], [ "unique_names", 0 ], [ "display_interp", 1 ], [ "slot_round", 0 ], [ "empty_slot_color", 0.221327066888467, 0.221327006361825, 0.221327022178404, 1.0 ], [ "ui_rename", 0 ], [ "interp_multi_radius", 1.5 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "send_name", "none" ], [ "use_uid", 1 ], [ "bubblesize", 14 ], [ "scrollable", 0 ], [ "store_passthrough", 1 ], [ "drag_mode", 1 ], [ "color_1", 0.743, 0.41, 0.501, 1 ], [ "text_color", 0.85, 0.85, 0.85, 1.0 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "recall_passthrough", 1 ], [ "margin", 4 ], [ "click_mode", 0 ], [ "min_rows", 10 ], [ "color_mode", 1 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "fontsize", 13 ], [ "nbslot_edit", 1 ], [ "layout", 0 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "autowriteagain", 0 ] ],
"filename" : "tc.preset.js",
"id" : "obj-10",
"maxclass" : "jsui",
@@ -5288,7 +5692,7 @@
]
}
,
"patching_rect" : [ 567.0, 26.7999267578125, 112.0, 22.0 ],
"patching_rect" : [ 635.0, 27.0, 112.0, 22.0 ],
"saved_object_attributes" : {
"description" : "",
"digest" : "",
@@ -5318,7 +5722,7 @@
}
,
"classnamespace" : "box",
"rect" : [ 0.0, 26.0, 899.0, 620.0 ],
"rect" : [ 0.0, 26.0, 904.0, 620.0 ],
"bglocked" : 0,
"openinpresentation" : 0,
"default_fontsize" : 13.0,
@@ -5539,7 +5943,7 @@
, {
"box" : {
"border" : 0,
"embedstate" : [ [ "spacing", 4 ], [ "edited_color", 1, 0.49, 0.263, 1 ], [ "recall_passthrough", 1 ], [ "stored_slot_color", 0.458595350062755, 0.458595237564901, 0.458595266962388, 1.0 ], [ "min_rows", 10 ], [ "color_1", 0.743, 0.41, 0.501, 1 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "nbslot_edit", 1 ], [ "send_name", "none" ], [ "layout", 0 ], [ "use_uid", 0 ], [ "timestamp", 0 ], [ "autoname", 0 ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "empty_slot_color", 0.221327066888467, 0.221327006361825, 0.221327022178404, 1.0 ], [ "text_color", 0.85, 0.85, 0.85, 1.0 ], [ "scrollable", 0 ], [ "margin", 4 ], [ "ui_rename", 0 ], [ "fontsize", 13 ], [ "active_slot_color", 0.618934978328545, 0.744701397656435, 0.953750108255376, 1.0 ], [ "bubblesize", 14 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "display_interp", 1 ], [ "poll_edited", 0 ], [ "slot_round", 0 ], [ "fontname", "Arial" ], [ "pattrstorage", "tcpreset_help" ], [ "color_mode", 0 ], [ "click_mode", 0 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "menu_mode", 0 ], [ "select_mode", 0 ], [ "ignoreslotzero", 1 ], [ "unique_names", 0 ], [ "bgcolor", 0.125, 0.125, 0.125, 1.0 ], [ "autowriteagain", 0 ], [ "color_3", 0.527, 0.459, 0.756, 1 ] ],
"embedstate" : [ [ "bgcolor", 0.125, 0.125, 0.125, 1.0 ], [ "fontname", "Arial" ], [ "pattrstorage", "tcpreset_help" ], [ "interp_mode", 1 ], [ "timestamp", 0 ], [ "stored_slot_color", 0.458595350062755, 0.458595237564901, 0.458595266962388, 1.0 ], [ "edited_color", 1, 0.49, 0.263, 1 ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "menu_mode", 0 ], [ "ignoreslotzero", 1 ], [ "autoname", 0 ], [ "select_mode", 0 ], [ "active_slot_color", 0.618934978328545, 0.744701397656435, 0.953750108255376, 1.0 ], [ "poll_edited", 0 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "spacing", 4 ], [ "unique_names", 0 ], [ "display_interp", 1 ], [ "slot_round", 0 ], [ "empty_slot_color", 0.221327066888467, 0.221327006361825, 0.221327022178404, 1.0 ], [ "ui_rename", 0 ], [ "interp_multi_radius", 1.5 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "send_name", "none" ], [ "use_uid", 0 ], [ "bubblesize", 14 ], [ "scrollable", 0 ], [ "store_passthrough", 1 ], [ "drag_mode", 1 ], [ "color_1", 0.743, 0.41, 0.501, 1 ], [ "text_color", 0.85, 0.85, 0.85, 1.0 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "recall_passthrough", 1 ], [ "margin", 4 ], [ "click_mode", 0 ], [ "min_rows", 10 ], [ "color_mode", 0 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "fontsize", 13 ], [ "nbslot_edit", 1 ], [ "layout", 0 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "autowriteagain", 0 ] ],
"filename" : "tc.preset.js",
"id" : "obj-10",
"maxclass" : "jsui",

File diff suppressed because it is too large Load Diff

View File

@@ -79,10 +79,10 @@ var scrollable = 0; // Defines weither the object can be scrolled or not
var min_rows = 10; // Minimum number of rows to display if scrollable is enabled
var color_mode = 0; // Change the way the filled slots (stored presets) color is handeld. 0: stored_slot_color. 1: looping through color_1 to color_6. 2: Freely assign colors 1 to 6. 3: Set any color to any preset
var select_mode = 0; // 0: single click to select and recall the slot. 1: single click to select the slot, double click to recall it.
var click_mode = 0; // Sets the behavior of single clicks. 0: normal (recall), 1: select, 2: store, 3: delete
var drag_mode = 1; // Sets the behavior of drag operations. 0: disabled, 1: move preset (default), 2: in-line interpolation, 3: zone interpolation
var drag_interp_radius = 1; // In use with drag_mode 3
var interp_rolloff = 6;
var click_mode = 0; // Set the behavior of single clicks. 0: normal (recall), 1: select, 2: store, 3: delete
var drag_mode = 1; // Set the behavior of drag operations. 0: disabled, 1: move preset (default), 2: Interp (see interp_mode)
var interp_mode = 1; // Set interpolation behavior when dragging. 0: off, 1: in-line interpolation, 2: multi interpolation
var interp_multi_radius = 1.5; // In use with drag_mode 3
var send_name = "none"; // The global name to send presets dict name to (received by the [receive] object)
var unique_names = false; // When enabled, force names to be unique when renaming slots by appending "bis" to them. Gets applied only to subsequently renamed presets.
var autoname = false; // Automatically name new presets when created as "Preset" followed by the slot id
@@ -584,7 +584,7 @@ function paint()
// }
// Hovered slot
if ((last_hovered > -1) && ((drag_mode < 2) || (drag_mode >= 2 && !is_dragging))) {
if ((last_hovered > -1) && !is_dragging) {
// Slot border
if (slots[last_hovered].filled === false || (slots[last_hovered].filled === true && !control_hold)) {
@@ -1195,9 +1195,6 @@ function recallmulti() {
active_slot_edited = 0;
run_edited_poll_task();
mgraphics.redraw();
outlet(0, "recallmulti", args);
}
function store(v) {
@@ -1871,146 +1868,140 @@ ondblclick.local = 1;
function ondrag(x,y,but,cmd,shift,capslock,option,ctrl)
{
if (pattrstorage_name != null) {
y -= y_offset;
if (drag_mode === 1) {
if (is_dragging === 0 && last_hovered > 0 && slots[last_hovered].filled === true) {
// To prevent mistakes, is_dragging is set to 1 only when dragging for more than 10 pixels
var dist_from_start = Math.sqrt((x-last_x)*(x-last_x)+(y-last_y)*(y-last_y));
if (dist_from_start > 10) {
is_dragging = 1;
drag_slot = last_hovered;
paint_base(); // We repaint the base with the dragged slot removed from the grid
}
} else if (is_dragging == 1) {
last_hovered = get_slot_index(x, y);
last_hovered_is_preset_slot = scrollable && nbslot_edit && last_hovered > (true_slots_count_display - 2) ? false : true;
if (!last_hovered_is_preset_slot) {
last_hovered = 0;
}
if (!but) {
// When the button is released, the dragging ceases
if (last_hovered > 0 && last_hovered != drag_slot && last_hovered_is_preset_slot) {
move(drag_slot, last_hovered);
} else {
// Drag released but not somewhere we can throw a slot in
is_dragging = 0;
drag_slot = -1;
paint_base();
y -= y_offset;
if (drag_mode > 0 && !cmd && !shift && !ctrl) {
switch (is_dragging) {
case 0: // Not dragging yet
var dist_from_start = Math.sqrt((x - last_x) * (x - last_x) + (y - last_y) * (y - last_y));
if ((drag_mode === 1 && !option) || (drag_mode === 2 && option)) {
if (last_hovered > 0 && slots[last_hovered].filled === true && ((drag_mode === 1 && !option) || (drag_mode === 2 && option))) {
// To prevent mistakes, is_dragging is set to 1 only when dragging for more than 10 pixels
if (dist_from_start > 10) {
is_dragging = 1;
drag_slot = last_hovered;
paint_base(); // We repaint the base with the dragged slot removed from the grid
}
}
} else if (interp_mode > 0 && ((drag_mode === 2 && !option) || (drag_mode === 1 && option))) {
if (dist_from_start > 3) {
is_dragging = 2;
}
}
} else {
// Click still hold, we keep dragging
if (scrollable) {
// Auto-scroll if mouse out of bounds
if (y+y_offset < 0 && y-(last_y-drag_scroll) < 0) {
drag_scroll = 2;
} else if (y+y_offset > ui_height && y-(last_y-drag_scroll) > 0) {
drag_scroll = -2;
break;
case 1: // Moving preset
last_hovered = get_slot_index(x, y);
last_hovered_is_preset_slot = scrollable && nbslot_edit && last_hovered > (true_slots_count_display - 2) ? false : true;
if (!last_hovered_is_preset_slot) {
last_hovered = 0;
}
if (!but) {
// When the button is released, the dragging ceases
if (last_hovered > 0 && last_hovered != drag_slot && last_hovered_is_preset_slot) {
move(drag_slot, last_hovered);
} else {
drag_scroll = 0;
// Drag released but not somewhere we can throw a slot in
is_dragging = 0;
drag_slot = -1;
paint_base();
}
y_offset += drag_scroll;
y_offset = Math.min(y_offset, 0);
y_offset = Math.max(y_offset, -1 * (bg_height - ui_height));
} else {
// Click still hold, we keep dragging
if (scrollable) {
// Auto-scroll if mouse out of bounds
if (y + y_offset < 0 && y - (last_y - drag_scroll) < 0) {
drag_scroll = 2;
} else if (y + y_offset > ui_height && y - (last_y - drag_scroll) > 0) {
drag_scroll = -2;
} else {
drag_scroll = 0;
}
y_offset += drag_scroll;
y_offset = Math.min(y_offset, 0);
y_offset = Math.max(y_offset, -1 * (bg_height - ui_height));
}
mgraphics.redraw();
}
mgraphics.redraw();
}
last_x = x;
last_y = y;
}
} else if (drag_mode === 2) {
// Drag to interpolate across adjacent (previous and next) presets
if (is_dragging == 0) {
var dist_from_start = Math.sqrt((x-last_x)*(x-last_x)+(y-last_y)*(y-last_y));
if (dist_from_start > 3) {
is_dragging = 2;
}
}
// last_hovered retains the slot where the drag began
if (is_dragging === 2 && last_hovered > -1) {
var relative_dist_from_start =
layout === 0 ? (x - slots[last_hovered].center.x) / (slot_size + spacing) :
(y - slots[last_hovered].center.y) / (slot_size + spacing);
var current_slot = Math.max(Math.round(last_hovered - 0.5 + relative_dist_from_start), 1);
var prev_filled_slot = -1;
var next_filled_slot = -1;
for (var i = 0; i < filled_slots.length; i++) {
var p = filled_slots[i];
if (p <= current_slot) {
if (prev_filled_slot === -1 || p > prev_filled_slot) {
prev_filled_slot = p;
last_x = x;
last_y = y;
break;
case 2: // Interpolating
if (interp_mode === 1) {
var relative_dist_from_start =
layout === 0 ? (x - slots[last_hovered].center.x) / (slot_size + spacing) :
(y - slots[last_hovered].center.y) / (slot_size + spacing);
var current_slot = Math.max(Math.round(last_hovered - 0.5 + relative_dist_from_start), 1);
var prev_filled_slot = -1;
var next_filled_slot = -1;
for (var i = 0; i < filled_slots.length; i++) {
var p = filled_slots[i];
if (p <= current_slot) {
if (prev_filled_slot === -1 || p > prev_filled_slot) {
prev_filled_slot = p;
}
} else if (p > current_slot) {
if (next_filled_slot === -1 || p < next_filled_slot) {
next_filled_slot = p;
}
}
}
} else if (p > current_slot) {
if (next_filled_slot === -1 || p < next_filled_slot) {
next_filled_slot = p;
var interp_amount = 0;
if (prev_filled_slot === -1) {
prev_filled_slot = next_filled_slot;
interp_amount = 1;
} else if (next_filled_slot === -1) {
next_filled_slot = prev_filled_slot;
interp_amount = 1;
} else if (prev_filled_slot > 0 && next_filled_slot > 0) {
interp_amount = (last_hovered + relative_dist_from_start - prev_filled_slot) / (next_filled_slot - prev_filled_slot);
interp_amount = Math.min(interp_amount, Math.max(interp_amount, 0), 1);
}
if (prev_filled_slot !== -1 || next_filled_slot !== -1) {
if (recall_passthrough) {
to_pattrstorage("recall", prev_filled_slot, next_filled_slot, interp_amount);
} else {
outlet(0, "recall", prev_filled_slot, next_filled_slot, interp_amount);
}
}
last_x = x;
last_y = y;
if (!but) {
is_dragging = 0;
}
} else if (interp_mode === 2) {
var nearby_slots = [];
var accum = 0;
for (var i = 0; i < filled_slots.length; i++) {
// Interpolating only through displayed slots;
if (filled_slots[i] <= slots_count_display) {
var s_pos = slots[filled_slots[i]].center;
var dist_from_mouse = Math.sqrt((x - s_pos.x) * (x - s_pos.x) + (y - s_pos.y) * (y - s_pos.y)) / (slot_size + spacing);
var interp_factor = Math.exp(-Math.pow(dist_from_mouse / (0.5 * interp_multi_radius), 2));
if (interp_factor > 0.01) {
nearby_slots.push([filled_slots[i], interp_factor]);
accum += interp_factor;
}
}
}
for (var i = 0; i < nearby_slots.length; i++) {
nearby_slots[i] = nearby_slots[i][0] + Math.min(nearby_slots[i][1] / accum, 0.99);
}
if (nearby_slots.length) {
var args = ["recallmulti"].concat(nearby_slots);
// .apply(nul, args): ES5 notation for spread operator ...args
if (recall_passthrough) {
to_pattrstorage.apply(null, args);
recallmulti.apply(null, nearby_slots);
}
outlet(0, args);
}
last_x = x;
last_y = y;
if (!but) {
is_dragging = 0;
}
}
}
var interp_amount = 0;
if (prev_filled_slot === -1) {
prev_filled_slot = next_filled_slot;
interp_amount = 1;
} else if (next_filled_slot === -1) {
next_filled_slot = prev_filled_slot;
interp_amount = 1;
} else if (prev_filled_slot > 0 && next_filled_slot > 0) {
interp_amount = (last_hovered + relative_dist_from_start - prev_filled_slot) / (next_filled_slot - prev_filled_slot);
interp_amount = Math.min(interp_amount, Math.max(interp_amount, 0), 1);
}
if (prev_filled_slot !== -1 || next_filled_slot !== -1) {
to_pattrstorage("recall", prev_filled_slot, next_filled_slot, interp_amount);
}
last_x = x;
last_y = y;
if (!but) {
is_dragging = 0;
}
}
} else if (drag_mode === 3) {
// Drag to interpolate across adjacent (previous and next) presets
if (is_dragging == 0) {
var dist_from_start = Math.sqrt((x-last_x)*(x-last_x)+(y-last_y)*(y-last_y));
if (dist_from_start > 3) {
is_dragging = 3;
}
}
// last_hovered retains the slot where the drag began
if (is_dragging === 3 && last_hovered > -1) {
var nearby_slots = [];
var max_dist = 0;
var pow = interp_rolloff / (20 * Math.log(2) / Math.log(10));
var accum = 0;
for (var i = 0; i < filled_slots.length; i++) {
// Interpolating only through displayed slots;
if (filled_slots[i] <= slots_count_display) {
var s_pos = slots[filled_slots[i]].center;
var dist_from_mouse = Math.sqrt((x - s_pos.x) * (x - s_pos.x) + (y - s_pos.y) * (y - s_pos.y)) / (slot_size + spacing);
if (dist_from_mouse < drag_interp_radius) {
var interp_factor = 1 / Math.pow(dist_from_mouse + 0.00001, pow);
nearby_slots.push([filled_slots[i], interp_factor]);
accum += Math.pow(interp_factor, 2);
// var interp_factor = Math.min(Math.pow(((dist_from_mouse / drag_interp_radius) - 1), 4), 0.9999999);
// nearby_slots.push(filled_slots[i] + interp_factor);
// if (max_dist < dist_from_mouse) max_dist = dist_from_mouse;
}
}
}
accum = 1 / Math.sqrt(accum);
for (var i = 0; i < nearby_slots.length; i++) {
nearby_slots[i] = nearby_slots[i][0] + Math.min(nearby_slots[i][1] * accum, 0.9999999);
}
if (nearby_slots.length) {
var args = ["recallmulti"].concat(nearby_slots);
// .apply(nul, args): ES5 notation for spread operator ...args
to_pattrstorage.apply(null, args);
recallmulti.apply(null, nearby_slots);
}
last_x = x;
last_y = y;
if (!but) {
is_dragging = 0;
}
break;
}
}
}
@@ -2369,9 +2360,11 @@ function setselect_mode(v) {
}
setselect_mode.local = 1;
declareattribute("drag_mode", null, null, 1, { style: "enumindex", enumvals: ["Disabled", "Move", "In-Line Interp", "Interp"], default: 1, label: "Drag Mode", paint: 1 });
declareattribute("drag_mode", null, null, 1, { style: "enumindex", enumvals: ["Disabled", "Move", "Interpolate"], default: 1, label: "Drag Mode", paint: 1 });
declareattribute("drag_interp_radius", null, null, 1, { type: "float", min: 1, default: 1, label: "Drag Interpolation Radius" });
declareattribute("interp_mode", null, null, 1, { style: "enumindex", enumvals: ["Disabled", "In-Line Interp", "Multi Interp"], default: 1, label: "Drag Mode"});
declareattribute("interp_multi_radius", null, null, 1, { type: "float", min: 1, default: 1.5, label: "Interp Multi Radius" });
declareattribute("color_mode", null, "setcolor_mode", 1, {type: "long", min: 0, max: 3, style: "enumindex", enumvals: ["Classic", "Cycle", "Select", "Custom"], label: "Color Mode", category: "Appearance"});
function setcolor_mode(v){