Compare commits

..

5 Commits

Author SHA1 Message Date
tfl
4d3d98fcc3 changed from rgb2hsl to rgb2luma in helpfile as more in purpose 2023-10-05 16:15:06 +02:00
tfl
1dd0cae4c3 readme update 2023-09-22 12:19:58 +02:00
tfl
c4f3c46fc6 remove ignored files 2023-09-22 11:38:25 +02:00
tfl
0f89e964b6 authoring, small jit.cubehelix.ui improvements ; ignoring old folder 2023-09-22 11:33:16 +02:00
tfl
d71de75956 added missing js 2023-09-22 11:32:32 +02:00
13 changed files with 585 additions and 7839 deletions

4
.gitignore vendored
View File

@@ -1,6 +1,4 @@
Cubehelix_simple.maxpat
Cubehelix_old.maxpat
Cubehelix_MaxMSP.zip
old/
# General

View File

@@ -1,9 +1,27 @@
# Cubehelix for Max
By Théophile Clet - 2021-05-13
By Théophile Clet - september, 2023. First version from 2021.
https://tflcl.xyz
Original work and js code by Dave Green
http://www.mrao.cam.ac.uk/~dag/CUBEHELIX
![jit.cubehelix.ui](img/jit.cubehelix.ui.png)
## What is this
This is an implementation of cubehelix color palette generator algorithm for Cycling74```s Max.
It consists of a few files:
- ```cubehelix.genjit``` which is the "low-level" code for cubehlix calculation in the jit world
- ```jit.cubehelix.maxpat```, an abstraction wrapping ```cubehelix.genjit``` as a patcher with some added features for convenience: initialization with attributes, accepts inputs for both ranges (like the D3 implementation) and legacy parameters (start, rotation), converts output matrix...
- ```jit.cubehelix.maxhelp```, the help file for the \[jit.cubehelix\] abstraction, with examples and explanations
- ```jit.cubehelix.ui.maxpat```, which is basically a wrapper for \[jit.cubehelix\] with an user interface (can be used as a \[bpatcher\]), randomization capabilities and preset handling (using the pattr system).
- ```knob-range.js```, a custom \[jsui\] knob made for \[jit.cubehelix.ui\] but which can be repurposed for other things. It allows to set a custom output range, randomize the value in an inner range that can be modified with ctrl+drag (change offset) and option/alt+drag (change width). Holding shift allows fine tuning.
- ```cubehelixui-default```, some default presets for \[jit.cubehelix.ui\].
Green, D. A., 2011, `A colour scheme for the display of astronomical intensity images', Bulletin of the Astronomical Society of India, 39, 289.
http://astron-soc.in/bulletin/11June/289392011.pdf
## How to use
1. Clone this repo
2. Put the folder in your Max search paths
3. Start patching. \[jit.cubehelix\] and its helper file are a good starting point.
## Credits
Heavily based on [@mbostock cubehelix implementation in D3.js](https://github.com/d3/d3-plugins/tree/master/cubehelix).
Original cubehelix by Dave Green: [Green, D. A., 2011, "A colour scheme for the display of astronomical intensity images", *Bulletin of the Astronomical Society of India*, 39, 289.](http://astron-soc.in/bulletin/11June/289392011.pdf)
![jit.cubehelix helper file example 1](img/jit.cubehelix.maxhelp.1.png)
![jit.cubehelix helper file example 2](img/jit.cubehelix.maxhelp.2.png)

View File

@@ -1,6 +1,6 @@
{
"pattrstorage" : {
"name" : "#0-cubehelixui",
"name" : "1002-cubehelixui",
"slots" : {
"1" : {
"id" : 1,
@@ -8,15 +8,15 @@
"alpha_last" : [ 0.0 ],
"colormodeoutput" : [ 0.0 ],
"dim" : [ 128 ],
"e_h" : [ -0.666666, 0, 1, 0 ],
"e_l" : [ 1, 0, 1, 0 ],
"e_s" : [ 0.5, 0, 1, 0 ],
"e_h" : [ -0.666666, -1.0, 1, 0 ],
"e_l" : [ 1, 0.0, 1, 0 ],
"e_s" : [ 0.5, 0.0, 2, 0 ],
"flip" : [ 0.0 ],
"gamma" : [ 1, 0.166666666666667, 0.5, 0 ],
"gamma" : [ 1, 0.5, 1.5, 0 ],
"listoutput" : [ 0.0 ],
"s_h" : [ 0.888888, 0, 1, 0 ],
"s_l" : [ 0, 0, 1, 0 ],
"s_s" : [ 0.619999999999999, 0, 1, 0 ]
"s_h" : [ 0.888888, -1.0, 1, 0 ],
"s_l" : [ 0, 0.0, 1, 0 ],
"s_s" : [ 0.5, 0.0, 2, 0 ]
}
}
@@ -27,15 +27,15 @@
"alpha_last" : [ 0.0 ],
"colormodeoutput" : [ 0.0 ],
"dim" : [ 128 ],
"e_h" : [ 0.165999999999999, 0, 1, 0 ],
"e_h" : [ 0.16666666, -1, 1, 0 ],
"e_l" : [ 1, 0, 1, 0 ],
"e_s" : [ 0.5, 0, 1, 0 ],
"e_s" : [ 0.5, 0, 2, 0 ],
"flip" : [ 0.0 ],
"gamma" : [ 1, 0.166666666666667, 0.5, 0 ],
"gamma" : [ 1, 0.5, 1.5, 0 ],
"listoutput" : [ 0.0 ],
"s_h" : [ -0.611112000000001, 0, 1, 0 ],
"s_h" : [ -0.611112000000001, -1, 1, 0 ],
"s_l" : [ 0, 0, 1, 0 ],
"s_s" : [ 0.619999999999999, 0, 1, 0 ]
"s_s" : [ 0.619999999999999, 0, 2, 0 ]
}
}
@@ -46,15 +46,15 @@
"alpha_last" : [ 0.0 ],
"colormodeoutput" : [ 0.0 ],
"dim" : [ 128 ],
"e_h" : [ 0.193999999999999, 0.465, 0.715, 0 ],
"e_h" : [ 0.1944444, -0.0064444, 0.3944444, 0 ],
"e_l" : [ 0.8, 0, 1, 1 ],
"e_s" : [ 1.500000000000001, 0, 1, 1 ],
"e_s" : [ 1.500000000000001, 0, 2, 1 ],
"flip" : [ 0.0 ],
"gamma" : [ 1, 0.166666666666667, 0.5, 1 ],
"gamma" : [ 1, 0.5, 1.5, 1 ],
"listoutput" : [ 0.0 ],
"s_h" : [ 0.75, 0.765, 1, 0 ],
"s_h" : [ 0.75, 0.55, 0.95, 0 ],
"s_l" : [ 0.35, 0, 1, 1 ],
"s_s" : [ 0.748, 0, 1, 1 ]
"s_s" : [ 0.748, 0, 2, 1 ]
}
}
@@ -65,15 +65,15 @@
"alpha_last" : [ 0.0 ],
"colormodeoutput" : [ 0.0 ],
"dim" : [ 128 ],
"e_h" : [ 0.265999999999999, 0.52, 0.74, 0 ],
"e_h" : [ 0.2666666, 0.0666666, 0.4666666, 0 ],
"e_l" : [ 1, 0, 1, 1 ],
"e_s" : [ 0.6, 0, 1, 1 ],
"e_s" : [ 0.6, 0.0, 2, 1 ],
"flip" : [ 0.0 ],
"gamma" : [ 1, 0.166666666666667, 0.5, 1 ],
"gamma" : [ 1, 0.8, 1.2, 1 ],
"listoutput" : [ 0.0 ],
"s_h" : [ 0.766, 0.76, 1, 0 ],
"s_h" : [ 0.766666, 0.566666, 0.96666666, 0 ],
"s_l" : [ 0, 0, 1, 1 ],
"s_s" : [ 0.6, 0, 1, 1 ]
"s_s" : [ 0.6, 0.0, 2, 1 ]
}
}
@@ -84,15 +84,15 @@
"alpha_last" : [ 0.0 ],
"colormodeoutput" : [ 0.0 ],
"dim" : [ 128 ],
"e_h" : [ 0.163999999999999, 0.465, 0.715, 0 ],
"e_l" : [ 1, 0, 1, 1 ],
"e_s" : [ 0.6, 0, 1, 1 ],
"e_h" : [ 0.166667, -0.0333333, 0.366666, 0 ],
"e_l" : [ 1, 0.0, 1, 1 ],
"e_s" : [ 0.6, 0.0, 2, 1 ],
"flip" : [ 0.0 ],
"gamma" : [ 1, 0.166666666666667, 0.5, 1 ],
"gamma" : [ 1, 0.8, 1.2, 1 ],
"listoutput" : [ 0.0 ],
"s_h" : [ -0.332000000000001, 0.225, 0.46, 0 ],
"s_h" : [ -0.333333, -0.533333, -0.133333, 0 ],
"s_l" : [ 0, 0, 1, 1 ],
"s_s" : [ 0.6, 0, 1, 1 ]
"s_s" : [ 0.6, 0.0, 2, 1 ]
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

