Compare commits
27 Commits
e997380e76
...
main
Author | SHA1 | Date | |
---|---|---|---|
6b07a8e90b | |||
aa2359c468 | |||
69cbe9b235 | |||
76ad31163f | |||
4df1c2b7e1 | |||
5b3b12e613 | |||
f9a3711507 | |||
af803d109e | |||
3214f0c673 | |||
65dd0ca8e0 | |||
83dc04b993 | |||
6f7ac37a05 | |||
5792689842 | |||
1f6e2b5c5a | |||
3b387c66d2 | |||
e07e8ef9ca | |||
8b91c7ad5d | |||
f0a41a6687 | |||
198718e2d2 | |||
03fb521851 | |||
c82a9053bb | |||
b85e2ff66b | |||
66faf94f77 | |||
8149b21855 | |||
2b27dee78f | |||
ec4e876d09 | |||
8c9691e18f |
@@ -17,7 +17,7 @@ A [jsui] replacement for the [preset] object in Cycling'74 Max.
|
||||
- More look customization
|
||||
- Dynamically adapts to resize both in Edit and Presentation mode
|
||||
- Select mode: simple click selects the slot, double click recalls it (allows for organizing presets without recalling them)
|
||||
- Color mode: ability to color sstored presets with 6 customizable colors (currently colors are only assigned automatically depending on slot number)
|
||||
- Color mode: various ways to colorize preset slots
|
||||
|
||||
## How to install
|
||||
- [Download](https://github.com/Teufeuleu/tc.preset/archive/refs/heads/main.zip) this repository (and please consider donating on the [gumroad page](https://glucose47.gumroad.com/l/tc_preset) if you like this package)
|
||||
|
@@ -53,12 +53,24 @@
|
||||
<description>Function depends on inlet</description>
|
||||
</method> -->
|
||||
<method name="color_wheel">
|
||||
<digest>Set the slot colors</digest>
|
||||
<digest>Define color wheel colors</digest>
|
||||
<description>The message "color_wheel", followed by an integer and four float, defines one of the 6 available slot colors when color_mode is enabled.
|
||||
The integer argument, between 1 and 6, defines which color in being modifier, and next the four floats define the color in the RGBA format.
|
||||
The integer argument, between 1 and 6, defines which color in being modified, and next the four floats define the color in the RGBA format.
|
||||
The message "color_wheel" without argument resets the six colors to their default values.
|
||||
</description>
|
||||
</method>
|
||||
<method name="setcolor">
|
||||
<digest>Set the preset colors</digest>
|
||||
<description>The message "setcolor" allows to set the color of a preset as shown when in color_mode 2 (select) or 3 (custom).
|
||||
With 1 or 2 integer arguments, it allows to set a preset color as seen in color mode 2. With 4 float arguments or 1 integer followed by 4 floats, it allows to set a preset color for the color mode 3.
|
||||
With 1 integer argument, the currently selected preset color wheel's color is set to the argument's value.
|
||||
With two integer arguments, the preset number defined by first argument is set to color wheel's color defined by the second argument.
|
||||
With 4 float arguments, the currently selected preset is set to a custom color defined by the four arguments (in RGBA format).
|
||||
With 1 integer followed by 4 float arguments, the preset number defined by first argument is set to a custom color defined by the four arguments (in RGBA format).
|
||||
The integer argument, between 1 and 6, defines which color in being modifier, and next the four floats define the color in the RGBA format.
|
||||
With no argument, it resets colors for the select preset to default values.
|
||||
</description>
|
||||
</method>
|
||||
<method name="pattrstorage">
|
||||
<digest>Link to named pattrstorage object</digest>
|
||||
<description>The word 'pattrstorage' followed by the name of an existing pattrstorage links the jsui to that pattrstorage.
|
||||
@@ -66,6 +78,11 @@
|
||||
If the word `pattrstorage`is sent alone, the jsui is unlinked from any pattrstorage.
|
||||
</description>
|
||||
</method>
|
||||
<method name="recall_filled">
|
||||
<digest>Recalls nth filled preset</digest>
|
||||
<description>Recalls the nth filled preset. Example: 'recall_filled 3' will recall the third available filled preset from the preset list, regardless of its slot number.
|
||||
</description>
|
||||
</method>
|
||||
<method name="resync">
|
||||
<digest>Resync the jsui to the pattrstorage</digest>
|
||||
<description>The word 'resync' will repopulate the jsui with the current preset list from the pattrstorage. It is usefull in case you add/remove/edit presets without using the jsui.
|
||||
@@ -113,7 +130,13 @@
|
||||
</attribute>
|
||||
<attribute name='color_mode' get='1' set='1' type='int' size='1' >
|
||||
<digest>Color mode</digest>
|
||||
<description>When set to 0, all preset slots have the same color (same as the preset object). When set to 1, stored preset slots are colored. See color_1 to color_6 as well as the color_wheel message.</description>
|
||||
<description>When set to 0, all preset slots have the same color (same as the preset object) defined by the stored_slot_color attribute.
|
||||
When set to 1, stored preset slots are colored according to one of the six colors of the color wheel, in a repeating pattern.
|
||||
In mode 2, stored preset colors can be freely set to one of the six colors of the color wheel.
|
||||
In mode 3, stored preset color can be set to any color in RGBA format.
|
||||
To define colors of the color wheel for modes 1 and 2, see color_1 to color_6 as well as the color_wheel message.
|
||||
To define preset color as in mode 2 or 3, see the setcolor message. Modes 2 and 3 require a pattr object named 'preset_color' to be at the same patcher level as the tc.preset object.
|
||||
</description>
|
||||
</attribute>
|
||||
<attribute name='color_1' get='1' set='1' type='list' size='4' >
|
||||
<digest>Slot color 1</digest>
|
||||
@@ -156,6 +179,10 @@
|
||||
<digest>Object margin</digest>
|
||||
<description>Defines the size, in pixels, of the margin between the jsui border and the preset slots.</description>
|
||||
</attribute>
|
||||
<attribute name='menu_mode' get='1' set='1' type='int' size='1' >
|
||||
<digest>Menu mode</digest>
|
||||
<description>Populates the umenu connected to 2nd outlet with preset number and name (0), preset number only (1), or name only (2). See recall_filled when using mode 2</description>
|
||||
</attribute>
|
||||
<attribute name='min_rows' get='1' set='1' type='int' size='1' >
|
||||
<digest>Minimum number of rows to display</digest>
|
||||
<description>Defines the minimum number of rows to display if scrollable is enabled and layout is set to 1.
|
||||
@@ -164,7 +191,7 @@
|
||||
</attribute>
|
||||
<attribute name='scrollable' get='1' set='1' type='int' size='1' >
|
||||
<digest>Scroll through your presets</digest>
|
||||
<description>When set to 1, you can through the jsui to see all your presets, or at least up to the slot number defined by the min_rows attributes. Currently only works with the list layout.
|
||||
<description>When set to 1, you can through the jsui to see all your presets, or at least up to the row defined by the min_rows attributes.
|
||||
</description>
|
||||
</attribute>
|
||||
<attribute name='select_mode' get='1' set='1' type='int' size='1' >
|
||||
|
@@ -4,7 +4,7 @@
|
||||
"appversion" : {
|
||||
"major" : 8,
|
||||
"minor" : 6,
|
||||
"revision" : 3,
|
||||
"revision" : 4,
|
||||
"architecture" : "x64",
|
||||
"modernui" : 1
|
||||
}
|
||||
@@ -26,7 +26,7 @@
|
||||
"toptoolbarpinned" : 2,
|
||||
"righttoolbarpinned" : 2,
|
||||
"bottomtoolbarpinned" : 2,
|
||||
"toolbars_unpinned_last_save" : 0,
|
||||
"toolbars_unpinned_last_save" : 15,
|
||||
"tallnewobj" : 0,
|
||||
"boxanimatetime" : 200,
|
||||
"enablehscroll" : 0,
|
||||
@@ -80,7 +80,7 @@
|
||||
}
|
||||
, {
|
||||
"box" : {
|
||||
"embedstate" : [ [ "color_1", 0.743, 0.41, 0.501, 1 ], [ "autowriteagain", 0 ], [ "layout", 1 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "empty_slot_color", 0.349, 0.349, 0.349, 1 ], [ "color_mode", 0 ], [ "stored_slot_color", 0.502, 0.502, 0.502, 1 ], [ "active_slot_color", 0.808, 0.898, 0.91, 1 ], [ "bgcolor", 0.2, 0.2, 0.2, 1 ], [ "slot_round", 0 ], [ "margin", 4 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "fontsize", 14 ], [ "text_color", 0.129, 0.129, 0.129, 1 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "scrollable", 1 ], [ "fontname", "Arial" ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "ignoreslotzero", 1 ], [ "min_rows", 50 ], [ "text_bg_color", 1, 1, 1, 0.5 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "display_interp", 1 ], [ "bubblesize", 14 ], [ "spacing", 4 ], [ "select_mode", 0 ] ],
|
||||
"embedstate" : [ [ "spacing", 4 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "text_bg_color", 1, 1, 1, 0.5 ], [ "color_1", 0.743, 0.41, 0.501, 1 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "select_mode", 0 ], [ "scrollable", 0 ], [ "bubblesize", 14 ], [ "margin", 4 ], [ "fontsize", 14 ], [ "color_mode", 0 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "ignoreslotzero", 1 ], [ "min_rows", 10 ], [ "stored_slot_color", 0.502, 0.502, 0.502, 1 ], [ "fontname", "Arial" ], [ "empty_slot_color", 0.349, 0.349, 0.349, 1 ], [ "text_color", 0.129, 0.129, 0.129, 1 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "display_interp", 1 ], [ "bgcolor", 0.2, 0.2, 0.2, 1 ], [ "slot_round", 0 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "active_slot_color", 0.808, 0.898, 0.91, 1 ], [ "autowriteagain", 0 ], [ "layout", 1 ] ],
|
||||
"filename" : "tc.preset",
|
||||
"id" : "obj-8",
|
||||
"maxclass" : "jsui",
|
||||
@@ -134,7 +134,7 @@
|
||||
}
|
||||
, {
|
||||
"box" : {
|
||||
"embedstate" : [ [ "color_1", 0.743, 0.41, 0.501, 1 ], [ "autowriteagain", 0 ], [ "layout", 0 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "empty_slot_color", 0.349, 0.349, 0.349, 1 ], [ "color_mode", 0 ], [ "stored_slot_color", 0.502, 0.502, 0.502, 1 ], [ "active_slot_color", 0.808, 0.898, 0.91, 1 ], [ "bgcolor", 0.2, 0.2, 0.2, 1 ], [ "slot_round", 0 ], [ "margin", 4 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "fontsize", 14 ], [ "text_color", 0.129, 0.129, 0.129, 1 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "scrollable", 1 ], [ "fontname", "Arial" ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "ignoreslotzero", 1 ], [ "min_rows", 50 ], [ "text_bg_color", 1, 1, 1, 0.5 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "display_interp", 1 ], [ "bubblesize", 14 ], [ "spacing", 4 ], [ "select_mode", 0 ] ],
|
||||
"embedstate" : [ [ "spacing", 4 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "text_bg_color", 1, 1, 1, 0.5 ], [ "color_1", 0.743, 0.41, 0.501, 1 ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "select_mode", 0 ], [ "scrollable", 0 ], [ "bubblesize", 14 ], [ "margin", 4 ], [ "fontsize", 14 ], [ "color_mode", 0 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "ignoreslotzero", 1 ], [ "min_rows", 10 ], [ "stored_slot_color", 0.502, 0.502, 0.502, 1 ], [ "fontname", "Arial" ], [ "empty_slot_color", 0.349, 0.349, 0.349, 1 ], [ "text_color", 0.129, 0.129, 0.129, 1 ], [ "color_6", 0.316, 0.616, 0.377, 1 ], [ "display_interp", 1 ], [ "bgcolor", 0.2, 0.2, 0.2, 1 ], [ "slot_round", 0 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "active_slot_color", 0.808, 0.898, 0.91, 1 ], [ "autowriteagain", 0 ], [ "layout", 0 ] ],
|
||||
"filename" : "tc.preset",
|
||||
"id" : "obj-3",
|
||||
"maxclass" : "jsui",
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,2 +1,2 @@
|
||||
max objectfile tc.preset tc.preset;
|
||||
max definesubstitution tc.preset jsui @filename tc.preset
|
||||
max definesubstitution tc.preset jsui @filename tc.preset;
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
643
snippets/tc.preset all-in-one-color.maxsnip
Normal file
643
snippets/tc.preset all-in-one-color.maxsnip
Normal file
File diff suppressed because one or more lines are too long
@@ -400,7 +400,7 @@
|
||||
"numinlets" : 1,
|
||||
"filename" : "tc.preset.js",
|
||||
"numoutlets" : 4,
|
||||
"embedstate" : [ [ "bgcolor", 0.2, 0.2, 0.2, 1 ], [ "active_slot_color", 0.808, 0.898, 0.91, 1 ], [ "fontname", "Arial" ], [ "pattrstorage", "mypat" ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "text_bg_color", 1, 1, 1, 0.5 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "layout", 0 ], [ "spacing", 4 ], [ "autowriteagain", 0 ], [ "scrollable", 1 ], [ "empty_slot_color", 0.349, 0.349, 0.349, 1 ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "ignoreslotzero", 1 ], [ "slot_round", 0 ], [ "stored_slot_color", 0.502, 0.502, 0.502, 1 ], [ "bubblesize", 14 ], [ "min_rows", 50 ], [ "display_interp", 1 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "text_color", 0.129, 0.129, 0.129, 1 ], [ "margin", 4 ], [ "select_mode", 0 ], [ "fontsize", 14 ], [ "color_1", 0.743, 0.41, 0.501, 1 ], [ "color_mode", 0 ], [ "color_6", 0.316, 0.616, 0.377, 1 ] ]
|
||||
"embedstate" : [ [ "bgcolor", 0.2, 0.2, 0.2, 1 ], [ "active_slot_color", 0.808, 0.898, 0.91, 1 ], [ "fontname", "Arial" ], [ "pattrstorage", "mypat" ], [ "color_2", 0.679, 0.405, 0.669, 1 ], [ "text_bg_color", 1, 1, 1, 0.5 ], [ "interp_slot_color", 1, 1, 1, 0.8 ], [ "color_3", 0.527, 0.459, 0.756, 1 ], [ "layout", 0 ], [ "spacing", 4 ], [ "autowriteagain", 0 ], [ "scrollable", 0 ], [ "empty_slot_color", 0.349, 0.349, 0.349, 1 ], [ "color_4", 0.367, 0.542, 0.712, 1 ], [ "ignoreslotzero", 1 ], [ "slot_round", 0 ], [ "stored_slot_color", 0.502, 0.502, 0.502, 1 ], [ "bubblesize", 14 ], [ "min_rows", 10 ], [ "display_interp", 1 ], [ "color_5", 0.283, 0.606, 0.559, 1 ], [ "text_color", 0.129, 0.129, 0.129, 1 ], [ "margin", 4 ], [ "select_mode", 0 ], [ "fontsize", 14 ], [ "color_1", 0.743, 0.41, 0.501, 1 ], [ "color_mode", 0 ], [ "color_6", 0.316, 0.616, 0.377, 1 ] ]
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user