8 Commits

Author SHA1 Message Date
ac39f1ac4d update readme 2026-07-15 21:27:08 +02:00
7146d26a57 helpfile update 2026-07-15 20:23:27 +02:00
074c23523d bring back bubble when moving slot 2026-07-15 20:14:25 +02:00
514f6fd417 reworked interactions with a "modifier" state; click interactions still
possible when drag_mode enabled; display a cross when about to delete
2026-07-15 20:11:59 +02:00
1cf0d247f3 Add more presets to helpfile 2026-07-15 19:06:27 +02:00
3b10eef0c8 version bump; fix error in in-line interp mode 2026-07-14 16:40:30 +02:00
e5d871456e add interp_mode, change drag_mode behavior, add option hold to switch
between drag modes, change interp multi for gaussian distribution, doc
update
2026-07-14 16:34:04 +02:00
08f97d61de dbap interp rolloff algo 2026-07-13 16:45:19 +02:00
8 changed files with 1297 additions and 362 deletions

View File

@@ -5,7 +5,8 @@ A [jsui]/[v8ui] replacement for the [preset] object in Cycling'74 Max.
## Features ## Features
- Same click + modifier key behavior as the preset object to store and delete presets - Same click + modifier key behavior as the preset object to store and delete presets
- \+ Additional interactions (control+click to rename, shift+control+click to lock/unlock) - \+ Additional interactions (control+click to rename, shift+control+click to lock/unlock)
- Drag and drop presets to re-organize - Drag modes : Drag and drop presets to re-organize, or drag through presets to interpolate
- Click modes: set the behavior of single clicks: recall, select without recall, store, delete
- Display presets as a grid or a list - Display presets as a grid or a list
- Scrollable list layout (requires Max 8.6.2) - Scrollable list layout (requires Max 8.6.2)
- Shows active preset even if recalled directly from pattrstorage - Shows active preset even if recalled directly from pattrstorage
@@ -23,7 +24,7 @@ A [jsui]/[v8ui] replacement for the [preset] object in Cycling'74 Max.
- Color mode: various ways to colorize preset slots - Color mode: various ways to colorize preset slots
- UID: generate unique identifiers for each preset so you can "follow" them when they're moved, renamed or re-saved. Practical in case of advanced preset management - UID: generate unique identifiers for each preset so you can "follow" them when they're moved, renamed or re-saved. Practical in case of advanced preset management
- Timestamps: automatically save a 'created' and 'modified' date for each preset - Timestamps: automatically save a 'created' and 'modified' date for each preset
- Click mode: set the behavior of single clicks: recall, select without recall, store, delete
...and more! ...and more!
## How to install ## How to install

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. <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> Notice that the recallmutli message needs to be sent both the pattrstorage and the jsui.</description>
</attribute> </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' > <attribute name='edited_color' get='1' set='1' type='list' size='4' >
<digest>Edited Dot Color</digest> <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> <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> <digest>Empty slot color</digest>
<description>Sets the empty slot color of the object in RGBA format</description> <description>Sets the empty slot color of the object in RGBA format</description>
</attribute> </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' > <attribute name='layout' get='1' set='1' type='int' size='1' >
<digest>How presets are displayed</digest> <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> <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>
<attribute name='recall_passthrough' get='1' set='1' type='bool' size='1' > <attribute name='recall_passthrough' get='1' set='1' type='bool' size='1' >
<digest>Send recall messages to pattrstorage directly</digest> <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>
<attribute name='scrollable' get='1' set='1' type='bool' size='1' > <attribute name='scrollable' get='1' set='1' type='bool' size='1' >
<digest>Scroll through your presets</digest> <digest>Scroll through your presets</digest>

View File