BIN
img/jit.cubehelix.ui.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

View File

@@ -354,7 +354,7 @@
}
,
"classnamespace" : "box",
"rect" : [ 0.0, 26.0, 747.0, 535.0 ],
"rect" : [ 85.0, 126.0, 747.0, 561.0 ],
"bglocked" : 0,
"openinpresentation" : 0,
"default_fontsize" : 12.0,
@@ -385,6 +385,18 @@
"assistshowspatchername" : 0,
"title" : "History",
"boxes" : [ {
"box" : {
"id" : "obj-11",
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 2,
"outlettype" : [ "jit_matrix", "" ],
"patching_rect" : [ 15.0, 398.0, 71.0, 22.0 ],
"text" : "jit.rgb2luma"
}
}
, {
"box" : {
"id" : "obj-4",
"maxclass" : "jit.pwindow",
@@ -515,8 +527,8 @@
"numinlets" : 1,
"numoutlets" : 3,
"outlettype" : [ "jit_matrix", "jit_matrix", "" ],
"patching_rect" : [ 15.0, 363.0, 244.0, 22.0 ],
"text" : "jit.cubehelix @dim 100 @coloroutputmode 1"
"patching_rect" : [ 15.0, 363.0, 194.0, 22.0 ],
"text" : "jit.cubehelix @type char @dim 100"
}
}
@@ -584,18 +596,6 @@
"textcolor" : [ 0.0, 0.0, 0.0, 1.0 ]
}
}
, {
"box" : {
"id" : "obj-15",
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 5,
"outlettype" : [ "jit_matrix", "jit_matrix", "jit_matrix", "jit_matrix", "" ],
"patching_rect" : [ 15.0, 404.0, 69.0, 22.0 ],
"text" : "jit.unpack 4"
}
}
, {
"box" : {
@@ -606,7 +606,7 @@
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 303.0, 394.0, 168.0, 39.0 ],
"text" : "Shows only lightness channel"
"text" : "Shows perceived brightness"
}
}
@@ -638,7 +638,7 @@
],
"lines" : [ {
"patchline" : {
"destination" : [ "obj-15", 0 ],
"destination" : [ "obj-11", 0 ],
"source" : [ "obj-1", 0 ]
}
@@ -660,7 +660,7 @@
, {
"patchline" : {
"destination" : [ "obj-2", 0 ],
"source" : [ "obj-15", 3 ]
"source" : [ "obj-11", 0 ]
}
}
@@ -765,7 +765,7 @@
}
,
"classnamespace" : "box",
"rect" : [ 0.0, 26.0, 747.0, 535.0 ],
"rect" : [ 0.0, 26.0, 747.0, 561.0 ],
"bglocked" : 0,
"openinpresentation" : 0,
"default_fontsize" : 12.0,
@@ -1280,7 +1280,7 @@
}
,
"classnamespace" : "box",
"rect" : [ 85.0, 152.0, 747.0, 535.0 ],
"rect" : [ 0.0, 26.0, 747.0, 561.0 ],
"bglocked" : 0,
"openinpresentation" : 0,
"default_fontsize" : 12.0,
@@ -1311,6 +1311,18 @@
"assistshowspatchername" : 0,
"title" : "jit.cubehelix.ui",
"boxes" : [ {
"box" : {
"id" : "obj-7",
"maxclass" : "message",
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 339.0, 196.0, 65.0, 22.0 ],
"text" : "randomize"
}
}
, {
"box" : {
"bubble" : 1,
"id" : "obj-11",
@@ -1329,8 +1341,8 @@
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 339.0, 253.5, 112.0, 24.0 ],
"text" : "Change settings"
"patching_rect" : [ 339.0, 253.5, 221.0, 24.0 ],
"text" : "Change settings, try different presets"
}
}
@@ -1550,11 +1562,18 @@
}
, {
"patchline" : {
"destination" : [ "obj-1", 0 ],
"midpoints" : [ 348.5, 189.0, 325.0, 189.0, 325.0, 114.0, 24.5, 114.0 ],
"destination" : [ "obj-7", 0 ],
"source" : [ "obj-6", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-1", 0 ],
"midpoints" : [ 348.5, 219.0, 326.0, 219.0, 326.0, 114.0, 24.5, 114.0 ],
"source" : [ "obj-7", 0 ]
}
}
]
}
@@ -2009,6 +2028,13 @@
"type" : "gJIT",
"implicit" : 1
}
, {
"name" : "cubehelixui-default.json",
"bootpath" : "D:/_MAX/_RESSOURCE/Cubehelix_color_MaxMSP",
"patcherrelativepath" : ".",
"type" : "JSON",
"implicit" : 1
}
, {
"name" : "jit.cubehelix.maxpat",
"bootpath" : "D:/_MAX/_RESSOURCE/Cubehelix_color_MaxMSP",
@@ -2029,8 +2055,8 @@
}
, {
"name" : "knob-range.js",
"bootpath" : "D:/_MAX/_RESSOURCE/tc.utils/jsui_knob",
"patcherrelativepath" : "../tc.utils/jsui_knob",
"bootpath" : "D:/_MAX/_RESSOURCE/Cubehelix_color_MaxMSP",
"patcherrelativepath" : ".",
"type" : "TEXT",
"implicit" : 1
}

