13 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
b3aed4c39a add store_passthrough 2026-07-10 09:35:23 +02:00
ddc5dcc162 make drag_mode 2 compatible with list layout; weighted interp for
drag_mode 3; small fixes
2026-07-09 21:20:54 +02:00
ae02cdbf7c removed useless attribute getters 2026-07-09 13:49:24 +02:00
bc3a4b31e7 bug fix 2026-07-09 13:23:24 +02:00
589c97b56b add drag_interp_radius attribute, defaults to 1. 2026-07-09 12:20:29 +02:00
8 changed files with 1342 additions and 530 deletions

View File

@@ -5,7 +5,8 @@ A [jsui]/[v8ui] replacement for the [preset] object in Cycling'74 Max.
## Features
- 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)
- 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
- Scrollable list layout (requires Max 8.6.2)
- 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
- 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
- Click mode: set the behavior of single clicks: recall, select without recall, store, delete
...and more!
## 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.
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,411 @@
"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 ],
"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" : {
"id" : "obj-19",
"maxclass" : "newobj",
@@ -58,7 +463,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 +497,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 +544,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,
@@ -612,7 +1017,7 @@
, {
"box" : {
"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",
"numinlets" : 1,
"numoutlets" : 3,
@@ -666,7 +1071,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" : [ [ "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",
"id" : "obj-10",
"maxclass" : "jsui",
@@ -952,7 +1357,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,
@@ -1507,7 +1912,7 @@
, {
"box" : {
"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",
"numinlets" : 1,
"numoutlets" : 3,
@@ -1520,7 +1925,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" : [ [ "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",
"id" : "obj-10",
"maxclass" : "jsui",
@@ -1575,7 +1980,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 +2318,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 +2448,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" : [ [ "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",
"id" : "obj-10",
"maxclass" : "jsui",
@@ -2185,7 +2590,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" : [ [ "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",
"id" : "obj-2",
"maxclass" : "jsui",
@@ -2820,7 +3225,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" : [ [ "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",
"id" : "obj-10",
"maxclass" : "jsui",
@@ -2929,7 +3334,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 +3364,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 +3524,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" : [ [ "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",
"id" : "obj-10",
"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" : {
"description" : "",
"digest" : "",
@@ -3444,7 +3849,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 +5490,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" : [ [ "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",
"id" : "obj-10",
"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" : {
"description" : "",
"digest" : "",
@@ -5318,7 +5723,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,
@@ -5526,7 +5931,7 @@
, {
"box" : {
"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",
"numinlets" : 1,
"numoutlets" : 3,
@@ -5539,7 +5944,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" : [ [ "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",
"id" : "obj-10",
"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 ]
}
},
"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": {
"id": 7,
"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 ]
}
},
"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": {
"id": 17,
"name": "Bell",
"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 ]
}
},
"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,14 +79,17 @@ 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
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
var use_uid = 0; // Generating UID for each presets when enabled. Requires a [pattr preset_metadata]
var timestamp = false; // Generates a `created` and `modified` timestamp for each preset. Requires use_uid enabled
var recall_passthrough = true; // By default (true), clicking a slot sends a recall message directly to [pattrstorage], and the jsui left outlet outputs a recall message once the recall is done. When disabled, clicking a slot will send a recall message straight from the jsui left outlet, so it's up to the user to forward the message to pattrstorage. It can be usefull for triggering interpolations with custom logic.
var store_passthrough = true; // Same as recall_passthrough but for store messages triggered with shift+click. The store message message has to be routed back into [tc.preset] to be effective.
var ui_rename = false; // Use the attached textedit, if any, to edit slot names directly in the JSUI frame when clicking a slot while holding the control key. When disabled, the textedit remains untouched but gets focused when clicking a slot while holding the control key.
var poll_edited = 0; // If >0, check if current preset is edited every X seconds defined by the variable value.
var nbslot_edit = true; // If nbslot_edit and scrollable are enabled, the last two visible slots are replaced by buttons to add or remove lines of slot.
@@ -129,6 +132,8 @@ var drag_scroll = 0; // handle scrolling when dragging outside of boundaries
var shift_hold = 0;
var option_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_interpolating = 0;
var is_moving = 0;
@@ -318,13 +323,14 @@ function calc_rows_columns(src) {
slots[cur].set_geom(left, top, right, bottom);
} else {
// Empty slot, possibly not initialized (if above slots_highest)
slots[cur] = new slot(left, top, right, bottom);
slots[cur] = new slot();
slots[cur].set_geom(left, top, right, bottom);
}
}
}
if (slots_count_display < slots_highest) {
if (slots.length < slots_highest ) {
for (var i = slots_count_display + 1; i <= slots_highest; i++) {
slots[i] = new slot();
}
@@ -529,7 +535,7 @@ function paint()
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);
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);
mgraphics.set_line_width(2);
mgraphics.stroke();
@@ -542,7 +548,7 @@ function paint()
// 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_line_width(1);
draw_slot_bubble(slots[selected_slot].left - 0.5, slots[selected_slot].top - 0.5, slot_size + 1, slot_size + 1);
@@ -580,52 +586,62 @@ function paint()
// }
// 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
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_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();
}
if (last_hovered_is_preset_slot) {
var stroke_width = Math.round(1 + slot_size / 10);
stroke_width = Math.max(2, stroke_width);
if (shift_hold) {
if (control_hold && slots[last_hovered].filled === true) {
if (modifier === "lock") {
// About to lock/unlock
var bracket_size = slot_size * 0.2;
mgraphics.set_source_rgba(text_color);
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(0, slot_size);
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(0, slot_size);
mgraphics.rel_line_to(-bracket_size, 0);
mgraphics.stroke();
} else if (option_hold && !control_hold && slots[last_hovered].filled === true) {
} else if (modifier === "delete" && last_hovered_slot.filled) {
// About to delete
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();
} 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
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();
}
} else if (control_hold && slots[last_hovered].filled === true) {
} else if (modifier === "rename") {
// About to rename
mgraphics.set_source_rgba(text_color);
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.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.stroke();
}
@@ -648,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)
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_pos_x = slots[last_hovered].right + 2;
var bg_txt_pos_y = slots[last_hovered].top - 2;
var bg_txt_pos_x = last_hovered_slot.right + 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
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) {
bg_txt_pos_x = slots[last_hovered].left - half_spacing - bg_txt_dim_w;
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 = last_hovered_slot.left - half_spacing - bg_txt_dim_w;
arrow_on_left = false;
}
@@ -666,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);
// Draw an arrow pointing toward the preset slot
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(0, -6);
mgraphics.close_path();
} 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(0, -6);
mgraphics.close_path();
@@ -1191,9 +1207,6 @@ function recallmulti() {
active_slot_edited = 0;
run_edited_poll_task();
mgraphics.redraw();
outlet(0, "recallmulti", args);
}
function store(v) {
@@ -1245,6 +1258,13 @@ function store(v) {
active_slot_edited = 0;
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) {
calc_rows_columns();
} else {
@@ -1255,7 +1275,9 @@ function store(v) {
set_active_slot(v);
}
if (store_passthrough) {
outlet(0, "store", v);
}
if (v) {
// We writagain only if stored preset is > 0
trigger_writeagain();
@@ -1496,7 +1518,6 @@ find_pattrstorage.local = 1;
function to_pattrstorage() {
if (pattrstorage_obj != null) {
// post('sending to pattrstorage: ', arrayfromargs(arguments), '\n');
pattrstorage_obj.message(arrayfromargs(arguments));
}
}
@@ -1599,7 +1620,6 @@ function update_filled_slots_dict() {
tmp_dict['color_custom'] = slot.color_custom; // Preset color (when color_mode = 3)
}
if (use_uid) tmp_dict['uid'] = slot.uid; // Preset uid (unique and persistent across preset renaming, overwriting and moving) Useful for keeping track of preset across changes
// post('updating by_uid', slot.uid, '\n');
if (timestamp) {
tmp_dict['created'] = slot.created;
tmp_dict['modified'] = slot.modified;
@@ -1722,23 +1742,74 @@ function restore_textedit() {
}
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
function onidle(x, y, but, cmd, shift, capslock, option, ctrl)
{
var redraw_flag = false;
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_y = y - y_offset;
var cur = get_slot_index(x, y - y_offset);
if (cur != last_hovered) {
last_hovered = cur;
set_modifier();
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;
option_hold = option;
control_hold = ctrl;
option_hold = option;
set_modifier();
redraw_flag = true;
}
last_hovered_is_preset_slot = scrollable && nbslot_edit && last_hovered > (true_slots_count_display - 2) ? false : true;
@@ -1760,8 +1831,7 @@ function onidleout(x, y)
}
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) {
// Click "-"
if (last_hovered == true_slots_count_display - 1) {
@@ -1796,36 +1866,35 @@ function onclick(x,y,but,cmd,shift,capslock,option,ctrl)
if (is_typing_name) {
restore_textedit();
}
if (last_hovered > -1 && pattrstorage_name != null && last_hovered_is_preset_slot) {
var output = "recall";
if (click_mode === 1) {
output = "select";
if (pattrstorage_name != null && last_hovered > -1 && last_hovered_is_preset_slot) {
// 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.
// post("click_mode", click_mode, "but", but, "cmd", cmd, "shift", shift, "capslock", capslock, "option", option, "ctrl", ctrl, '\n');
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
outlet(0, 'recall', last_hovered);
} else if (output == "store") {
} else if (output === "store") {
if (store_passthrough) {
store(last_hovered);
} else if (output == "select") {
} else {
outlet(0, 'store', last_hovered);
}
} else if (output === "select") {
select(last_hovered);
// mgraphics.redraw();
} else if (output == "lock") {
mgraphics.redraw();
} else if (output === "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);
}
} else if (output == "rename") {
} else if (output === "rename") {
if (!textedit_obj) {
find_textedit();
}
@@ -1833,11 +1902,12 @@ function onclick(x,y,but,cmd,shift,capslock,option,ctrl)
select(last_hovered);
set_textedit(last_hovered);
} 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);
}
set_modifier();
}
last_x = x;
@@ -1854,7 +1924,6 @@ function ondblclick(x,y,but,cmd,shift,capslock,option,ctrl)
outlet(0, 'recall', last_hovered);
}
}
last_x = x;
last_y = y - y_offset;
}
@@ -1864,17 +1933,30 @@ 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
if (is_dragging === 0 && !but) {
// Triggering onclick() interactions when click releases if no drag happened
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));
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 (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_is_preset_slot = scrollable && nbslot_edit && last_hovered > (true_slots_count_display - 2) ? false : true;
if (!last_hovered_is_preset_slot) {
@@ -1910,18 +1992,12 @@ function ondrag(x,y,but,cmd,shift,capslock,option,ctrl)
}
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 = (x - slots[last_hovered].center.x) / (slot_size + spacing);
break;
case 2: // Interpolating
if (interp_mode === 1 && last_hovered > 0) {
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;
@@ -1949,47 +2025,57 @@ function ondrag(x,y,but,cmd,shift,capslock,option,ctrl)
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 (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 radius = 2;
} else if (interp_mode === 2) {
var nearby_slots = [];
var max_dist = 0;
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 < radius) {
var interp_factor = 1 - (dist_from_mouse / radius);
nearby_slots.push(filled_slots[i] + interp_factor);
if (max_dist < dist_from_mouse) max_dist = dist_from_mouse;
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.999);
}
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;
}
}
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);
}
}
}
}
@@ -2080,12 +2166,7 @@ function setslotsize(v){
}
setslotsize.local = 1;
declareattribute("slot_round", "getslotround", "setslotround", 1, {type: "long", default: 0, label: "Slot Round", category: "Appearance"});
function getslotround() {
return slot_round;
}
getslotround.local = 1;
declareattribute("slot_round", null, "setslotround", 1, {type: "long", default: 0, label: "Slot Round", category: "Appearance"});
function setslotround(v){
if (arguments.length) {
slot_round = Math.max(0, Math.min(slot_size, v));
@@ -2097,12 +2178,7 @@ function setslotround(v){
}
setslotround.local = 1;
declareattribute("margin", "getmargin", "setmargin", 1, {type: "long", default: 4, label: "Margin", category: "Appearance"});
function getmargin() {
return margin;
}
getmargin.local = 1;
declareattribute("margin", null, "setmargin", 1, {type: "long", default: 4, label: "Margin", category: "Appearance"});
function setmargin(v){
if (arguments.length) {
margin = Math.max(0, v);
@@ -2113,12 +2189,7 @@ function setmargin(v){
}
setmargin.local = 1;
declareattribute("spacing", "getspacing", "setspacing", 1, {type: "long", default: 4, label: "Spacing", category: "Appearance"});
function getspacing() {
return spacing;
}
getspacing.local = 1;
declareattribute("spacing", null, "setspacing", 1, {type: "long", default: 4, label: "Spacing", category: "Appearance"});
function setspacing(v){
if (arguments.length) {
spacing = Math.max(1, v);
@@ -2148,12 +2219,7 @@ function setbgcolor(){
}
setbgcolor.local = 1;
declareattribute("empty_slot_color", "getemptycolor", "setemptycolor", 1, {style: "rgba", label: "Empty Slot Color", category: "Appearance"});
function getemptycolor() {
return empty_slot_color;
}
getemptycolor.local = 1;
declareattribute("empty_slot_color", null, "setemptycolor", 1, {style: "rgba", label: "Empty Slot Color", category: "Appearance"});
function setemptycolor(){
if (arguments.length == 4) {
empty_slot_color = [arguments[0], arguments[1], arguments[2], arguments[3]];
@@ -2166,12 +2232,7 @@ function setemptycolor(){
}
setemptycolor.local = 1;
declareattribute("active_slot_color", "getactiveslotcolor", "setactiveslotcolor", 1, {style: "rgba", label: "Active Slot Color", category: "Appearance"});
function getactiveslotcolor() {
return active_slot_color;
}
getactiveslotcolor.local = 1;
declareattribute("active_slot_color", null, "setactiveslotcolor", 1, {style: "rgba", label: "Active Slot Color", category: "Appearance"});
function setactiveslotcolor(){
if (arguments.length == 4) {
active_slot_color = [arguments[0], arguments[1], arguments[2], arguments[3]];
@@ -2184,12 +2245,7 @@ function setactiveslotcolor(){
}
setactiveslotcolor.local = 1;
declareattribute("stored_slot_color", "getstoredslotcolor", "setstoredslotcolor", 1, {style: "rgba", label: "Stored Slot Color", category: "Appearance"});
function getstoredslotcolor() {
return stored_slot_color;
}
getstoredslotcolor.local = 1;
declareattribute("stored_slot_color", null, "setstoredslotcolor", 1, {style: "rgba", label: "Stored Slot Color", category: "Appearance"});
function setstoredslotcolor(){
if (arguments.length == 4) {
stored_slot_color = [arguments[0], arguments[1], arguments[2], arguments[3]];
@@ -2202,12 +2258,7 @@ function setstoredslotcolor(){
}
setstoredslotcolor.local = 1;
declareattribute("interp_slot_color", "getinterpslotcolor", "setinterpslotcolor", 1, {style: "rgba", label: "Interpolating slot color", category: "Appearance"});
function getinterpslotcolor() {
return interp_slot_color;
}
getinterpslotcolor.local = 1;
declareattribute("interp_slot_color", null, "setinterpslotcolor", 1, {style: "rgba", label: "Interpolating slot color", category: "Appearance"});
function setinterpslotcolor(){
if (arguments.length == 4) {
interp_slot_color = [arguments[0], arguments[1], arguments[2], arguments[3]];
@@ -2220,11 +2271,7 @@ function setinterpslotcolor(){
}
setinterpslotcolor.local = 1;
declareattribute("text_color", "gettextcolor", "settextcolor", 1, {style: "rgba", label: "Text Color", category: "Appearance"});
function gettextcolor() {
return text_color;
}
gettextcolor.local = 1;
declareattribute("text_color", null, "settextcolor", 1, {style: "rgba", label: "Text Color", category: "Appearance"});
function settextcolor(){
if (arguments.length == 4) {
text_color = [arguments[0], arguments[1], arguments[2], arguments[3]];
@@ -2293,12 +2340,7 @@ function setfontname(v){
}
setfontname.local = 1;
declareattribute("menu_mode", "getmenu_mode", "setmenu_mode", 1, {style: "enumindex", enumvals: ["Preset number + name", "Preset number", "Preset name"], label: "Menu Mode"});
function getmenu_mode() {
return menu_mode;
}
getmenu_mode.local = 1;
declareattribute("menu_mode", null, "setmenu_mode", 1, {style: "enumindex", enumvals: ["Preset number + name", "Preset number", "Preset name"], label: "Menu Mode"});
function setmenu_mode(v){
if (arguments.length == 1) {
menu_mode = Math.min(Math.max(0, parseInt(v)), 2);
@@ -2337,12 +2379,7 @@ function setignoreslotzero(v){
}
setignoreslotzero.local = 1;
declareattribute("display_interp", "getdisplayinterp", "setdisplayinterp", 1, {style: "onoff", label: "Display Interpolations", category: "Appearance"});
function getdisplayinterp() {
return display_interp;
}
getdisplayinterp.local = 1;
declareattribute("display_interp", null, "setdisplayinterp", 1, { style: "onoff", label: "Display Interpolations", category: "Appearance" });
function setdisplayinterp(v){
if (v == 0) {
display_interp = 0;
@@ -2352,12 +2389,7 @@ function setdisplayinterp(v){
}
setdisplayinterp.local = 1;
declareattribute("layout", "getlayout", "setlayout", 1, {style: "enumindex", enumvals: ["Grid", "List"], label: "Layout", category: "Appearance"});
function getlayout() {
return layout;
}
getlayout.local = 1;
declareattribute("layout", null, "setlayout", 1, {style: "enumindex", enumvals: ["Grid", "List"], label: "Layout", category: "Appearance"});
function setlayout(v){
if (v == 0) {
layout = 0;
@@ -2369,12 +2401,7 @@ function setlayout(v){
}
setlayout.local = 1;
declareattribute("scrollable", "getscrollable", "setscrollable", 1, {style: "onoff", label: "Scrollable"});
function getscrollable() {
return scrollable;
}
getscrollable.local = 1;
declareattribute("scrollable", null, "setscrollable", 1, {style: "onoff", label: "Scrollable"});
function setscrollable(v){
if (v == 0) {
scrollable = 0;
@@ -2386,11 +2413,7 @@ function setscrollable(v){
}
setscrollable.local = 1;
declareattribute("min_rows", "getmin_rows", "setmin_rows", 1, {type: "long", min: 1, label: "Minimum Rows"});
function getmin_rows() {
return min_rows;
}
getmin_rows.local = 1;
declareattribute("min_rows", null, "setmin_rows", 1, {type: "long", min: 1, label: "Minimum Rows"});
function setmin_rows(v){
if (v > 0) {
min_rows = v;
@@ -2401,28 +2424,29 @@ function setmin_rows(v){
}
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("select_mode", "getselect_mode", "setselect_mode", 1, {style: "onoff", label: "Select Mode", invisible: 1});
function getselect_mode() {
return select_mode;
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();
}
}
getselect_mode.local = 1;
declareattribute("select_mode", null, "setselect_mode", 1, {style: "onoff", label: "Select Mode", invisible: 1});
function setselect_mode(v) {
select_mode = v ? 1 : 0;
if (select_mode) this.box.message("click_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("color_mode", "getcolor_mode", "setcolor_mode", 1, {type: "long", min: 0, max: 3, style: "enumindex", enumvals: ["Classic", "Cycle", "Select", "Custom"], label: "Color Mode", category: "Appearance"});
function getcolor_mode() {
return color_mode;
}
getcolor_mode.local = 1;
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){
v = Math.floor(v);
v = Math.max(0, Math.min(3, v));
@@ -2447,12 +2471,7 @@ function setcolor_mode(v){
}
setcolor_mode.local = 1;
declareattribute("color_1", "getcolor1", "setcolor1", 1, {style: "rgba", label: "Color 1", category: "Appearance"});
function getcolor1() {
return color_1;
}
getcolor1.local = 1;
declareattribute("color_1", null, "setcolor1", 1, {style: "rgba", label: "Color 1", category: "Appearance"});
function setcolor1(){
if (arguments.length == 4) {
color_wheel(1, arguments[0], arguments[1], arguments[2], arguments[3]);
@@ -2464,12 +2483,7 @@ function setcolor1(){
}
setcolor1.local = 1;
declareattribute("color_2", "getcolor2", "setcolor2", 1, {style: "rgba", label: "Color 2", category: "Appearance"});
function getcolor2() {
return color_2;
}
getcolor2.local = 1;
declareattribute("color_2", null, "setcolor2", 1, {style: "rgba", label: "Color 2", category: "Appearance"});
function setcolor2(){
if (arguments.length == 4) {
color_wheel(2, arguments[0], arguments[1], arguments[2], arguments[3]);
@@ -2481,12 +2495,7 @@ function setcolor2(){
}
setcolor2.local = 1;
declareattribute("color_3", "getcolor3", "setcolor3", 1, {style: "rgba", label: "Color 3", category: "Appearance"});
function getcolor3() {
return color_3;
}
getcolor3.local = 1;
declareattribute("color_3", null, "setcolor3", 1, {style: "rgba", label: "Color 3", category: "Appearance"});
function setcolor3(){
if (arguments.length == 4) {
color_wheel(3, arguments[0], arguments[1], arguments[2], arguments[3]);
@@ -2498,12 +2507,7 @@ function setcolor3(){
}
setcolor3.local = 1;
declareattribute("color_4", "getcolor4", "setcolor4", 1, {style: "rgba", label: "Color 4", category: "Appearance"});
function getcolor4() {
return color_4;
}
getcolor4.local = 1;
declareattribute("color_4", null, "setcolor4", 1, {style: "rgba", label: "Color 4", category: "Appearance"});
function setcolor4(){
if (arguments.length == 4) {
color_wheel(4, arguments[0], arguments[1], arguments[2], arguments[3]);
@@ -2515,12 +2519,7 @@ function setcolor4(){
}
setcolor4.local = 1;
declareattribute("color_5", "getcolor5", "setcolor5", 1, {style: "rgba", label: "Color 5", category: "Appearance"});
function getcolor5() {
return color_5;
}
getcolor5.local = 1;
declareattribute("color_5", null, "setcolor5", 1, {style: "rgba", label: "Color 5", category: "Appearance"});
function setcolor5(){
if (arguments.length == 4) {
color_wheel(5, arguments[0], arguments[1], arguments[2], arguments[3]);
@@ -2532,12 +2531,7 @@ function setcolor5(){
}
setcolor5.local = 1;
declareattribute("color_6", "getcolor6", "setcolor6", 1, {style: "rgba", label: "Color 6", category: "Appearance"});
function getcolor6() {
return color_6;
}
getcolor6.local = 1;
declareattribute("color_6", null, "setcolor6", 1, {style: "rgba", label: "Color 6", category: "Appearance"});
function setcolor6(){
if (arguments.length == 4) {
color_wheel(6, arguments[0], arguments[1], arguments[2], arguments[3]);
@@ -2549,12 +2543,7 @@ function setcolor6(){
}
setcolor6.local = 1;
declareattribute("send_name", "getsendname", "setsendname", 1, {type: "symbol", label: "Send Dictionary To"});
function getsendname() {
return send_name;
}
getsendname.local = 1;
declareattribute("send_name", null, "setsendname", 1, {type: "symbol", label: "Send Dictionary To"});
function setsendname(){
if (arguments.length > 0) {
send_name = arguments[0];
@@ -2564,12 +2553,7 @@ function setsendname(){
}
setsendname.local = 1;
declareattribute("unique_names", "getunique_names", "setunique_names", 1, {style: "onoff", label: "Force Unique Names"});
function getunique_names() {
return unique_names;
}
getunique_names.local = 1;
declareattribute("unique_names", null, "setunique_names", 1, {style: "onoff", label: "Force Unique Names"});
function setunique_names(v){
unique_names = v > 0;
}
@@ -2577,12 +2561,7 @@ setunique_names.local = 1;
declareattribute("autoname", null, null, 1, { style: "onoff", label: "Autoname new presets" });
declareattribute("use_uid", "getuse_uid", "setuse_uid", 1, {style: "onoff", label: "Use UID"});
function getuse_uid() {
return use_uid;
}
getuse_uid.local = 1;
declareattribute("use_uid", null, "setuse_uid", 1, {style: "onoff", label: "Use UID"});
function setuse_uid(v){
var new_val = v == 1 ? 1 : 0;
if (new_val != use_uid && new_val == 1) {
@@ -2611,23 +2590,19 @@ function settimestamp(v){
}
settimestamp.local = 1;
declareattribute("recall_passthrough", "getrecall_passthrough", "setrecall_passthrough", 1, {style: "onoff", label: "Recall Passthrough"});
function getrecall_passthrough() {
return recall_passthrough;
}
getrecall_passthrough.local = 1;
declareattribute("recall_passthrough", null, "setrecall_passthrough", 1, {style: "onoff", label: "Recall Passthrough"});
function setrecall_passthrough(v){
recall_passthrough = v > 0;
}
setrecall_passthrough.local = 1;
declareattribute("ui_rename", "getui_rename", "setui_rename", 1, {style: "onoff", label: "Rename In UI"});
function getui_rename() {
return ui_rename;
declareattribute("store_passthrough", null, "setstore_passthrough", 1, {style: "onoff", label: "Store Passthrough"});
function setstore_passthrough(v){
store_passthrough = v > 0;
}
getui_rename.local = 1;
setstore_passthrough.local = 1;
declareattribute("ui_rename", null, "setui_rename", 1, {style: "onoff", label: "Rename In UI"});
function setui_rename(v){
ui_rename = v > 0;
if (ui_rename) {
@@ -2636,12 +2611,7 @@ function setui_rename(v){
}
setui_rename.local = 1;
declareattribute("poll_edited", "getpoll_edited", "setpoll_edited", 1, {type: "float", min: 0, label: "Poll Edited State"});
function getpoll_edited() {
return poll_edited;
}
getpoll_edited.local = 1;
declareattribute("poll_edited", null, "setpoll_edited", 1, {type: "float", min: 0, label: "Poll Edited State"});
function setpoll_edited(v){
poll_edited = v == 0 ? 0 : Math.max(0.1, Math.abs(v));
if (poll_edited > 0) {
@@ -2672,12 +2642,7 @@ function do_poll_edited() {
}
do_poll_edited.local = 1;
declareattribute("edited_color", "getedited_color", "setedited_color", 1, {style: "rgba", label: "Edited Dot Color", category: "Appearance"});
function getedited_color() {
return edited_color;
}
getedited_color.local = 1;
declareattribute("edited_color", null, "setedited_color", 1, {style: "rgba", label: "Edited Dot Color", category: "Appearance"});
function setedited_color(){
if (arguments.length == 4) {
edited_color = [arguments[0], arguments[1], arguments[2], arguments[3]];
@@ -2697,12 +2662,7 @@ function edited(v) {
}
}
declareattribute("nbslot_edit", "getnbslot_edit", "setnbslot_edit", 1, {style: "onoff", label: "Add/remove rows of presets"});
function getnbslot_edit() {
return nbslot_edit;
}
getnbslot_edit.local = 1;
declareattribute("nbslot_edit", null, "setnbslot_edit", 1, {style: "onoff", label: "Add/remove rows of presets"});
function setnbslot_edit(v){
nbslot_edit = v > 0;
y_offset = 0;

View File

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

View File

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