@@ -10,7 +10,7 @@
} }
, ,
"classnamespace" : "box", "classnamespace" : "box",
"rect" : [ 344.0, 246.0, 899.0, 646.0 ], "rect" : [ 344.0, 246.0, 904.0, 646.0 ],
"bglocked" : 0, "bglocked" : 0,
"openinpresentation" : 0, "openinpresentation" : 0,
"default_fontsize" : 12.0, "default_fontsize" : 12.0,
@@ -42,6 +42,411 @@
"assistshowspatchername" : 0, "assistshowspatchername" : 0,
"integercoordinates" : 1, "integercoordinates" : 1,
"boxes" : [ { "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 ],
"text" : "recall 1 1 0"
}
}
, {
"box" : {
"id" : "obj-38",
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 3,
"outlettype" : [ "", "", "" ],
"patching_rect" : [ 286.0, 378.0, 40.0, 22.0 ],
"restore" : [ -0.714285714285714, -0.714285714285714, -0.6, -0.542857142857143, -0.457142857142857, -0.342857142857143, -0.171428571428571, -0.028571428571429, 0.028571428571428, 0.142857142857143, 0.228571428571429, 0.371428571428571, 0.485714285714286, 0.571428571428571, 0.714285714285714, 0.8 ],
"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" : [ [ "pattrstorage", "tcpreset_help" ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "autoname", 0 ], [ "scrollable", 0 ], [ "select_mode", 0 ], [ "poll_edited", 0 ], [ "text_color", 0.85, 0.85, 0.85, 1 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "bubblesize", 32 ], [ "unique_names", 0 ], [ "spacing", 4 ], [ "click_mode", 0 ], [ "drag_mode", 2 ], [ "ui_rename", 0 ], [ "interp_multi_radius", 2 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "autowriteagain", 0 ], [ "send_name", "none" ], [ "use_uid", 0 ], [ "layout", 0 ], [ "store_passthrough", 1 ], [ "stored_slot_color", 0.458595350062755, 0.458595237564901, 0.458595266962388, 1 ], [ "min_rows", 10 ], [ "color_1", 0.743, 0.41, 0.501, 1 ], [ "menu_mode", 0 ], [ "bgcolor", 0.125, 0.125, 0.125, 1 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "ignoreslotzero", 0 ], [ "recall_passthrough", 1 ], [ "active_slot_color", 0.618934978328545, 0.744701397656435, 0.953750108255376, 1 ], [ "timestamp", 0 ], [ "color_mode", 0 ], [ "margin", 4 ], [ "nbslot_edit", 1 ], [ "fontsize", 13 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "display_interp", 1 ], [ "slot_round", 0 ], [ "empty_slot_color", 0.221327066888467, 0.221327006361825, 0.221327022178404, 1 ], [ "interp_mode", 2 ], [ "edited_color", 1, 0.49, 0.263, 1 ], [ "fontname", "Arial" ] ],
"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" : { "box" : {
"id" : "obj-19", "id" : "obj-19",
"maxclass" : "newobj", "maxclass" : "newobj",
@@ -58,7 +463,7 @@
} }
, ,
"classnamespace" : "box", "classnamespace" : "box",
"rect" : [ 0.0, 26.0, 899.0, 620.0 ], "rect" : [ 0.0, 26.0, 904.0, 620.0 ],
"bglocked" : 0, "bglocked" : 0,
"openinpresentation" : 0, "openinpresentation" : 0,
"default_fontsize" : 12.0, "default_fontsize" : 12.0,
@@ -92,7 +497,7 @@
"lines" : [ ] "lines" : [ ]
} }
, ,
"patching_rect" : [ 756.0, 25.7999267578125, 50.0, 22.0 ], "patching_rect" : [ 816.0, 27.0, 50.0, 22.0 ],
"saved_object_attributes" : { "saved_object_attributes" : {
"description" : "", "description" : "",
"digest" : "", "digest" : "",
@@ -139,7 +544,7 @@
} }
, ,
"classnamespace" : "box", "classnamespace" : "box",
"rect" : [ 0.0, 26.0, 899.0, 620.0 ], "rect" : [ 0.0, 26.0, 904.0, 620.0 ],
"bglocked" : 0, "bglocked" : 0,
"openinpresentation" : 0, "openinpresentation" : 0,
"default_fontsize" : 12.0, "default_fontsize" : 12.0,
@@ -612,7 +1017,7 @@
, { , {
"box" : { "box" : {
"id" : "obj-17", "id" : "obj-17",
"items" : [ 1, "up", ",", 2, "down", ",", 3, "sine", ",", 4, "random", ",", 7, "W", ",", 17, "Bell" ], "items" : [ 1, "up", ",", 2, "down", ",", 3, "sine", ",", 4, "random", ",", 5, "center", ",", 7, "W", ",", 8, "mount", ",", 9, "alternate", ",", 12, "down_up", ",", 13, "up_down", ",", 17, "Bell" ],
"maxclass" : "umenu", "maxclass" : "umenu",
"numinlets" : 1, "numinlets" : 1,
"numoutlets" : 3, "numoutlets" : 3,
@@ -666,7 +1071,7 @@
, { , {
"box" : { "box" : {
"border" : 0, "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" : [ [ "pattrstorage", "tcpreset_help" ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "autoname", 0 ], [ "scrollable", 0 ], [ "select_mode", 0 ], [ "poll_edited", 0 ], [ "text_color", 0.85, 0.85, 0.85, 1.0 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "bubblesize", 14 ], [ "unique_names", 0 ], [ "spacing", 4 ], [ "click_mode", 0 ], [ "drag_mode", 1 ], [ "ui_rename", 0 ], [ "interp_multi_radius", 1.5 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "autowriteagain", 0 ], [ "send_name", "none" ], [ "use_uid", 0 ], [ "layout", 0 ], [ "store_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 ], [ "menu_mode", 0 ], [ "bgcolor", 0.125, 0.125, 0.125, 1.0 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "ignoreslotzero", 1 ], [ "recall_passthrough", 1 ], [ "active_slot_color", 0.618934978328545, 0.744701397656435, 0.953750108255376, 1.0 ], [ "timestamp", 0 ], [ "color_mode", 0 ], [ "margin", 4 ], [ "nbslot_edit", 1 ], [ "fontsize", 13 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "display_interp", 1 ], [ "slot_round", 0 ], [ "empty_slot_color", 0.221327066888467, 0.221327006361825, 0.221327022178404, 1.0 ], [ "interp_mode", 1 ], [ "edited_color", 1, 0.49, 0.263, 1 ], [ "fontname", "Arial" ] ],
"filename" : "tc.preset.js", "filename" : "tc.preset.js",
"id" : "obj-10", "id" : "obj-10",
"maxclass" : "jsui", "maxclass" : "jsui",
@@ -952,7 +1357,7 @@
} }
, ,
"classnamespace" : "box", "classnamespace" : "box",
"rect" : [ 344.0, 272.0, 899.0, 620.0 ], "rect" : [ 0.0, 26.0, 904.0, 620.0 ],
"bglocked" : 0, "bglocked" : 0,
"openinpresentation" : 0, "openinpresentation" : 0,
"default_fontsize" : 12.0, "default_fontsize" : 12.0,
@@ -1507,7 +1912,7 @@
, { , {
"box" : { "box" : {
"id" : "obj-17", "id" : "obj-17",
"items" : [ 1, "up", ",", 2, "down", ",", 3, "sine", ",", 4, "random", ",", 7, "W", ",", 17, "Bell" ], "items" : [ 1, "up", ",", 2, "down", ",", 3, "sine", ",", 4, "random", ",", 5, "center", ",", 7, "W", ",", 8, "mount", ",", 9, "alternate", ",", 12, "down_up", ",", 13, "up_down", ",", 17, "Bell" ],
"maxclass" : "umenu", "maxclass" : "umenu",
"numinlets" : 1, "numinlets" : 1,
"numoutlets" : 3, "numoutlets" : 3,
@@ -1520,7 +1925,7 @@
, { , {
"box" : { "box" : {
"border" : 0, "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" : [ [ "pattrstorage", "tcpreset_help" ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "autoname", 0 ], [ "scrollable", 0 ], [ "select_mode", 0 ], [ "poll_edited", 1 ], [ "text_color", 0.85, 0.85, 0.85, 1.0 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "bubblesize", 14 ], [ "unique_names", 0 ], [ "spacing", 4 ], [ "click_mode", 1 ], [ "drag_mode", 1 ], [ "ui_rename", 1 ], [ "interp_multi_radius", 1.5 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "autowriteagain", 0 ], [ "send_name", "none" ], [ "use_uid", 0 ], [ "layout", 0 ], [ "store_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 ], [ "menu_mode", 0 ], [ "bgcolor", 0.125, 0.125, 0.125, 1.0 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "ignoreslotzero", 1 ], [ "recall_passthrough", 0 ], [ "active_slot_color", 0.618934978328545, 0.744701397656435, 0.953750108255376, 1.0 ], [ "timestamp", 0 ], [ "color_mode", 0 ], [ "margin", 4 ], [ "nbslot_edit", 1 ], [ "fontsize", 13 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "display_interp", 1 ], [ "slot_round", 0 ], [ "empty_slot_color", 0.221327066888467, 0.221327006361825, 0.221327022178404, 1.0 ], [ "interp_mode", 1 ], [ "edited_color", 1, 0.49, 0.263, 1 ], [ "fontname", "Arial" ] ],
"filename" : "tc.preset.js", "filename" : "tc.preset.js",
"id" : "obj-10", "id" : "obj-10",
"maxclass" : "jsui", "maxclass" : "jsui",
@@ -1575,7 +1980,7 @@
"maxclass" : "comment", "maxclass" : "comment",
"numinlets" : 1, "numinlets" : 1,
"numoutlets" : 0, "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." "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 +2318,7 @@
} }
, ,
"classnamespace" : "box", "classnamespace" : "box",
"rect" : [ 0.0, 26.0, 899.0, 620.0 ], "rect" : [ 0.0, 26.0, 904.0, 620.0 ],
"bglocked" : 0, "bglocked" : 0,
"openinpresentation" : 0, "openinpresentation" : 0,
"default_fontsize" : 12.0, "default_fontsize" : 12.0,
@@ -2043,7 +2448,7 @@
, { , {
"box" : { "box" : {
"border" : 0, "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" : [ [ "pattrstorage", "mypat" ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "autoname", 0 ], [ "scrollable", 1 ], [ "select_mode", 0 ], [ "poll_edited", 0 ], [ "text_color", 0.85, 0.85, 0.85, 1.0 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "bubblesize", 14 ], [ "unique_names", 0 ], [ "spacing", 4 ], [ "click_mode", 0 ], [ "drag_mode", 1 ], [ "ui_rename", 1 ], [ "interp_multi_radius", 1.5 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "autowriteagain", 0 ], [ "send_name", "none" ], [ "use_uid", 0 ], [ "layout", 1 ], [ "store_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 ], [ "menu_mode", 0 ], [ "bgcolor", 0.125, 0.125, 0.125, 1.0 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "ignoreslotzero", 1 ], [ "recall_passthrough", 1 ], [ "active_slot_color", 0.618934978328545, 0.744701397656435, 0.953750108255376, 1.0 ], [ "timestamp", 0 ], [ "color_mode", 0 ], [ "margin", 4 ], [ "nbslot_edit", 1 ], [ "fontsize", 13 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "display_interp", 1 ], [ "slot_round", 0 ], [ "empty_slot_color", 0.221327066888467, 0.221327006361825, 0.221327022178404, 1.0 ], [ "interp_mode", 1 ], [ "edited_color", 1, 0.49, 0.263, 1 ], [ "fontname", "Arial" ] ],
"filename" : "tc.preset.js", "filename" : "tc.preset.js",
"id" : "obj-10", "id" : "obj-10",
"maxclass" : "jsui", "maxclass" : "jsui",
@@ -2185,7 +2590,7 @@
, { , {
"box" : { "box" : {
"border" : 0, "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" : [ [ "pattrstorage", "mypat" ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "autoname", 0 ], [ "scrollable", 0 ], [ "select_mode", 0 ], [ "poll_edited", 0 ], [ "text_color", 0.85, 0.85, 0.85, 1.0 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "bubblesize", 14 ], [ "unique_names", 0 ], [ "spacing", 4 ], [ "click_mode", 0 ], [ "drag_mode", 1 ], [ "ui_rename", 0 ], [ "interp_multi_radius", 1.5 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "autowriteagain", 0 ], [ "send_name", "none" ], [ "use_uid", 0 ], [ "layout", 0 ], [ "store_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 ], [ "menu_mode", 0 ], [ "bgcolor", 0.125, 0.125, 0.125, 1.0 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "ignoreslotzero", 1 ], [ "recall_passthrough", 1 ], [ "active_slot_color", 0.618934978328545, 0.744701397656435, 0.953750108255376, 1.0 ], [ "timestamp", 0 ], [ "color_mode", 0 ], [ "margin", 4 ], [ "nbslot_edit", 1 ], [ "fontsize", 13 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "display_interp", 1 ], [ "slot_round", 0 ], [ "empty_slot_color", 0.221327066888467, 0.221327006361825, 0.221327022178404, 1.0 ], [ "interp_mode", 1 ], [ "edited_color", 1, 0.49, 0.263, 1 ], [ "fontname", "Arial" ] ],
"filename" : "tc.preset.js", "filename" : "tc.preset.js",
"id" : "obj-2", "id" : "obj-2",
"maxclass" : "jsui", "maxclass" : "jsui",
@@ -2820,7 +3225,7 @@
, { , {
"box" : { "box" : {
"border" : 0, "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" : [ [ "pattrstorage", "mypat" ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "autoname", 0 ], [ "scrollable", 0 ], [ "select_mode", 0 ], [ "poll_edited", 0 ], [ "text_color", 0.85, 0.85, 0.85, 1.0 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "bubblesize", 14 ], [ "unique_names", 0 ], [ "spacing", 4 ], [ "click_mode", 0 ], [ "drag_mode", 1 ], [ "ui_rename", 1 ], [ "interp_multi_radius", 1.5 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "autowriteagain", 0 ], [ "send_name", "none" ], [ "use_uid", 0 ], [ "layout", 0 ], [ "store_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 ], [ "menu_mode", 0 ], [ "bgcolor", 0.125, 0.125, 0.125, 1.0 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "ignoreslotzero", 1 ], [ "recall_passthrough", 0 ], [ "active_slot_color", 0.618934978328545, 0.744701397656435, 0.953750108255376, 1.0 ], [ "timestamp", 0 ], [ "color_mode", 0 ], [ "margin", 4 ], [ "nbslot_edit", 1 ], [ "fontsize", 13 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "display_interp", 1 ], [ "slot_round", 0 ], [ "empty_slot_color", 0.221327066888467, 0.221327006361825, 0.221327022178404, 1.0 ], [ "interp_mode", 1 ], [ "edited_color", 1, 0.49, 0.263, 1 ], [ "fontname", "Arial" ] ],
"filename" : "tc.preset.js", "filename" : "tc.preset.js",
"id" : "obj-10", "id" : "obj-10",
"maxclass" : "jsui", "maxclass" : "jsui",
@@ -2929,7 +3334,7 @@
"lines" : [ ] "lines" : [ ]
} }
, ,
"patching_rect" : [ 687.0, 25.7999267578125, 63.0, 22.0 ], "patching_rect" : [ 749.0, 27.0, 63.0, 22.0 ],
"saved_object_attributes" : { "saved_object_attributes" : {
"description" : "", "description" : "",
"digest" : "", "digest" : "",
@@ -2959,7 +3364,7 @@
} }
, ,
"classnamespace" : "box", "classnamespace" : "box",
"rect" : [ 0.0, 26.0, 899.0, 620.0 ], "rect" : [ 0.0, 26.0, 904.0, 620.0 ],
"bglocked" : 0, "bglocked" : 0,
"openinpresentation" : 0, "openinpresentation" : 0,
"default_fontsize" : 12.0, "default_fontsize" : 12.0,
@@ -3119,7 +3524,7 @@
, { , {
"box" : { "box" : {
"border" : 0, "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" : [ [ "pattrstorage", "tcpreset_help" ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "autoname", 0 ], [ "scrollable", 1 ], [ "select_mode", 0 ], [ "poll_edited", 0 ], [ "text_color", 0.85, 0.85, 0.85, 1.0 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "bubblesize", 14 ], [ "unique_names", 0 ], [ "spacing", 4 ], [ "click_mode", 0 ], [ "drag_mode", 1 ], [ "ui_rename", 0 ], [ "interp_multi_radius", 1.5 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "autowriteagain", 0 ], [ "send_name", "none" ], [ "use_uid", 0 ], [ "layout", 1 ], [ "store_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 ], [ "menu_mode", 0 ], [ "bgcolor", 0.125, 0.125, 0.125, 1.0 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "ignoreslotzero", 1 ], [ "recall_passthrough", 1 ], [ "active_slot_color", 0.618934978328545, 0.744701397656435, 0.953750108255376, 1.0 ], [ "timestamp", 0 ], [ "color_mode", 0 ], [ "margin", 4 ], [ "nbslot_edit", 1 ], [ "fontsize", 13 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "display_interp", 1 ], [ "slot_round", 0 ], [ "empty_slot_color", 0.221327066888467, 0.221327006361825, 0.221327022178404, 1.0 ], [ "interp_mode", 1 ], [ "edited_color", 1, 0.49, 0.263, 1 ], [ "fontname", "Arial" ] ],
"filename" : "tc.preset.js", "filename" : "tc.preset.js",
"id" : "obj-10", "id" : "obj-10",
"maxclass" : "jsui", "maxclass" : "jsui",
@@ -3414,7 +3819,7 @@
] ]
} }
, ,
"patching_rect" : [ 468.0, 26.7999267578125, 82.0, 22.0 ], "patching_rect" : [ 551.0, 27.0, 82.0, 22.0 ],
"saved_object_attributes" : { "saved_object_attributes" : {
"description" : "", "description" : "",
"digest" : "", "digest" : "",
@@ -3444,7 +3849,7 @@
} }
, ,
"classnamespace" : "box", "classnamespace" : "box",
"rect" : [ 0.0, 26.0, 899.0, 620.0 ], "rect" : [ 0.0, 26.0, 904.0, 620.0 ],
"bglocked" : 0, "bglocked" : 0,
"openinpresentation" : 0, "openinpresentation" : 0,
"default_fontsize" : 12.0, "default_fontsize" : 12.0,
@@ -5085,7 +5490,7 @@
, { , {
"box" : { "box" : {
"border" : 0, "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" : [ [ "pattrstorage", "colors" ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "autoname", 0 ], [ "scrollable", 0 ], [ "select_mode", 0 ], [ "poll_edited", 0 ], [ "text_color", 0.85, 0.85, 0.85, 1.0 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "bubblesize", 14 ], [ "unique_names", 0 ], [ "spacing", 4 ], [ "click_mode", 0 ], [ "drag_mode", 1 ], [ "ui_rename", 0 ], [ "interp_multi_radius", 1.5 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "autowriteagain", 0 ], [ "send_name", "none" ], [ "use_uid", 1 ], [ "layout", 0 ], [ "store_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 ], [ "menu_mode", 0 ], [ "bgcolor", 0.125, 0.125, 0.125, 1.0 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "ignoreslotzero", 1 ], [ "recall_passthrough", 1 ], [ "active_slot_color", 0.618934978328545, 0.744701397656435, 0.953750108255376, 1.0 ], [ "timestamp", 1 ], [ "color_mode", 1 ], [ "margin", 4 ], [ "nbslot_edit", 1 ], [ "fontsize", 13 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "display_interp", 1 ], [ "slot_round", 0 ], [ "empty_slot_color", 0.221327066888467, 0.221327006361825, 0.221327022178404, 1.0 ], [ "interp_mode", 1 ], [ "edited_color", 1, 0.49, 0.263, 1 ], [ "fontname", "Arial" ] ],
"filename" : "tc.preset.js", "filename" : "tc.preset.js",
"id" : "obj-10", "id" : "obj-10",
"maxclass" : "jsui", "maxclass" : "jsui",
@@ -5288,7 +5693,7 @@
] ]
} }
, ,
"patching_rect" : [ 567.0, 26.7999267578125, 112.0, 22.0 ], "patching_rect" : [ 635.0, 27.0, 112.0, 22.0 ],
"saved_object_attributes" : { "saved_object_attributes" : {
"description" : "", "description" : "",
"digest" : "", "digest" : "",
@@ -5318,7 +5723,7 @@
} }
, ,
"classnamespace" : "box", "classnamespace" : "box",
"rect" : [ 0.0, 26.0, 899.0, 620.0 ], "rect" : [ 0.0, 26.0, 904.0, 620.0 ],
"bglocked" : 0, "bglocked" : 0,
"openinpresentation" : 0, "openinpresentation" : 0,
"default_fontsize" : 13.0, "default_fontsize" : 13.0,
@@ -5526,7 +5931,7 @@
, { , {
"box" : { "box" : {
"id" : "obj-8", "id" : "obj-8",
"items" : [ 1, "up", ",", 2, "down", ",", 3, "sine", ",", 4, "random", ",", 7, "W", ",", 17, "Bell" ], "items" : [ 1, "up", ",", 2, "down", ",", 3, "sine", ",", 4, "random", ",", 5, "center", ",", 7, "W", ",", 8, "mount", ",", 9, "alternate", ",", 12, "down_up", ",", 13, "up_down", ",", 17, "Bell" ],
"maxclass" : "umenu", "maxclass" : "umenu",
"numinlets" : 1, "numinlets" : 1,
"numoutlets" : 3, "numoutlets" : 3,
@@ -5539,7 +5944,7 @@
, { , {
"box" : { "box" : {
"border" : 0, "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" : [ [ "pattrstorage", "tcpreset_help" ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "autoname", 0 ], [ "scrollable", 0 ], [ "select_mode", 0 ], [ "poll_edited", 0 ], [ "text_color", 0.85, 0.85, 0.85, 1.0 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "bubblesize", 14 ], [ "unique_names", 0 ], [ "spacing", 4 ], [ "click_mode", 0 ], [ "drag_mode", 1 ], [ "ui_rename", 0 ], [ "interp_multi_radius", 1.5 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "autowriteagain", 0 ], [ "send_name", "none" ], [ "use_uid", 0 ], [ "layout", 0 ], [ "store_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 ], [ "menu_mode", 0 ], [ "bgcolor", 0.125, 0.125, 0.125, 1.0 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "ignoreslotzero", 1 ], [ "recall_passthrough", 1 ], [ "active_slot_color", 0.618934978328545, 0.744701397656435, 0.953750108255376, 1.0 ], [ "timestamp", 0 ], [ "color_mode", 0 ], [ "margin", 4 ], [ "nbslot_edit", 1 ], [ "fontsize", 13 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "display_interp", 1 ], [ "slot_round", 0 ], [ "empty_slot_color", 0.221327066888467, 0.221327006361825, 0.221327022178404, 1.0 ], [ "interp_mode", 1 ], [ "edited_color", 1, 0.49, 0.263, 1 ], [ "fontname", "Arial" ] ],
"filename" : "tc.preset.js", "filename" : "tc.preset.js",
"id" : "obj-10", "id" : "obj-10",
"maxclass" : "jsui", "maxclass" : "jsui",

File diff suppressed because it is too large Load Diff

View File

@@ -30,6 +30,13 @@
"u099005226": [ -0.587301587301587, 0.365079365079365, -0.46031746031746, -0.015873015873016, 0.904761904761905, -0.714285714285714, 0.206349206349206, -0.142857142857143, 0.428571428571429, -0.746031746031746, 0.587301587301587, -0.619047619047619, -0.047619047619048, -0.555555555555556, -0.428571428571429, 0.396825396825397 ] "u099005226": [ -0.587301587301587, 0.365079365079365, -0.46031746031746, -0.015873015873016, 0.904761904761905, -0.714285714285714, 0.206349206349206, -0.142857142857143, 0.428571428571429, -0.746031746031746, 0.587301587301587, -0.619047619047619, -0.047619047619048, -0.555555555555556, -0.428571428571429, 0.396825396825397 ]
} }
}, },
"5": {
"id": 5,
"name": "center",
"data": {
"u099005226": [ -0.05128205128205132, -0.02564102564102566, -0.02564102564102566, 0.0, 0.0, 0.07692307692307687, 0.07692307692307687, 0.07692307692307687, 0.0, -0.05128205128205132, -0.02564102564102566, 0.0, 0.0, -0.02564102564102566, -0.05128205128205132, -0.1282051282051282 ]
}
},
"7": { "7": {
"id": 7, "id": 7,
"name": "W", "name": "W",
@@ -37,12 +44,54 @@
"u099005226": [ 1.0, 0.6875, 0.21875, -0.15625, -0.46875, -1.0, -0.65625, -0.1875, 0.09375, -0.1875, -0.59375, -1.0, -0.5625, -0.1875, 0.40625, 1.0 ] "u099005226": [ 1.0, 0.6875, 0.21875, -0.15625, -0.46875, -1.0, -0.65625, -0.1875, 0.09375, -0.1875, -0.59375, -1.0, -0.5625, -0.1875, 0.40625, 1.0 ]
} }
}, },
"8": {
"id": 8,
"name": "mount",
"data": {
"u099005226": [ -1.0, -0.717948717948718, -1.0, -0.542857142857143, -1.0, -0.3589743589743589, -1.0, -0.07692307692307687, -1.0, 0.2564102564102564, -1.0, 0.0, -1.0, -0.33333333333333337, -1.0, -0.6666666666666667 ]
}
},
"9": {
"id": 9,
"name": "alternate",
"data": {
"u099005226": [ -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0 ]
}
},
"12": {
"id": 12,
"name": "down_up",
"data": {
"u099005226": [ -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -0.7435897435897436, -0.2564102564102564, 0.41025641025641035, 0.7948717948717949, 0.8205128205128205, 0.9230769230769231, 1.0, 1.0, 1.0, 1.0 ]
}
},
"13": {
"id": 13,
"name": "up_down",
"data": {
"u099005226": [ 0.9487179487179487, 0.9487179487179487, 0.9487179487179487, 0.9487179487179487, 0.9230769230769231, 0.8461538461538463, 0.6923076923076923, 0.1282051282051282, -0.6923076923076923, -0.9230769230769231, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0 ]
}
},
"17": { "17": {
"id": 17, "id": 17,
"name": "Bell", "name": "Bell",
"data": { "data": {
"u099005226": [ -0.8974358974358975, -0.8461538461538461, -0.6923076923076923, -0.3846153846153846, 0.15384615384615374, 0.5897435897435896, 0.8974358974358974, 0.9743589743589745, 0.8461538461538463, 0.5641025641025641, 0.20512820512820507, -0.1282051282051282, -0.5384615384615384, -0.6923076923076923, -0.8205128205128205, -0.8717948717948718 ] "u099005226": [ -0.8974358974358975, -0.8461538461538461, -0.6923076923076923, -0.3846153846153846, 0.15384615384615374, 0.5897435897435896, 0.8974358974358974, 0.9743589743589745, 0.8461538461538463, 0.5641025641025641, 0.20512820512820507, -0.1282051282051282, -0.5384615384615384, -0.6923076923076923, -0.8205128205128205, -0.8717948717948718 ]
} }
},
"47": {
"id": 47,
"name": "\\ \\ \\",
"data": {
"u099005226": [ 0.8717948717948718, 0.641025641025641, 0.3076923076923077, -0.02564102564102566, -0.6153846153846154, -0.8717948717948718, 1.0, 0.4871794871794872, 0.1282051282051282, -0.17948717948717952, -0.5641025641025641, 0.8205128205128205, 0.4358974358974359, -0.05128205128205132, -0.5128205128205128, -0.7948717948717949 ]
}
},
"48": {
"id": 48,
"name": "/ / /",
"data": {
"u099005226": [ -0.717948717948718, -0.41025641025641024, 0.02564102564102555, 0.46153846153846145, 1.0, -0.641025641025641, -0.2564102564102564, 0.10256410256410264, 0.5128205128205128, 0.8461538461538463, 0.9743589743589745, -0.4871794871794872, -0.02564102564102566, 0.3076923076923077, 0.6666666666666667, 1.0 ]
}
} }
} }
} }

View File

@@ -79,9 +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 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 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 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 click_mode = 0; // Set 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_mode = 1; // Set the behavior of drag operations. 0: disabled, 1: move preset (default), 2: Interp (see interp_mode)
var drag_interp_radius = 1; // In use with drag_mode 3 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 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 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 var autoname = false; // Automatically name new presets when created as "Preset" followed by the slot id
@@ -131,6 +132,8 @@ var drag_scroll = 0; // handle scrolling when dragging outside of boundaries
var shift_hold = 0; var shift_hold = 0;
var option_hold = 0; var option_hold = 0;
var control_hold = 0; var control_hold = 0;
var cmd_hold = 0;
var modifier = null; // null lock rename delete store drag_swap
var is_updating_names = 0; var is_updating_names = 0;
var is_interpolating = 0; var is_interpolating = 0;
var is_moving = 0; var is_moving = 0;
@@ -532,7 +535,7 @@ function paint()
if (is_dragging === 0 && previous_active_slot > 0 && previous_active_slot <= slots_count_display) { if (is_dragging === 0 && previous_active_slot > 0 && previous_active_slot <= slots_count_display) {
mgraphics.set_source_rgba(active_slot_color[0], active_slot_color[1], active_slot_color[2], active_slot_color[3] * 0.5); mgraphics.set_source_rgba(active_slot_color[0], active_slot_color[1], active_slot_color[2], active_slot_color[3] * 0.5);
if (color_mode) { if (color_mode) {
if (!control_hold) { if (modifier === null) {
draw_slot_bubble(slots[previous_active_slot].left+1, slots[previous_active_slot].top+1, slot_size-2, slot_size-2); draw_slot_bubble(slots[previous_active_slot].left+1, slots[previous_active_slot].top+1, slot_size-2, slot_size-2);
mgraphics.set_line_width(2); mgraphics.set_line_width(2);
mgraphics.stroke(); mgraphics.stroke();
@@ -545,7 +548,7 @@ function paint()
// Selected slot // Selected slot
if (selected_slot > 0 && selected_slot <= slots_count_display && !(control_hold && last_hovered == selected_slot) && selected_slot != drag_slot) { if (selected_slot > 0 && selected_slot <= slots_count_display && !(modifier === "rename" && last_hovered == selected_slot) && selected_slot != drag_slot) {
mgraphics.set_source_rgba(active_slot_color); mgraphics.set_source_rgba(active_slot_color);
mgraphics.set_line_width(1); mgraphics.set_line_width(1);
draw_slot_bubble(slots[selected_slot].left - 0.5, slots[selected_slot].top - 0.5, slot_size + 1, slot_size + 1); draw_slot_bubble(slots[selected_slot].left - 0.5, slots[selected_slot].top - 0.5, slot_size + 1, slot_size + 1);
@@ -583,52 +586,62 @@ function paint()
// } // }
// Hovered slot // Hovered slot
if ((last_hovered > -1) && ((drag_mode < 2) || (drag_mode >= 2 && !is_dragging))) { if ((last_hovered > -1) && is_dragging < 2) {
var last_hovered_slot = slots[last_hovered];
// Slot border // Slot border
if (slots[last_hovered].filled === false || (slots[last_hovered].filled === true && !control_hold)) { if (last_hovered_slot.filled === false || (last_hovered_slot.filled === true && modifier === null)) {
mgraphics.set_source_rgba(text_color[0], text_color[1], text_color[2], 0.8 * text_color[3]); mgraphics.set_source_rgba(text_color[0], text_color[1], text_color[2], 0.8 * text_color[3]);
mgraphics.set_line_width(1); mgraphics.set_line_width(1);
draw_slot_bubble(slots[last_hovered].left, slots[last_hovered].top, slot_size, slot_size); draw_slot_bubble(last_hovered_slot.left, last_hovered_slot.top, slot_size, slot_size);
mgraphics.stroke(); mgraphics.stroke();
} }
if (last_hovered_is_preset_slot) { if (last_hovered_is_preset_slot) {
var stroke_width = Math.round(1 + slot_size / 10); var stroke_width = Math.round(1 + slot_size / 10);
stroke_width = Math.max(2, stroke_width); stroke_width = Math.max(2, stroke_width);
if (shift_hold) { if (modifier === "lock") {
if (control_hold && slots[last_hovered].filled === true) {
// About to lock/unlock // About to lock/unlock
var bracket_size = slot_size * 0.2; var bracket_size = slot_size * 0.2;
mgraphics.set_source_rgba(text_color); mgraphics.set_source_rgba(text_color);
mgraphics.set_line_width(stroke_width); mgraphics.set_line_width(stroke_width);
mgraphics.move_to(slots[last_hovered].left + bracket_size, slots[last_hovered].top); mgraphics.move_to(last_hovered_slot.left + bracket_size, last_hovered_slot.top);
mgraphics.rel_line_to(-bracket_size, 0); mgraphics.rel_line_to(-bracket_size, 0);
mgraphics.rel_line_to(0, slot_size); mgraphics.rel_line_to(0, slot_size);
mgraphics.rel_line_to(bracket_size, 0); mgraphics.rel_line_to(bracket_size, 0);
mgraphics.move_to(slots[last_hovered].right - bracket_size, slots[last_hovered].top); mgraphics.move_to(last_hovered_slot.right - bracket_size, last_hovered_slot.top);
mgraphics.rel_line_to(bracket_size, 0); mgraphics.rel_line_to(bracket_size, 0);
mgraphics.rel_line_to(0, slot_size); mgraphics.rel_line_to(0, slot_size);
mgraphics.rel_line_to(-bracket_size, 0); mgraphics.rel_line_to(-bracket_size, 0);
mgraphics.stroke(); mgraphics.stroke();
} else if (option_hold && !control_hold && slots[last_hovered].filled === true) { } else if (modifier === "delete" && last_hovered_slot.filled) {
// About to delete // About to delete
mgraphics.set_source_rgba(0, 0, 0, 0.5); mgraphics.set_source_rgba(0, 0, 0, 0.5);
draw_slot_bubble(slots[last_hovered].left + 1, slots[last_hovered].top + 1, slot_size-2, slot_size-2); draw_slot_bubble(last_hovered_slot.left + 1, last_hovered_slot.top + 1, slot_size-2, slot_size-2);
mgraphics.fill(); mgraphics.fill();
} else if (!control_hold && !option_hold){
var cross_size = 0.6;
var cross_offset = slot_size * (1 - cross_size) * 0.5;
mgraphics.set_source_rgba(text_color);
mgraphics.set_line_width(stroke_width);
mgraphics.move_to(last_hovered_slot.left + cross_offset, last_hovered_slot.top + cross_offset);
mgraphics.rel_line_to(slot_size * cross_size, slot_size * cross_size);
mgraphics.move_to(last_hovered_slot.right - cross_offset, last_hovered_slot.top + cross_offset);
mgraphics.rel_line_to(-slot_size * cross_size, slot_size * cross_size);
mgraphics.stroke();
} else if (modifier === "store"){
// About to store // About to store
mgraphics.set_source_rgba(active_slot_color[0], active_slot_color[1], active_slot_color[2], 0.7); mgraphics.set_source_rgba(active_slot_color[0], active_slot_color[1], active_slot_color[2], 0.7);
draw_slot_bubble(slots[last_hovered].left + 1, slots[last_hovered].top + 1, slot_size-2, slot_size-2); draw_slot_bubble(last_hovered_slot.left + 1, last_hovered_slot.top + 1, slot_size-2, slot_size-2);
mgraphics.fill(); mgraphics.fill();
}
} else if (control_hold && slots[last_hovered].filled === true) { } else if (modifier === "rename") {
// About to rename // About to rename
mgraphics.set_source_rgba(text_color); mgraphics.set_source_rgba(text_color);
mgraphics.set_line_width(stroke_width); mgraphics.set_line_width(stroke_width);
mgraphics.move_to(slots[last_hovered].left - 1, slots[last_hovered].top); mgraphics.move_to(last_hovered_slot.left - 1, last_hovered_slot.top);
mgraphics.rel_line_to(slot_size + 2, 0); mgraphics.rel_line_to(slot_size + 2, 0);
mgraphics.move_to(slots[last_hovered].left - 1, slots[last_hovered].bottom); mgraphics.move_to(last_hovered_slot.left - 1, last_hovered_slot.bottom);
mgraphics.rel_line_to(slot_size + 2, 0); mgraphics.rel_line_to(slot_size + 2, 0);
mgraphics.stroke(); mgraphics.stroke();
} }
@@ -651,13 +664,13 @@ function paint()
// Display the text bubble on top of the next slot to avoid hiding slots borders (useful when attempting to lock/rename/delete) // Display the text bubble on top of the next slot to avoid hiding slots borders (useful when attempting to lock/rename/delete)
var bg_txt_dim_w = text_dim[0] > slot_size ? text_dim[0] + 4 : slot_size + 4; var bg_txt_dim_w = text_dim[0] > slot_size ? text_dim[0] + 4 : slot_size + 4;
var bg_txt_dim_h = text_dim[1] > slot_size ? text_dim[1] + 4 : slot_size + 4; var bg_txt_dim_h = text_dim[1] > slot_size ? text_dim[1] + 4 : slot_size + 4;
var bg_txt_pos_x = slots[last_hovered].right + 2; var bg_txt_pos_x = last_hovered_slot.right + 2;
var bg_txt_pos_y = slots[last_hovered].top - 2; var bg_txt_pos_y = last_hovered_slot.top - 2;
// If there is not enough place on the right and if there is more available place on the left, text is displayed on the left // If there is not enough place on the right and if there is more available place on the left, text is displayed on the left
var arrow_on_left = true; var arrow_on_left = true;
if (bg_txt_pos_x + bg_txt_dim_w > ui_width && slots[last_hovered].left - half_spacing > ui_width - slots[last_hovered].right) { if (bg_txt_pos_x + bg_txt_dim_w > ui_width && last_hovered_slot.left - half_spacing > ui_width - last_hovered_slot.right) {
bg_txt_pos_x = slots[last_hovered].left - half_spacing - bg_txt_dim_w; bg_txt_pos_x = last_hovered_slot.left - half_spacing - bg_txt_dim_w;
arrow_on_left = false; arrow_on_left = false;
} }
@@ -669,12 +682,12 @@ function paint()
mgraphics.rectangle_rounded(bg_txt_pos_x, bg_txt_pos_y, bg_txt_dim_w, bg_txt_dim_h, 4, 4); mgraphics.rectangle_rounded(bg_txt_pos_x, bg_txt_pos_y, bg_txt_dim_w, bg_txt_dim_h, 4, 4);
// Draw an arrow pointing toward the preset slot // Draw an arrow pointing toward the preset slot
if (arrow_on_left) { if (arrow_on_left) {
mgraphics.move_to(slots[last_hovered].right, slots[last_hovered].top + slot_size / 2); mgraphics.move_to(last_hovered_slot.right, last_hovered_slot.top + slot_size / 2);
mgraphics.rel_line_to(2, 3); mgraphics.rel_line_to(2, 3);
mgraphics.rel_line_to(0, -6); mgraphics.rel_line_to(0, -6);
mgraphics.close_path(); mgraphics.close_path();
} else { } else {
mgraphics.move_to(slots[last_hovered].left, slots[last_hovered].top + slot_size / 2); mgraphics.move_to(last_hovered_slot.left, last_hovered_slot.top + slot_size / 2);
mgraphics.rel_line_to(-2, 3); mgraphics.rel_line_to(-2, 3);
mgraphics.rel_line_to(0, -6); mgraphics.rel_line_to(0, -6);
mgraphics.close_path(); mgraphics.close_path();
@@ -1194,9 +1207,6 @@ function recallmulti() {
active_slot_edited = 0; active_slot_edited = 0;
run_edited_poll_task(); run_edited_poll_task();
mgraphics.redraw(); mgraphics.redraw();
outlet(0, "recallmulti", args);
} }
function store(v) { function store(v) {
@@ -1248,6 +1258,13 @@ function store(v) {
active_slot_edited = 0; active_slot_edited = 0;
run_edited_poll_task(); run_edited_poll_task();
if (is_interpolating) {
for (var i = 0; i < filled_slots.length; i++) {
slots[filled_slots[i]].interp = -1;
}
is_interpolating = 0;
}
if (recalc_rows_flag) { if (recalc_rows_flag) {
calc_rows_columns(); calc_rows_columns();
} else { } else {
@@ -1725,23 +1742,74 @@ function restore_textedit() {
} }
restore_textedit.local = 1; restore_textedit.local = 1;
function set_modifier() {
var sum = cmd_hold + shift_hold * 2 + control_hold * 4 + option_hold * 8;
var is_hovered_slot_filled = last_hovered > 0 && slots[last_hovered].filled;
switch (sum) {
case 2: //shift
modifier = "store"; break;
case 4: //ctrl
if (is_hovered_slot_filled) {
modifier = "rename";
}
break;
case 6: //shift+control
if (is_hovered_slot_filled) {
modifier = "lock";
}
break;
case 8: //option
modifier = "drag_swap"; break;
case 10: //shift+option
modifier = "delete"; break;
default:
switch (click_mode) {
case 1:
if (is_hovered_slot_filled) {
modifier = "select";
}
break;
case 2:
modifier = "store"; break;
case 3:
if (is_hovered_slot_filled) {
modifier = "delete";
}
break;
default:
modifier = null; break;
}
}
}
// MOUSE EVENTS // MOUSE EVENTS
function onidle(x, y, but, cmd, shift, capslock, option, ctrl) function onidle(x, y, but, cmd, shift, capslock, option, ctrl)
{ {
var redraw_flag = false; var redraw_flag = false;
if (last_x != x || last_y != y - y_offset) { if (last_x != x || last_y != y - y_offset) {
// post("onidle", "but", but, "cmd", cmd, "shift", shift, "capslock", capslock, "option", option, "ctrl", ctrl, '\n');
last_x = x; last_x = x;
last_y = y - y_offset; last_y = y - y_offset;
var cur = get_slot_index(x, y - y_offset); var cur = get_slot_index(x, y - y_offset);
if (cur != last_hovered) { if (cur != last_hovered) {
last_hovered = cur; last_hovered = cur;
set_modifier();
redraw_flag = true; redraw_flag = true;
} }
} }
if (shift_hold != shift || option_hold != option || control_hold != ctrl) { // jsui: modifier keys return 0 or 1
// v8ui: modifier keys return 0 or 1 (cmd), 2 (shift), 4 (ctrl), 8 (option/alt)
if (this.box.maxclass === "v8ui") {
shift /= 2;
ctrl /= 4;
option /= 8;
}
if (shift_hold != shift || option_hold != option || control_hold != ctrl || cmd_hold !== cmd) {
cmd_hold = cmd;
shift_hold = shift; shift_hold = shift;
option_hold = option;
control_hold = ctrl; control_hold = ctrl;
option_hold = option;
set_modifier();
redraw_flag = true; redraw_flag = true;
} }
last_hovered_is_preset_slot = scrollable && nbslot_edit && last_hovered > (true_slots_count_display - 2) ? false : true; last_hovered_is_preset_slot = scrollable && nbslot_edit && last_hovered > (true_slots_count_display - 2) ? false : true;
@@ -1763,8 +1831,7 @@ function onidleout(x, y)
} }
onidleout.local = 1; onidleout.local = 1;
function onclick(x,y,but,cmd,shift,capslock,option,ctrl) function onclick(x, y, but, cmd, shift, capslock, option, ctrl) {
{
if (scrollable && nbslot_edit) { if (scrollable && nbslot_edit) {
// Click "-" // Click "-"
if (last_hovered == true_slots_count_display - 1) { if (last_hovered == true_slots_count_display - 1) {
@@ -1799,40 +1866,35 @@ function onclick(x,y,but,cmd,shift,capslock,option,ctrl)
if (is_typing_name) { if (is_typing_name) {
restore_textedit(); restore_textedit();
} }
if (last_hovered > -1 && pattrstorage_name != null && last_hovered_is_preset_slot) { if (pattrstorage_name != null && last_hovered > -1 && last_hovered_is_preset_slot) {
var output = "recall"; // normally onclick() never gets triggered on click release (but always === 1), but here we call onclick() with but 0 from ondrag() when the button is released and no drag happened.
if (click_mode === 1) { // post("click_mode", click_mode, "but", but, "cmd", cmd, "shift", shift, "capslock", capslock, "option", option, "ctrl", ctrl, '\n');
output = "select"; var output = null;
if ((drag_mode > 0 && !but) || (drag_mode === 0 && but)) {
if (modifier === null && click_mode === 0 && slots[last_hovered].filled) {
output = "recall";
} else {
output = modifier;
} }
if (click_mode === 2 ||(shift && !option && !ctrl)) {
output = "store";
} else if (click_mode === 3 ||(shift && option && slots[last_hovered].filled)) {
output = "delete";
} else if (shift && ctrl && slots[last_hovered].filled) {
output = "lock";
} else if (!shift && ctrl && slots[last_hovered].filled) {
output = "rename";
} else if (slots[last_hovered].filled === false) {
return;
} }
if (output == "recall" && recall_passthrough == false) { if (output === "recall" && recall_passthrough == false) {
// if recall_passthrough == true, send the recall message to pattrstorage directly // if recall_passthrough == true, send the recall message to pattrstorage directly
outlet(0, 'recall', last_hovered); outlet(0, 'recall', last_hovered);
} else if (output == "store") { } else if (output === "store") {
if (store_passthrough) { if (store_passthrough) {
store(last_hovered); store(last_hovered);
} else { } else {
outlet(0, 'store', last_hovered); outlet(0, 'store', last_hovered);
} }
} else if (output == "select") { } else if (output === "select") {
select(last_hovered); select(last_hovered);
// mgraphics.redraw(); mgraphics.redraw();
} else if (output == "lock") { } else if (output === "lock") {
lock(last_hovered, 1 - slots[last_hovered].lock); lock(last_hovered, 1 - slots[last_hovered].lock);
if (selected_slot == last_hovered) { if (selected_slot === last_hovered) {
outlet(3, "set", slots[last_hovered].lock); outlet(3, "set", slots[last_hovered].lock);
} }
} else if (output == "rename") { } else if (output === "rename") {
if (!textedit_obj) { if (!textedit_obj) {
find_textedit(); find_textedit();
} }
@@ -1840,11 +1902,12 @@ function onclick(x,y,but,cmd,shift,capslock,option,ctrl)
select(last_hovered); select(last_hovered);
set_textedit(last_hovered); set_textedit(last_hovered);
} else { } else {
error('No textedit connected to tc.preset third outlet.'); error('No textedit connected to tc.preset third outlet.\n');
} }
} else { } else if (output !== null){
to_pattrstorage(output, last_hovered); to_pattrstorage(output, last_hovered);
} }
set_modifier();
} }
last_x = x; last_x = x;
@@ -1861,7 +1924,6 @@ function ondblclick(x,y,but,cmd,shift,capslock,option,ctrl)
outlet(0, 'recall', last_hovered); outlet(0, 'recall', last_hovered);
} }
} }
last_x = x; last_x = x;
last_y = y - y_offset; last_y = y - y_offset;
} }
@@ -1871,17 +1933,30 @@ function ondrag(x,y,but,cmd,shift,capslock,option,ctrl)
{ {
if (pattrstorage_name != null) { if (pattrstorage_name != null) {
y -= y_offset; y -= y_offset;
if (drag_mode === 1) { if (is_dragging === 0 && !but) {
if (is_dragging === 0 && last_hovered > 0 && slots[last_hovered].filled === true) { // Triggering onclick() interactions when click releases if no drag happened
// To prevent mistakes, is_dragging is set to 1 only when dragging for more than 10 pixels onclick(x, y, 0, cmd, shift, capslock, option, ctrl);
}
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)); 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) { if (dist_from_start > 10) {
is_dragging = 1; is_dragging = 1;
drag_slot = last_hovered; drag_slot = last_hovered;
paint_base(); // We repaint the base with the dragged slot removed from the grid paint_base(); // We repaint the base with the dragged slot removed from the grid
} }
}
} else if (is_dragging == 1) { } else if (interp_mode > 0 && ((drag_mode === 2 && !option) || (drag_mode === 1 && option))) {
if (dist_from_start > 3) {
is_dragging = 2;
}
}
break;
case 1: // Moving preset
last_hovered = get_slot_index(x, y); last_hovered = get_slot_index(x, y);
last_hovered_is_preset_slot = scrollable && nbslot_edit && last_hovered > (true_slots_count_display - 2) ? false : true; last_hovered_is_preset_slot = scrollable && nbslot_edit && last_hovered > (true_slots_count_display - 2) ? false : true;
if (!last_hovered_is_preset_slot) { if (!last_hovered_is_preset_slot) {
@@ -1917,17 +1992,9 @@ function ondrag(x,y,but,cmd,shift,capslock,option,ctrl)
} }
last_x = x; last_x = x;
last_y = y; last_y = y;
} break;
} else if (drag_mode === 2) { case 2: // Interpolating
// Drag to interpolate across adjacent (previous and next) presets if (interp_mode === 1 && last_hovered > 0) {
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 = var relative_dist_from_start =
layout === 0 ? (x - slots[last_hovered].center.x) / (slot_size + spacing) : layout === 0 ? (x - slots[last_hovered].center.x) / (slot_size + spacing) :
(y - slots[last_hovered].center.y) / (slot_size + spacing); (y - slots[last_hovered].center.y) / (slot_size + spacing);
@@ -1958,50 +2025,57 @@ function ondrag(x,y,but,cmd,shift,capslock,option,ctrl)
interp_amount = Math.min(interp_amount, Math.max(interp_amount, 0), 1); interp_amount = Math.min(interp_amount, Math.max(interp_amount, 0), 1);
} }
if (prev_filled_slot !== -1 || next_filled_slot !== -1) { if (prev_filled_slot !== -1 || next_filled_slot !== -1) {
if (recall_passthrough) {
to_pattrstorage("recall", prev_filled_slot, next_filled_slot, interp_amount); 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_x = x;
last_y = y; last_y = y;
if (!but) { if (!but) {
is_dragging = 0; is_dragging = 0;
} }
} } else if (interp_mode === 2) {
} 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 nearby_slots = [];
var max_dist = 0; var accum = 0;
for (var i = 0; i < filled_slots.length; i++) { for (var i = 0; i < filled_slots.length; i++) {
// Interpolating only through displayed slots; // Interpolating only through displayed slots;
if (filled_slots[i] <= slots_count_display) { if (filled_slots[i] <= slots_count_display) {
var s_pos = slots[filled_slots[i]].center; 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 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 = Math.exp(-Math.pow(dist_from_mouse / (0.5 * interp_multi_radius), 2));
var interp_factor = Math.pow((dist_from_mouse / drag_interp_radius) - 1, 4) if (interp_factor > 0.01) {
// var interp_factor = 1 - (dist_from_mouse / drag_interp_radius); nearby_slots.push([filled_slots[i], interp_factor]);
nearby_slots.push(filled_slots[i] + interp_factor); accum += interp_factor;
if (max_dist < dist_from_mouse) max_dist = dist_from_mouse;
} }
} }
} }
for (var i = 0; i < nearby_slots.length; i++) {
nearby_slots[i] = nearby_slots[i][0] + Math.min(nearby_slots[i][1] / accum, 0.999);
}
if (nearby_slots.length) { if (nearby_slots.length) {
var args = ["recallmulti"].concat(nearby_slots); var args = ["recallmulti"].concat(nearby_slots);
// .apply(nul, args): ES5 notation for spread operator ...args
if (recall_passthrough) {
to_pattrstorage.apply(null, args); to_pattrstorage.apply(null, args);
recallmulti.apply(null, nearby_slots); recallmulti.apply(null, nearby_slots);
} }
outlet(0, args);
}
last_x = x; last_x = x;
last_y = y; last_y = y;
if (!but) { if (!but) {
is_dragging = 0; is_dragging = 0;
} }
} }
break;
}
if (!but) {
// When the click releases, we force onidle() to compute currently hovered slot
last_x += 1;
onidle(x, y, but, cmd, shift, capslock, option, ctrl);
}
} }
} }
} }
@@ -2350,7 +2424,14 @@ function setmin_rows(v){
} }
setmin_rows.local = 1; setmin_rows.local = 1;
declareattribute("click_mode", null, null, 1, { style: "enumindex", enumvals: ["Recall", "Select", "Store", "Delete"], default: 0, label: "Click Mode", paint: 1}); declareattribute("click_mode", null, "setclick_mode", 1, { style: "enumindex", enumvals: ["Recall", "Select", "Store", "Delete"], default: 0, label: "Click Mode", paint: 1});
function setclick_mode(v) {
var new_val = Math.min(Math.max(Math.floor(v), 0), 3);
if (click_mode !== new_val) {
click_mode = new_val;
set_modifier();
}
}
declareattribute("select_mode", null, "setselect_mode", 1, {style: "onoff", label: "Select Mode", invisible: 1}); declareattribute("select_mode", null, "setselect_mode", 1, {style: "onoff", label: "Select Mode", invisible: 1});
function setselect_mode(v) { function setselect_mode(v) {
@@ -2359,9 +2440,11 @@ function setselect_mode(v) {
} }
setselect_mode.local = 1; 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"}); 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){ function setcolor_mode(v){

View File

@@ -1,7 +1,7 @@
{ {
"name" : "tc.preset", "name" : "tc.preset",
"displayname" : "", "displayname" : "",
"version" : "1.4.0", "version" : "1.5.0",
"author" : "Théophile Clet", "author" : "Théophile Clet",
"authors" : [ ], "authors" : [ ],
"description" : "A jsui replacement for the preset object", "description" : "A jsui replacement for the preset object",

View File

@@ -1,7 +1,7 @@
{ {
"name" : "tc.preset", "name" : "tc.preset",
"displayname" : "", "displayname" : "",
"version" : "1.4.0", "version" : "1.5.0",
"author" : "Théophile Clet", "author" : "Théophile Clet",
"authors" : [ ], "authors" : [ ],
"description" : "A v8ui replacement for the preset object", "description" : "A v8ui replacement for the preset object",