View File

@@ -10,7 +10,7 @@
}
,
"classnamespace" : "box",
"rect" : [ 245.0, 320.0, 979.0, 679.0 ],
"rect" : [ 139.0, 264.0, 667.0, 444.0 ],
"bglocked" : 0,
"openinpresentation" : 1,
"default_fontsize" : 12.0,
@@ -93,7 +93,7 @@
"numinlets" : 1,
"numoutlets" : 2,
"outlettype" : [ "", "" ],
"patching_rect" : [ 804.0, 244.0, 29.5, 22.0 ],
"patching_rect" : [ 806.0, 242.0, 29.5, 22.0 ],
"text" : "t l l"
}
@@ -105,7 +105,7 @@
"numinlets" : 2,
"numoutlets" : 2,
"outlettype" : [ "", "" ],
"patching_rect" : [ 804.0, 313.0, 39.0, 22.0 ],
"patching_rect" : [ 806.0, 311.0, 39.0, 22.0 ],
"text" : "zl.join"
}
@@ -117,7 +117,7 @@
"numinlets" : 1,
"numoutlets" : 2,
"outlettype" : [ "bang", "bang" ],
"patching_rect" : [ 804.0, 45.305826558368722, 32.0, 22.0 ],
"patching_rect" : [ 806.0, 43.305826558368722, 32.0, 22.0 ],
"text" : "t b b"
}
@@ -129,7 +129,7 @@
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 892.0, 237.0, 52.0, 22.0 ],
"patching_rect" : [ 894.0, 235.0, 52.0, 22.0 ],
"text" : "300 410"
}
@@ -141,7 +141,7 @@
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 824.0, 282.28640450407795, 87.0, 22.0 ],
"patching_rect" : [ 826.0, 280.28640450407795, 87.0, 22.0 ],
"text" : "vexpr $i1 + $i2"
}
@@ -153,7 +153,7 @@
"numinlets" : 2,
"numoutlets" : 2,
"outlettype" : [ "", "" ],
"patching_rect" : [ 804.0, 207.0, 55.0, 22.0 ],
"patching_rect" : [ 806.0, 205.0, 55.0, 22.0 ],
"text" : "zl.slice 2"
}
@@ -165,7 +165,7 @@
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "bang" ],
"patching_rect" : [ 804.0, 13.0, 58.0, 22.0 ],
"patching_rect" : [ 806.0, 12.0, 58.0, 22.0 ],
"text" : "loadbang"
}
@@ -177,7 +177,7 @@
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 804.0, 77.5, 90.0, 22.0 ],
"patching_rect" : [ 806.0, 75.5, 90.0, 22.0 ],
"text" : "window getsize"
}
@@ -191,7 +191,7 @@
"numinlets" : 2,
"numoutlets" : 2,
"outlettype" : [ "", "" ],
"patching_rect" : [ 804.0, 176.106797993183136, 59.0, 22.0 ],
"patching_rect" : [ 806.0, 174.106797993183136, 59.0, 22.0 ],
"text" : "route size"
}
@@ -205,7 +205,7 @@
"numinlets" : 2,
"numoutlets" : 2,
"outlettype" : [ "", "" ],
"patching_rect" : [ 804.0, 148.029120743274689, 79.0, 22.0 ],
"patching_rect" : [ 806.0, 146.029120743274689, 79.0, 22.0 ],
"text" : "route window"
}
@@ -219,7 +219,7 @@
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 804.0, 356.28640450407795, 208.0, 22.0 ],
"patching_rect" : [ 806.0, 354.28640450407795, 208.0, 22.0 ],
"text" : "window size $1 $2 $3 $4, window exec"
}
@@ -231,7 +231,7 @@
"numinlets" : 1,
"numoutlets" : 2,
"outlettype" : [ "", "" ],
"patching_rect" : [ 804.0, 114.106797993183136, 67.0, 22.0 ],
"patching_rect" : [ 806.0, 112.106797993183136, 67.0, 22.0 ],
"save" : [ "#N", "thispatcher", ";", "#Q", "end", ";" ],
"text" : "thispatcher"
}
@@ -245,7 +245,7 @@
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 587.0, 550.687592625617981, 448.300971925258636, 103.0 ],
"text" : "TODO:\n- Make pattrstorage store scaled values for the range (more meaningfull to user)\n- Implement a special mode for the end color hue to act as an offset from the start hue (basically make it a \"rotation\" setting), with a selection of some default values (complementary, \n- Allow to set knob settings from inlet with messages such as 'start_hue 0. -0.5 0.5 0' (value of 0., random range of -0.5, 0.5 and locked to 0)"
"text" : "TODO:\n- Implement a special mode for the end color hue to act as an offset from the start hue (basically make it a \"rotation\" setting), with a selection of some default values (complementary, \n- Allow to set knob settings from inlet with messages such as 'start_hue 0. -0.5 0.5 0' (value of 0., random range of -0.5, 0.5 and locked to 0)\n- code factorisation?"
}
}
@@ -258,7 +258,7 @@
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 432.0, 600.0, 50.0, 36.0 ],
"text" : "-0.323996"
"text" : "-0.666666"
}
}
@@ -386,15 +386,15 @@
"alpha_last" : [ 0.0 ],
"colormodeoutput" : [ 0.0 ],
"dim" : [ 128 ],
"e_h" : [ -0.323995549892999, 0.25, 0.75, 0 ],
"e_l" : [ 0.750656257113465, 0, 1, 0 ],
"e_s" : [ 1.895719982930721, 0, 1, 0 ],
"e_h" : [ -0.666666, -1, 1, 0 ],
"e_l" : [ 1, 0, 1, 0 ],
"e_s" : [ 0.5, 0, 2, 0 ],
"flip" : [ 0.0 ],
"gamma" : [ 0.526810515230414, 0.166666666666667, 0.5, 0 ],
"gamma" : [ 1, 0.5, 1.5, 0 ],
"listoutput" : [ 0.0 ],
"s_h" : [ 0.247902265609083, 0.25, 0.75, 0 ],
"s_l" : [ 0.499595442526692, 0, 1, 0 ],
"s_s" : [ 1.855728608182778, 0, 1, 0 ]
"s_h" : [ 0.888888, -1, 1, 0 ],
"s_l" : [ 0, 0, 1, 0 ],
"s_s" : [ 0.5, 0, 2, 0 ]
}
,
"text" : "autopattr",
@@ -573,10 +573,10 @@
"outlettype" : [ "" ],
"patching_rect" : [ 400.892822000000024, 63.927735401886025, 334.0, 22.0 ],
"saved_object_attributes" : {
"client_rect" : [ 8, 111, 541, 516 ],
"client_rect" : [ 27, 158, 514, 944 ],
"parameter_enable" : 0,
"parameter_mappable" : 0,
"storage_rect" : [ 200, 200, 800, 500 ]
"storage_rect" : [ 25, 107, 816, 991 ]
}
,
"text" : "pattrstorage #0-cubehelixui @autorestore 0 @savemode 3",
@@ -591,8 +591,8 @@
"numinlets" : 4,
"numoutlets" : 4,
"outlettype" : [ "", "", "", "" ],
"patching_rect" : [ 197.392822203773534, 45.305826558368722, 173.0, 22.0 ],
"text" : "route dim bang to_pattrstorage"
"patching_rect" : [ 197.392822203773534, 45.305826558368722, 202.0, 22.0 ],
"text" : "route dim randomize to_pattrstorage"
}
}
@@ -697,7 +697,7 @@
"box" : {
"comment" : "Unprocessed matrix (ARGB)",
"id" : "obj-5",
"index" : 2,
"index" : 0,
"maxclass" : "outlet",
"numinlets" : 1,
"numoutlets" : 0,
@@ -951,7 +951,7 @@
"box" : {
"comment" : "Outputs colors as lists",
"id" : "obj-80",
"index" : 3,
"index" : 0,
"maxclass" : "outlet",
"numinlets" : 1,
"numoutlets" : 0,
@@ -963,7 +963,7 @@
"box" : {
"comment" : "Processed matrix (ARGB/RGBA/AHSL/HSLA)",
"id" : "obj-79",
"index" : 1,
"index" : 0,
"maxclass" : "outlet",
"numinlets" : 1,
"numoutlets" : 0,
@@ -975,11 +975,11 @@
"box" : {
"comment" : "bang, dim, to_pattrstorage",
"id" : "obj-78",
"index" : 1,
"index" : 0,
"maxclass" : "inlet",
"numinlets" : 0,
"numoutlets" : 1,
"outlettype" : [ "bang" ],
"outlettype" : [ "" ],
"patching_rect" : [ 197.392822203773534, 9.0, 30.0, 30.0 ]
}
@@ -2234,7 +2234,7 @@
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 2,
"outlettype" : [ "bang", "bang" ],
"outlettype" : [ "randomize", "bang" ],
"patcher" : {
"fileversion" : 1,
"appversion" : {
@@ -2246,7 +2246,7 @@
}
,
"classnamespace" : "box",
"rect" : [ 59.0, 107.0, 640.0, 480.0 ],
"rect" : [ -31958.0, -31915.0, 640.0, 480.0 ],
"bglocked" : 0,
"openinpresentation" : 0,
"default_fontsize" : 12.0,
@@ -2281,7 +2281,7 @@
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 145.0, 134.0, 150.0, 62.0 ],
"patching_rect" : [ 146.0, 144.0, 150.0, 62.0 ],
"text" : "Disable auto when firing random values to avoid useless calculation and outputs"
}
@@ -2293,7 +2293,7 @@
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 78.999998203773487, 150.480584800243378, 49.0, 22.0 ],
"patching_rect" : [ 92.999998203773487, 174.0, 49.0, 22.0 ],
"text" : "auto $1"
}
@@ -2304,9 +2304,9 @@
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 4,
"outlettype" : [ "int", "bang", "bang", "int" ],
"patching_rect" : [ 50.0, 100.0, 52.0, 22.0 ],
"text" : "t 1 b b 0"
"outlettype" : [ "int", "bang", "randomize", "int" ],
"patching_rect" : [ 50.0, 100.0, 101.0, 22.0 ],
"text" : "t 1 b randomize 0"
}
}
@@ -2818,6 +2818,7 @@
"numoutlets" : 5,
"outlettype" : [ "preset", "int", "preset", "int", "" ],
"patching_rect" : [ 400.892822000000024, 212.0, 97.0, 47.0 ],
"pattrstorage" : "#0-cubehelixui",
"presentation" : 1,
"presentation_rect" : [ 0.0, 43.0, 240.829459190368652, 32.153864413499832 ],
"stored1" : [ 0.792308, 0.64636, 0.886275, 1.0 ]
@@ -3608,6 +3609,13 @@
"source" : [ "obj-7", 2 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-45", 0 ],
"source" : [ "obj-7", 0 ]
}
}
, {
"patchline" : {
@@ -3775,7 +3783,7 @@
, {
"patchline" : {
"destination" : [ "obj-93", 0 ],
"midpoints" : [ 813.5, 381.0, 789.0, 381.0, 789.0, 108.0, 813.5, 108.0 ],
"midpoints" : [ 815.5, 379.0, 791.0, 379.0, 791.0, 106.0, 815.5, 106.0 ],
"source" : [ "obj-94", 0 ]
}
@@ -3802,6 +3810,57 @@
}
],
"parameters" : {
"obj-15" : [ "live.text[2]", "live.text[1]", 0 ],
"obj-18" : [ "live.text[4]", "live.text[1]", 0 ],
"obj-50" : [ "live.text[3]", "live.text[1]", 0 ],
"obj-85" : [ "live.text[1]", "live.text[1]", 0 ],
"parameterbanks" : {
"0" : {
"index" : 0,
"name" : "",
"parameters" : [ "-", "-", "-", "-", "-", "-", "-", "-" ]
}
}
,
"inherited_shortname" : 1
}
,
"dependency_cache" : [ {
"name" : "cubehelix.genjit",
"bootpath" : "D:/_MAX/_RESSOURCE/Cubehelix_color_MaxMSP",
"patcherrelativepath" : ".",
"type" : "gJIT",
"implicit" : 1
}
, {
"name" : "cubehelixui-default.json",
"bootpath" : "D:/_MAX/_RESSOURCE/Cubehelix_color_MaxMSP",
"patcherrelativepath" : ".",
"type" : "JSON",
"implicit" : 1
}
, {
"name" : "jit.cubehelix.maxpat",
"bootpath" : "D:/_MAX/_RESSOURCE/Cubehelix_color_MaxMSP",
"patcherrelativepath" : ".",
"type" : "JSON",
"implicit" : 1
}
, {
"name" : "jit.pass.mxe64",
"type" : "mx64"
}
, {
"name" : "knob-range.js",
"bootpath" : "D:/_MAX/_RESSOURCE/tc.utils/jsui_knob",
"patcherrelativepath" : "../tc.utils/jsui_knob",
"type" : "TEXT",
"implicit" : 1
}
],
"autosave" : 0,
"bgcolor" : [ 0.611764705882353, 0.776470588235294, 0.905882352941176, 1.0 ],
"editing_bgcolor" : [ 0.612, 0.776, 0.906, 1.0 ]
}

