Re: Max For Live, MIDI CCs and NRPNs
Posted: Sun Mar 21, 2010 1:58 pm
by Mindfields
Hello
i know this is a very old post, but it couldnt find any solution for this on the net.
So i started to try making my first max for live patch.
I have managed to make one knob for the cutoff.
and after that i should be able to perform the same stuff on the rest.
i might try making a full controller, or a midi tranlator instead.
here is the code for the one knob version if you want to try it:
{
"boxes" : [ {
"box" : {
"maxclass" : "message",
"text" : "0",
"patching_rect" : [ 220.262848, 283.225861, 28.220671, 16.0 ],
"fontsize" : 10.0,
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"fontname" : "Arial Bold",
"id" : "obj-3"
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "expr $i1-127",
"patching_rect" : [ 46.304657, 239.336746, 68.0, 18.0 ],
"fontsize" : 10.0,
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "" ],
"fontname" : "Arial Bold",
"id" : "obj-107"
}
}
, {
"box" : {
"maxclass" : "message",
"text" : "0",
"patching_rect" : [ 310.905609, 219.332138, 32.5, 16.0 ],
"fontsize" : 10.0,
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"fontname" : "Arial Bold",
"id" : "obj-100"
}
}
, {
"box" : {
"maxclass" : "message",
"text" : "15",
"patching_rect" : [ 252.289917, 218.917572, 32.5, 16.0 ],
"fontsize" : 10.0,
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"fontname" : "Arial Bold",
"id" : "obj-99"
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "ctlout a 38",
"patching_rect" : [ 155.372528, 306.101715, 60.0, 18.0 ],
"fontsize" : 10.0,
"numinlets" : 3,
"numoutlets" : 0,
"fontname" : "Arial Bold",
"id" : "obj-98"
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "ctlout a 99",
"patching_rect" : [ 311.428894, 236.89743, 60.0, 18.0 ],
"fontsize" : 10.0,
"numinlets" : 3,
"numoutlets" : 0,
"fontname" : "Arial Bold",
"id" : "obj-96"
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "ctlout a 98",
"patching_rect" : [ 251.744537, 236.310608, 60.0, 18.0 ],
"fontsize" : 10.0,
"numinlets" : 3,
"numoutlets" : 0,
"fontname" : "Arial Bold",
"id" : "obj-95"
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "bangbang 4",
"patching_rect" : [ 193.374557, 173.155548, 67.0, 18.0 ],
"fontsize" : 10.0,
"numinlets" : 1,
"numoutlets" : 4,
"outlettype" : [ "bang", "bang", "bang", "bang" ],
"fontname" : "Arial Bold",
"id" : "obj-90"
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "if $i1 > 127 then $i2 else $i1",
"patching_rect" : [ 34.870445, 258.939514, 141.0, 18.0 ],
"fontsize" : 10.0,
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"fontname" : "Arial Bold",
"id" : "obj-89"
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "if $i1 > 127 then 1 else 0",
"patching_rect" : [ 229.712891, 258.679718, 124.0, 18.0 ],
"fontsize" : 10.0,
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "" ],
"fontname" : "Arial Bold",
"id" : "obj-88"
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "ctlout a 6",
"patching_rect" : [ 224.816437, 305.443939, 54.0, 18.0 ],
"fontsize" : 10.0,
"numinlets" : 3,
"numoutlets" : 0,
"fontname" : "Arial Bold",
"id" : "obj-86"
}
}
, {
"box" : {
"maxclass" : "message",
"text" : "35",
"patching_rect" : [ 162.262863, 286.225861, 27.220671, 16.0 ],
"fontsize" : 10.0,
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"fontname" : "Arial Bold",
"id" : "obj-83"
}
}
, {
"box" : {
"maxclass" : "live.dial",
"varname" : "live.dial",
"patching_rect" : [ 4.159409, 4.028877, 44.0, 47.0 ],
"presentation" : 1,
"parameter_enable" : 1,
"numinlets" : 1,
"numoutlets" : 2,
"outlettype" : [ "", "float" ],
"id" : "obj-52",
"presentation_rect" : [ 10.504337, 4.235929, 44.0, 47.0 ],
"saved_attribute_attributes" : {
"valueof" : {
"parameter_longname" : "live.dial",
"parameter_modmin" : 0.0,
"parameter_linknames" : 0,
"parameter_modmode" : 0,
"parameter_info" : "",
"parameter_order" : 0,
"parameter_units" : "",
"parameter_speedlim" : 0,
"parameter_steps" : 0,
"parameter_exponent" : 1.0,
"parameter_unitstyle" : 0,
"parameter_mmax" : 164.0,
"parameter_mmin" : 0.0,
"parameter_type" : 1,
"parameter_initial_enable" : 0,
"parameter_shortname" : "CutOff",
"parameter_invisible" : 0,
"parameter_modmax" : 127.0,
"parameter_annotation_name" : ""
}
}
}
}
, {
"box" : {
"maxclass" : "comment",
"text" : "Device vertical limit",
"patching_rect" : [ 0.0, 170.0, 118.0, 18.0 ],
"fontsize" : 10.0,
"numinlets" : 1,
"numoutlets" : 0,
"fontname" : "Arial",
"id" : "obj-9",
"hidden" : 1
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "midiout",
"patching_rect" : [ 9.359818, 219.278168, 47.0, 18.0 ],
"fontsize" : 10.0,
"numinlets" : 1,
"numoutlets" : 0,
"fontname" : "Arial Bold",
"id" : "obj-2"
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "midiin",
"patching_rect" : [ 11.991333, 189.171326, 40.0, 18.0 ],
"fontsize" : 10.0,
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "int" ],
"fontname" : "Arial Bold",
"id" : "obj-1"
}
}
],
"lines" : [ {
"patchline" : {
"source" : [ "obj-90", 0 ],
"destination" : [ "obj-83", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-90", 1 ],
"destination" : [ "obj-3", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-90", 2 ],
"destination" : [ "obj-99", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-90", 3 ],
"destination" : [ "obj-100", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-52", 0 ],
"destination" : [ "obj-90", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-3", 0 ],
"destination" : [ "obj-86", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-88", 0 ],
"destination" : [ "obj-3", 1 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-83", 0 ],
"destination" : [ "obj-98", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-1", 0 ],
"destination" : [ "obj-2", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-99", 0 ],
"destination" : [ "obj-95", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-100", 0 ],
"destination" : [ "obj-96", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-52", 0 ],
"destination" : [ "obj-88", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-89", 0 ],
"destination" : [ "obj-83", 1 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-52", 0 ],
"destination" : [ "obj-89", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-52", 0 ],
"destination" : [ "obj-107", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-107", 0 ],
"destination" : [ "obj-89", 1 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
]
}