Compare commits
18 Commits
ae02cdbf7c
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| eb0cd8ecad | |||
| b495823333 | |||
| f537e3a583 | |||
| 7721cd7322 | |||
| 6ee2ad8e9a | |||
| 15fece4b80 | |||
| 0d03fb4979 | |||
| eb89d37a7c | |||
| ac39f1ac4d | |||
| 7146d26a57 | |||
| 074c23523d | |||
| 514f6fd417 | |||
| 1cf0d247f3 | |||
| 3b10eef0c8 | |||
| e5d871456e | |||
| 08f97d61de | |||
| b3aed4c39a | |||
| ddc5dcc162 |
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
@@ -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 ]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ var stored_slot_color = max.getcolor("theme_accentcolor"); //[0.502, 0.502, 0.50
|
||||
var interp_slot_color = [1.0, 1.0, 1.0, 0.8];
|
||||
var border_color = [1.0, 1.0, 1.0, 0.85];
|
||||
var text_color = max.getcolor("theme_textcolor"); //[0.129, 0.129, 0.129, 1];
|
||||
var text_bg_color = set_text_bg_color();
|
||||
var text_bg_color; set_text_bg_color();
|
||||
var edited_color = [1, 0.49, 0.263, 1];
|
||||
|
||||
var color_1 = [0.743, 0.41, 0.501, 1]; // Color set for the filled slots. I don't like how this is declared. More info in color_wheel() declaration
|
||||
@@ -79,20 +79,23 @@ var scrollable = 0; // Defines weither the object can be scrolled or not
|
||||
var min_rows = 10; // Minimum number of rows to display if scrollable is enabled
|
||||
var color_mode = 0; // Change the way the filled slots (stored presets) color is handeld. 0: stored_slot_color. 1: looping through color_1 to color_6. 2: Freely assign colors 1 to 6. 3: Set any color to any preset
|
||||
var select_mode = 0; // 0: single click to select and recall the slot. 1: single click to select the slot, double click to recall it.
|
||||
var click_mode = 0; // Sets the behavior of single clicks. 0: normal (recall), 1: select, 2: store, 3: delete
|
||||
var drag_mode = 1; // Sets the behavior of drag operations. 0: disabled, 1: move preset (default), 2: in-line interpolation, 3: zone interpolation
|
||||
var drag_interp_radius = 1; // In use with drag_mode 3
|
||||
var 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.
|
||||
|
||||
// (WORK)
|
||||
var is_jsui = this.box.maxclass === "jsui";
|
||||
var pattrstorage_name = null;
|
||||
var pattrstorage_obj = null;
|
||||
|
||||
@@ -130,7 +133,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 is_updating_names = 0;
|
||||
var cmd_hold = 0;
|
||||
var modifier = null; // null lock rename delete store drag_swap
|
||||
var is_interpolating = 0;
|
||||
var is_moving = 0;
|
||||
var is_dragging = 0; // Drag flag
|
||||
@@ -224,6 +228,13 @@ function slot(left, top, right, bottom) {
|
||||
slot.local = 1;
|
||||
|
||||
function loadbang() {
|
||||
// If running in a M4L device, for some reason loadbang needs to be delayed in order to properly get presets stored in Live set
|
||||
// So we bypass the initial loadbang, and we rely on init_tsk instead
|
||||
if (max.isplugin) return;
|
||||
do_loadbang();
|
||||
}
|
||||
|
||||
function do_loadbang() {
|
||||
// post("loadbang\n");
|
||||
has_loaded = true;
|
||||
this.box.setboxattr('border', 0);
|
||||
@@ -240,7 +251,7 @@ init_tsk.schedule(200);
|
||||
|
||||
function delayed_init() {
|
||||
if (!has_loaded) {
|
||||
loadbang();
|
||||
do_loadbang();
|
||||
}
|
||||
if (arguments.callee.task.valid) {
|
||||
arguments.callee.task.freepeer();
|
||||
@@ -491,12 +502,13 @@ paint_base.local = 1;
|
||||
|
||||
function paint()
|
||||
{
|
||||
// post("redraw\n");
|
||||
// Handling Presentation mode enable/disable
|
||||
// Handling Presentation mode enable/disable in jsui
|
||||
var cur_size = mgraphics.size;
|
||||
if (cur_size[0] != ui_width || cur_size[1] != ui_height) {
|
||||
onresize(cur_size[0], cur_size[1]);
|
||||
} else {
|
||||
return
|
||||
}
|
||||
// post("redraw\n");
|
||||
mgraphics.select_font_face(font_name);
|
||||
mgraphics.set_font_size(font_size);
|
||||
mgraphics.translate(0, y_offset);
|
||||
@@ -531,7 +543,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();
|
||||
@@ -544,7 +556,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);
|
||||
@@ -553,7 +565,6 @@ function paint()
|
||||
|
||||
// Interpolated slots
|
||||
if (is_dragging !== 1 && display_interp && is_interpolating) {
|
||||
|
||||
for (var i = 1; i <= slots_count_display; i++) {
|
||||
var slot = slots[i];
|
||||
var interp = slot.interp;
|
||||
@@ -582,52 +593,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();
|
||||
}
|
||||
@@ -650,13 +671,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;
|
||||
}
|
||||
|
||||
@@ -668,12 +689,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();
|
||||
@@ -726,7 +747,7 @@ function paint()
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
paint.local = 0;
|
||||
|
||||
@@ -1010,7 +1031,6 @@ function slotlist() {
|
||||
for (var i = 0; i < filled_slots.length; i++) {
|
||||
slots[filled_slots[i]].filled = true;
|
||||
}
|
||||
is_updating_names = 1;
|
||||
to_pattrstorage("getslotnamelist");
|
||||
get_all_presets_metadata();
|
||||
update_filled_slots_dict();
|
||||
@@ -1021,12 +1041,9 @@ function slotname() {
|
||||
var args = arrayfromargs(arguments);
|
||||
var slot = args[0];
|
||||
var name = args[1];
|
||||
if (slot == 'done') {
|
||||
is_updating_names = 0;
|
||||
return;
|
||||
}
|
||||
if (slot > 0 && name != "(undefined)") {
|
||||
if (is_updating_names == 1 && slots[slot].filled === false && name !== "<(unnamed)>") {
|
||||
if (slot === 'done') return;
|
||||
if (slot > 0 && name !== "(undefined)") {
|
||||
if (slots[slot].filled === false && name !== "<(unnamed)>") {
|
||||
// Removing parenthesis automatically added by pattrstorage if the preset has a name but isn't filled
|
||||
name = name.slice(1, -1);
|
||||
}
|
||||
@@ -1193,9 +1210,6 @@ function recallmulti() {
|
||||
active_slot_edited = 0;
|
||||
run_edited_poll_task();
|
||||
mgraphics.redraw();
|
||||
|
||||
outlet(0, "recallmulti", args);
|
||||
|
||||
}
|
||||
|
||||
function store(v) {
|
||||
@@ -1247,6 +1261,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 {
|
||||
@@ -1257,7 +1278,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();
|
||||
@@ -1463,7 +1486,6 @@ function resync() {
|
||||
to_pattrstorage("getslotlist");
|
||||
to_pattrstorage("getlockedslots");
|
||||
calc_rows_columns();
|
||||
|
||||
}
|
||||
|
||||
function find_pattrstorage(name) {
|
||||
@@ -1479,7 +1501,6 @@ function find_pattrstorage(name) {
|
||||
if (pattrstorage_obj != null) {
|
||||
pattrstorage_name = name;
|
||||
filled_slots_dict.name = pattrstorage_name + '_presets_dict';
|
||||
slots_clear();
|
||||
// this.patcher.hiddenconnect(pattrstorage_obj, 0, this.box, 0);
|
||||
// post('lets find presets_metata pattr for', name, '\n');
|
||||
if (use_uid || color_mode > 1) connect_to_metadata_pattr();
|
||||
@@ -1722,23 +1743,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 +1832,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 +1867,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 +1903,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 +1925,6 @@ function ondblclick(x,y,but,cmd,shift,capslock,option,ctrl)
|
||||
outlet(0, 'recall', last_hovered);
|
||||
}
|
||||
}
|
||||
|
||||
last_x = x;
|
||||
last_y = y - y_offset;
|
||||
}
|
||||
@@ -1863,18 +1933,31 @@ ondblclick.local = 1;
|
||||
function ondrag(x,y,but,cmd,shift,capslock,option,ctrl)
|
||||
{
|
||||
if (pattrstorage_name != null) {
|
||||
if (is_dragging === 0 && !but) {
|
||||
// Triggering onclick() interactions when click releases if no drag happened
|
||||
onclick(x, y, 0, cmd, shift, capslock, option, ctrl);
|
||||
}
|
||||
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 (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 +1993,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,49 +2026,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) {
|
||||
} 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 < drag_interp_radius) {
|
||||
var interp_factor = 1 - (dist_from_mouse / drag_interp_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 + y_offset, but, cmd, shift, capslock, option, ctrl);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2025,12 +2110,15 @@ onresize.local = 1;
|
||||
// in which case we resize it to a more convenient size to start with.
|
||||
if (ui_width == 64 && ui_height == 64) {
|
||||
box.setboxattr("patching_rect", box.rect[0], box.rect[1], 130, 58);
|
||||
box.setboxattr("presentation_rect", box.rect[0], box.rect[1], 130, 58);
|
||||
}
|
||||
// Allows for dynamic resizing even in presentation mode (addressing the limitation of onresize())
|
||||
// Allows for dynamic resizing even in presentation mode (addressing the limitation of onresize() in jsui)
|
||||
if (is_jsui) {
|
||||
var pres_rect = new MaxobjListener(this.box,"presentation_rect",get_prect);
|
||||
}
|
||||
function get_prect(prect) {
|
||||
// post(this.patcher.wind.assoc.getattr("globalpatchername") == max.frontpatcher.wind.assoc.getattr("globalpatchername") ? 1 : 0, "\n")
|
||||
onresize(prect.value[2], prect.value[3])
|
||||
onresize(prect.value[2], prect.value[3], "from_maxobjlistener");
|
||||
}
|
||||
get_prect.local = 1;
|
||||
|
||||
@@ -2064,6 +2152,9 @@ function setpattrstorage(v){
|
||||
} else {
|
||||
pattrstorage_name = arrayfromargs(arguments)[0];
|
||||
}
|
||||
if (has_loaded) {
|
||||
do_loadbang();
|
||||
}
|
||||
}
|
||||
setpattrstorage.local = 1;
|
||||
|
||||
@@ -2340,7 +2431,14 @@ 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("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});
|
||||
function setselect_mode(v) {
|
||||
@@ -2349,9 +2447,11 @@ function setselect_mode(v) {
|
||||
}
|
||||
setselect_mode.local = 1;
|
||||
|
||||
declareattribute("drag_mode", null, null, 1, { style: "enumindex", enumvals: ["Disabled", "Move", "In-Line Interp", "Interp"], default: 1, label: "Drag Mode", paint: 1 });
|
||||
declareattribute("drag_mode", null, null, 1, { style: "enumindex", enumvals: ["Disabled", "Move", "Interpolate"], default: 1, label: "Drag Mode", paint: 1 });
|
||||
|
||||
declareattribute("drag_interp_radius", null, null, 1, { type: "float", min: 1, default: 1, label: "Drag Interpolation Radius" });
|
||||
declareattribute("interp_mode", null, null, 1, { style: "enumindex", enumvals: ["Disabled", "In-Line Interp", "Multi Interp"], default: 1, label: "Drag Mode"});
|
||||
|
||||
declareattribute("interp_multi_radius", null, null, 1, { type: "float", min: 1, default: 1.5, label: "Interp Multi Radius" });
|
||||
|
||||
declareattribute("color_mode", null, "setcolor_mode", 1, {type: "long", min: 0, max: 3, style: "enumindex", enumvals: ["Classic", "Cycle", "Select", "Custom"], label: "Color Mode", category: "Appearance"});
|
||||
function setcolor_mode(v){
|
||||
@@ -2503,6 +2603,12 @@ function setrecall_passthrough(v){
|
||||
}
|
||||
setrecall_passthrough.local = 1;
|
||||
|
||||
declareattribute("store_passthrough", null, "setstore_passthrough", 1, {style: "onoff", label: "Store Passthrough"});
|
||||
function setstore_passthrough(v){
|
||||
store_passthrough = v > 0;
|
||||
}
|
||||
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;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name" : "tc.preset",
|
||||
"displayname" : "",
|
||||
"version" : "1.4.0",
|
||||
"version" : "1.5.3",
|
||||
"author" : "Théophile Clet",
|
||||
"authors" : [ ],
|
||||
"description" : "A jsui replacement for the preset object",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name" : "tc.preset",
|
||||
"displayname" : "",
|
||||
"version" : "1.4.0",
|
||||
"version" : "1.5.3",
|
||||
"author" : "Théophile Clet",
|
||||
"authors" : [ ],
|
||||
"description" : "A v8ui replacement for the preset object",
|
||||
|
||||
Reference in New Issue
Block a user