382
knob-range.js Normal file
View File

@@ -0,0 +1,382 @@
// Théophile Clet - september 2023
// contact@tflcl.xyz - https://tflcl.xyz
// Max jsui knob with range and randomization features.
// Still a work in progress.
// License CC-BY-4.0
mgraphics.init();
mgraphics.relative_coords = 1;
mgraphics.autofill = 0;
outlets = 3;
//UI variables
var knob_color = [0.2, 0.2, 0.2, 1.];
var pointer_color = [1., 1., 1., 1.];
var range_color = [0.702, 0.416, 0.886, 0.9];
var range_color_locked = [0.74, 0.63, 0.74, 0.9];
var indicator_color = [0., 0., 0., 1];
var lock_color = [1., 1., 1., 1];
var text_color = [1., 1., 1., 1.];
var knob_radius = 0.8;
var knob_width = 0.1;
var pointer_length = 0.9;
var pointer_offset = 0.;
var pointer_width = 0.15;
var range_width = 0.2;
var range_radius = 0.85;
var indicator_lenght = 0.1;
// var indicator_width = 0.03;
var dead_angle = 0.23;
var lock_pos = [0.7, 0.75];
var lock_dim = [0.25, 0.17];
var lock_width = 0.03;
var font_name ="Ableton Sans Bold";
var font_size = 9.;
//Knob variables
var val, val_scaled, val_default = 0;
var locked = 0;
var range_offset = 0.2;
var range_length = 0.5;
var range = [0., 1.];
var range_scaled = [];
var output_range = [0., 1.];
//Utility variables
var width = this.box.rect[2] - this.box.rect[0];
var height = this.box.rect[3] - this.box.rect[1];
var ratio = width/height;
var TWOPI = 2 * Math.PI;
var rdm = new Rx256(); //random engine
var last_x, last_y = 0;
var theta, rtheta1, rtheta2;
var theta_s = (0.75 - dead_angle * 0.5) * TWOPI;
var theta_e = (dead_angle * 0.5 - 0.25) * TWOPI;
var cos_s = Math.cos(theta_s);
var sin_s = Math.sin(theta_s);
var cos_e = Math.cos(theta_e);
var sin_e = Math.sin(theta_e);
var text;
var t_size = [];
var pattrVar = [];
// arg 0: filename
// arg 1: default value
// arg 2: min output range
// arg 3: max output range
// arg 4: min random range
// arg 5: max random range
if (jsarguments.length == 6) {
val_default = jsarguments[1];
output_range = [jsarguments[2], jsarguments[3]];
range = calc_range_2_norm([jsarguments[4],jsarguments[5]]);
}
if (jsarguments.length == 5) {
output_range = [jsarguments[1], jsarguments[2]];
range = calc_range_2_norm([jsarguments[3],jsarguments[4]]);
}
if (jsarguments.length == 4) {
val_default = jsarguments[1];
output_range = [jsarguments[2], jsarguments[3]];
}
if (jsarguments.length == 3) {
output_range = [jsarguments[1], jsarguments[2]];
}
if (jsarguments.length == 2) {
val_default = jsarguments[1];
}
set_scaled(val_default);
function loadbang() {
calc_font_size();
update();
}
// loadbang();
function paint() {
with (mgraphics) {
save();
scale(0.9, 0.9);
translate(0.1, 0.3);
//DRAW RANGE
set_source_rgba(locked ? range_color_locked : range_color);
set_line_width(range_width);
rtheta1 = (0.25 + range[0] * (1 - dead_angle) + dead_angle * 0.5) * TWOPI;
rtheta2 = (0.25 + range[1] * (1 - dead_angle) + dead_angle * 0.5) * TWOPI;
arc(0, 0, range_radius, rtheta1, rtheta2);
stroke();
//DRAW POT BODY
set_source_rgba(knob_color);
set_line_width(knob_width);
set_line_cap('round');
move_to(cos_s * (knob_radius + indicator_lenght), sin_s * (knob_radius + indicator_lenght));
rel_line_to(-cos_s * indicator_lenght, -sin_s * indicator_lenght);
arc(0, 0, knob_radius - knob_width / 2, -theta_s, -theta_e);
rel_line_to((indicator_lenght + knob_width/2) * cos_e, (indicator_lenght + knob_width/2) * sin_e);
stroke();
//DRAW POINTER
set_source_rgba(pointer_color);
set_line_width(pointer_width);
theta = (0.75 - val * (1-dead_angle) - dead_angle * 0.5) * TWOPI;
var cos_t = Math.cos(theta);
var sin_t = Math.sin(theta);
move_to(pointer_offset * knob_radius * cos_t, pointer_offset * knob_radius * sin_t);
rel_line_to(pointer_length * knob_radius * cos_t, pointer_length * knob_radius * sin_t);
stroke();
restore();
//DRAW LOCK
translate(lock_pos[0], -lock_pos[1]);
set_source_rgba(lock_color);
set_line_width(lock_width);
rectangle(0, 0, lock_dim[0], lock_dim[1]);
fill();
move_to(lock_width * 0.5, 0);
if (!locked) {
rel_line_to(0, lock_dim[1] * 0.5);
}
rel_curve_to(0, lock_dim[1], lock_dim[0] - lock_width, lock_dim[1], lock_dim[0] - lock_width, 0);
stroke();
restore();
//DRAW VALUE
select_font_face(font_name);
set_font_size(font_size);
text = (Math.round(val_scaled * 100) / 100).toString();
t_size = text_measure(text);
translate(-t_size[0]/width, 1-0.1*t_size[1]/height);
move_to(0, 0);
set_source_rgba(text_color);
show_text(text);
}
updatePattr();
}
// function init(args) {
// // TOO MUCH MESS HERE, DO NOT USE
// if (arguments.length) {
// args = arrayfromargs(arguments);
// } else {
// args = init_args;
// }
// if (args.length >= 5) {
// val_default = args.shift();
// }
// if (args.length == 4) {
// output_range = [args.shift(), args.shift()];
// range = [scale2norm(args.shift()), scale2norm(args)];
// } else if (args.length == 3) {
// val_default = args.shift();
// output_range = args;
// } else if (args.length == 2) {
// output_range = args;
// } else if (args.length == 1) {
// val_default = args;
// }
// set_scaled(val_default);
// }
function update() {
outlet(0,val);
outlet(1, val_scaled);
mgraphics.redraw();
}
function msg_float(v) {
val = Math.min(Math.max(0,v),1);
val_scaled = scale2outrange(val);
update();
}
function bang() {
update();
}
function randomize() {
if (!locked) {
val = scale(rdm.nextfloat_unipolar(), [0, 1], range);
val_scaled = scale2outrange(val);
update();
}
}
function set_range(args) {
//dirty way to allow that function to run with either jsui args or passed variables
if (arguments.length) {
args = arrayfromargs(arguments);
}
//dirty way to keep a minimum range > 0
range[0] = Math.min(Math.max(0, args[0]),0.99);
range[1] = Math.min(Math.max(0.01, args[1]),1);
if (range[0] > range[1]) {
var tmp = range[0];
range[0] = range[1];
range[1] = tmp;
}
range_scaled = calc_range_2_outrange(range);
outlet(2, "range", range);
outlet(2, "range_scaled", range_scaled);
mgraphics.redraw();
}
function set_scaled(v) {
val = scale2norm(v);
val_scaled = v;
mgraphics.redraw();
}
function set(v) {
val = v;
val_scaled = scale2outrange(val);
mgraphics.redraw();
}
function set_lock(v) {
locked = v;
mgraphics.redraw();
}
function lock(v) {
locked = v;
outlet(2, "lock", v);
mgraphics.redraw();
}
// UTILITIES
function scale(value, inRange, outRange) {
var result = (value - inRange[0]) * (outRange[1] - outRange[0]) / (inRange[1] - inRange[0]) + outRange[0];
if (result < outRange[0]) {
return outRange[0];
} else if (result > outRange[1]) {
return outRange[1];
}
return result;
}
scale.local = 1;
function scale2norm(v) {
return scale(v, output_range, [0., 1.]);
}
scale2norm.local = 1;
function scale2outrange(v) {
return scale(v, [0., 1.], output_range);
}
scale2outrange.local = 1;
function calc_range_2_norm(r) {
return [scale2norm(r[0]), scale2norm(r[1])];
}
calc_range_2_norm.local = 1;
function calc_range_2_outrange(r) {
return [scale2outrange(r[0]), scale2outrange(r[1])];
}
calc_range_2_outrange.local = 1;
function calc_font_size() {
font_size = width/5.8;
};
calc_font_size.local = 1;
// PATTR HANDLING
function updatePattr() { //SHOULD WORK ONLY WITH SCALED VALUES TO IMPROVE UX
pattrVar[0] = val_scaled;
pattrVar[1] = range_scaled[0];
pattrVar[2] = range_scaled[1];
pattrVar[3] = locked;
notifyclients();
}
function getvalueof() {
return pattrVar;
}
function setvalueof() {
val_scaled = arguments[0];
val = scale2norm(val_scaled);
range_scaled = [arguments[1], arguments[2]];
range = calc_range_2_norm(range_scaled);
locked = arguments[3];
update();
}
// MOUSE AND RESIZE INTERACTIONS
function onclick(x,y,but,cmd,shift,capslock,option,ctrl) {
x_snorm = 2 * x / width - 1;
y_snorm = 2 * y / height - 1;
// post(x_snorm, y_snorm); post();
if (x_snorm > lock_pos[0] && y_snorm < - lock_pos[1] + lock_dim[1] * 2.5 ) {
lock(!locked);
}
// cache mouse position for tracking delta movements
last_x = x;
last_y = y;
}
onclick.local = 1;
function ondrag(x,y,but,cmd,shift,capslock,option,ctrl) {
var f,dy;
dy = y - last_y; // calculate vertical delta movements
if (ctrl) { // ctrl + drag to offset range
var mult = shift ? 0.001 : 0.01; // fine tune if shift key is down
set_range(range[0] - dy * mult, range[1] - dy * mult);
} else if (option) { // opttion/alt + drag to change range width
var mult = shift ? 0.0005 : 0.005;
set_range(range[0] + dy * mult, range[1] - dy * mult);
} else { //drag to change val
var mult = shift ? 0.001 : 0.01;
f = val - dy * mult;
msg_float(f); //set new value with clipping + refresh
}
// cache mouse position for tracking delta movements
last_x = x;
last_y = y;
}
ondrag.local = 1;
function ondblclick(x,y,but,cmd,shift,capslock,option,ctrl) {
last_x = x;
last_y = y;
set_scaled(val_default);
update();
// reset();
}
ondblclick.local = 1;
function forcesize(w,h) {
if (w!=h) {
h = w;
box.size(w,h);
}
width = w;
height = h;
ratio = width/height;
calc_font_size();
}
forcesize.local = 1;
function onresize(w,h) {
forcesize(w,h);
mgraphics.redraw();
}
onresize.local = 1;

View File

@@ -1,139 +0,0 @@
// Cubehelix color scheme for Max/MSP/Jitter
// By Théophile Clet
// https://tflcl.xyz
//
// Based on Dave Green's work:
// http://www.mrao.cam.ac.uk/~dag/CUBEHELIX/cubetry.html
//
// Original publication: Green, D. A., 2011, `A colour scheme for the display of astronomical intensity images', Bulletin of the Astronomical Society of India, 39, 289. (2011BASI...39..289G at ADS.)
// http://astron-soc.in/bulletin/11June/289392011.pdf )
//
// Original js code taken straight from the online example implementation:
// http://www.mrao.cam.ac.uk/~dag/CUBEHELIX/cubetry.html
autowatch = 0;
inlets = 1;
outlets = 4;
var RGBOUTLET = 0;
var HSLOUTLET = 1;
var LISTOUTLET = 2
var DUMPOUTLET = 3;
setinletassist(0, "List as input: {makeCubehelixRGB, start[float], rots[float], sign[-1,1], hue[float], gamma[float], levels(int), flip([0,1]}")
setoutletassist(0, "To jit.matrix: always outputs the color palette as a ARGB 4-plane matrix");
setoutletassist(1, "To jit.matrix: if 'hslenable 1' outputs the color palette as a AHSL 4-plane matrix");
setoutletassist(2, "If 'listmode 1' outputs all colors in list format as RGB or HSL.");
setoutletassist(3, "Bangs when generation is done.");
var hslmode = false;
var listmode = false;
function hslenable(s){
hslmode = s;
}
function listenable(s){
listmode = s;
}
function makeCubehelix(start, rots, hue, gamma, levels, flip){
//dumpOut(start, rots, hue, gamma, levels, flip);
outlet(RGBOUTLET, "dim", levels, 1);
if (hslmode) {
outlet(HSLOUTLET, "dim", levels, 1);
}
for (var i = 0; i < levels; i++) {
var fract = CubeHelixFract(i,levels,flip);
var color = CubeHelixRGB(fract,start,rots,hue,gamma);
if(flip == 1){fract = 1.0-fract;}
outlet(RGBOUTLET, "setcell", i, 0, "val", 1., color);
if (hslmode) {
color = rgb2hsl(color[0], color[1], color[2]);
outlet(HSLOUTLET, "setcell", i, 0, "val", 1., color);
}
if (listmode) { outlet(LISTOUTLET, i, color); }
}
outlet(RGBOUTLET, "bang");
if (hslmode) { outlet(HSLOUTLET, "bang"); }
if (listmode) { outlet(LISTOUTLET, "bang"); }
outlet(DUMPOUTLET, "bang");
}
function dumpOut(start, rots, hue, gamma, levels, flip){
outlet(DUMPOUTLET, "start", start);
outlet(DUMPOUTLET, "rots", rots);
outlet(DUMPOUTLET, "hue", hue);
outlet(DUMPOUTLET, "gamma", gamma);
outlet(DUMPOUTLET, "levels", levels);
outlet(DUMPOUTLET, "flip", flip);
}
function rgb2hsl(r,g,b) {
var max = Math.max(r, g, b), min = Math.min(r, g, b);
var h, s, l = (max + min) / 2;
if (max == min) {
h = s = 0; // achromatic
} else {
var d = max - min;
s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
switch (max) {
case r: h = (g - b) / d + (g < b ? 6 : 0); break;
case g: h = (b - r) / d + 2; break;
case b: h = (r - g) / d + 4; break;
}
h /= 6;
}
return [ h, s, l ];
}
// ----------------------------------------------------------------------------
// 2017 May 30: make consistent with Fortran
// 2021 mai 12: a bit of calculation optimization (I think) - Théophile Clet
// ----------------------------------------------------------------------------
function CubeHelixRGB(fract,start,rots,hue,gamma){
var angle = 2*Math.PI*(start/3.0+1+rots*fract);
var fract = Math.pow(fract, gamma);
var amp=hue*fract*(1-fract)/2.0;
var acos = Math.cos(angle);
var asin = Math.sin(angle);
var r=fract+amp*(-0.14861*acos+1.78277*asin);
r=Math.max(Math.min(r,1.0),0.0);
var g=fract+amp*(-0.29227*acos-0.90649*asin);
g=Math.max(Math.min(g,1.0),0.0);
var b=fract+amp*(+1.97294*acos);
b=Math.max(Math.min(b,1.0),0.0);
return [r, g, b];
}
// ----------------------------------------------------------------------------
function CubeHelixFract(i,n,flip){
var fraction = i/(n-1);
if (flip == 1) {
fraction = 1 - fraction;
}
return fraction;
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,468 +0,0 @@
{
"patcher" : {
"fileversion" : 1,
"appversion" : {
"major" : 7,
"minor" : 3,
"revision" : 6,
"architecture" : "x86",
"modernui" : 1
}
,
"rect" : [ 1198.0, 591.0, 578.0, 815.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" : "",
"boxes" : [ {
"box" : {
"id" : "obj-38",
"maxclass" : "message",
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 462.0, 46.0, 70.0, 22.0 ],
"style" : "",
"text" : "getcolor $1"
}
}
, {
"box" : {
"id" : "obj-36",
"maxclass" : "number",
"numinlets" : 1,
"numoutlets" : 2,
"outlettype" : [ "", "bang" ],
"parameter_enable" : 0,
"patching_rect" : [ 462.0, 15.0, 50.0, 22.0 ],
"style" : ""
}
}
, {
"box" : {
"format" : 6,
"id" : "obj-33",
"maxclass" : "flonum",
"numinlets" : 1,
"numoutlets" : 2,
"outlettype" : [ "", "bang" ],
"parameter_enable" : 0,
"patching_rect" : [ 367.5, 15.0, 50.0, 22.0 ],
"style" : ""
}
}
, {
"box" : {
"id" : "obj-34",
"maxclass" : "message",
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 367.5, 46.0, 73.0, 22.0 ],
"style" : "",
"text" : "rotations $1"
}
}
, {
"box" : {
"format" : 6,
"id" : "obj-32",
"maxclass" : "flonum",
"numinlets" : 1,
"numoutlets" : 2,
"outlettype" : [ "", "bang" ],
"parameter_enable" : 0,
"patching_rect" : [ 275.5, 15.0, 50.0, 22.0 ],
"style" : ""
}
}
, {
"box" : {
"id" : "obj-28",
"maxclass" : "message",
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 275.5, 46.0, 77.0, 22.0 ],
"style" : "",
"text" : "startcolor $1"
}
}
, {
"box" : {
"id" : "obj-26",
"maxclass" : "message",
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 208.0, 42.0, 51.0, 22.0 ],
"style" : "",
"text" : "random"
}
}
, {
"box" : {
"id" : "obj-24",
"maxclass" : "message",
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 20.0, 10.0, 173.0, 22.0 ],
"style" : "",
"text" : "makeCubehelix 0. 1. 1. 1. 32 1"
}
}
, {
"box" : {
"id" : "obj-22",
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 237.0, 612.0, 33.0, 20.0 ],
"style" : "",
"text" : "Hue"
}
}
, {
"box" : {
"id" : "obj-21",
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 237.0, 638.0, 69.0, 20.0 ],
"style" : "",
"text" : "Luminance"
}
}
, {
"box" : {
"id" : "obj-19",
"maxclass" : "message",
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 132.0, 612.0, 103.0, 22.0 ],
"style" : "",
"text" : "planemap 1 1 1 1"
}
}
, {
"box" : {
"id" : "obj-18",
"maxclass" : "message",
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 132.0, 638.0, 103.0, 22.0 ],
"style" : "",
"text" : "planemap 3 3 3 3"
}
}
, {
"box" : {
"id" : "obj-16",
"maxclass" : "message",
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 132.0, 583.0, 103.0, 22.0 ],
"style" : "",
"text" : "planemap 0 1 2 3"
}
}
, {
"box" : {
"id" : "obj-13",
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 208.0, 536.0, 52.0, 22.0 ],
"style" : "",
"text" : "print list"
}
}
, {
"box" : {
"id" : "obj-10",
"maxclass" : "message",
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 225.333313, 795.0, 189.0, 22.0 ],
"style" : "",
"text" : "15 0.46834 0.947702 0.333514"
}
}
, {
"box" : {
"id" : "obj-8",
"maxclass" : "message",
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 169.666656, 752.0, 198.0, 22.0 ],
"style" : "",
"text" : "4 0.053409 0.02406 0.011621"
}
}
, {
"box" : {
"id" : "obj-6",
"maxclass" : "button",
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "bang" ],
"patching_rect" : [ 302.0, 708.0, 24.0, 24.0 ],
"style" : ""
}
}
, {
"box" : {
"id" : "obj-4",
"maxclass" : "newobj",
"numinlets" : 4,
"numoutlets" : 4,
"outlettype" : [ "", "", "", "" ],
"patching_rect" : [ 302.0, 672.0, 159.0, 22.0 ],
"style" : "",
"text" : "route bang rgbcolor hslcolor"
}
}
, {
"box" : {
"id" : "obj-3",
"maxclass" : "jit.pwindow",
"numinlets" : 1,
"numoutlets" : 2,
"outlettype" : [ "", "" ],
"patching_rect" : [ 114.0, 665.0, 80.0, 60.0 ],
"planemap" : [ 3, 3, 3, 3 ]
}
}
, {
"box" : {
"id" : "obj-2",
"maxclass" : "jit.pwindow",
"numinlets" : 1,
"numoutlets" : 2,
"outlettype" : [ "", "" ],
"patching_rect" : [ 20.0, 665.0, 80.0, 60.0 ]
}
}
, {
"box" : {
"bgmode" : 0,
"border" : 0,
"clickthrough" : 0,
"enablehscroll" : 0,
"enablevscroll" : 0,
"id" : "obj-1",
"lockeddragscroll" : 0,
"maxclass" : "bpatcher",
"name" : "Cubehelix.maxpat",
"numinlets" : 1,
"numoutlets" : 4,
"offset" : [ 0.0, 0.0 ],
"outlettype" : [ "jit_matrix", "jit_matrix", "", "" ],
"patching_rect" : [ 20.0, 120.0, 301.0, 398.0 ],
"viewvisibility" : 1
}
}
],
"lines" : [ {
"patchline" : {
"destination" : [ "obj-13", 0 ],
"source" : [ "obj-1", 2 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-2", 0 ],
"source" : [ "obj-1", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-3", 0 ],
"source" : [ "obj-1", 1 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-4", 0 ],
"source" : [ "obj-1", 3 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-3", 0 ],
"source" : [ "obj-16", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-3", 0 ],
"source" : [ "obj-18", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-3", 0 ],
"source" : [ "obj-19", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-1", 0 ],
"source" : [ "obj-24", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-1", 0 ],
"source" : [ "obj-26", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-1", 0 ],
"source" : [ "obj-28", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-28", 0 ],
"source" : [ "obj-32", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-34", 0 ],
"source" : [ "obj-33", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-1", 0 ],
"source" : [ "obj-34", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-38", 0 ],
"source" : [ "obj-36", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-1", 0 ],
"source" : [ "obj-38", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-10", 1 ],
"source" : [ "obj-4", 2 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-6", 0 ],
"source" : [ "obj-4", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-8", 1 ],
"source" : [ "obj-4", 1 ]
}
}
],
"parameters" : {
"obj-1::obj-85" : [ "live.text[1]", "live.text[1]", 0 ],
"obj-1::obj-133" : [ "live.tab[1]", "live.tab", 0 ],
"obj-1::obj-1" : [ "live.text[2]", "live.text[1]", 0 ],
"obj-1::obj-104" : [ "live.tab", "live.tab", 0 ],
"obj-1::obj-141" : [ "live.tab[2]", "live.tab", 0 ]
}
,
"dependency_cache" : [ {
"name" : "Cubehelix.maxpat",
"bootpath" : "~/Documents/_MAX/_RESSOURCE/Color palettes",
"patcherrelativepath" : ".",
"type" : "JSON",
"implicit" : 1
}
, {
"name" : "Cubehelix.js",
"bootpath" : "~/Documents/_MAX/_RESSOURCE/Color palettes",
"patcherrelativepath" : ".",
"type" : "TEXT",
"implicit" : 1
}
],
"autosave" : 0
}
}

File diff suppressed because it is too large Load Diff