Code:
open_midi_device("traktor", "traktor", "Traktor to MM", "MM to Traktor");
open_midi_device("mycontroller", "mycontroller-type", "in-port", "out-port");
capture("mycontroller", ALL, "jog_touch_a", 0, function(d,e,v,p)
if v > 0 then
send("traktor", "fx_panel_mode_unit1_group", ON)
send("traktor", "effect_1_select_unit_1", 3)
send("traktor", "effect_1_on_unit_1", ON)
send("traktor", "effect_1_select_unit_2", 5)
send("traktor", "effect_1_on_unit_2", ON)
send("traktor", "effect_1_on_unit_2", ON)
send("traktor", "select_set_store_hotcue_1_a", ON)
send("traktor", "loop_size_set_4_a", ON)
send("traktor", "loop_active_a", ON)
set("my_beatmasher_effect_1", 1)
else
send("traktor", "effect_1_on_unit_1", OFF)
send("traktor", "effect_1_on_unit_2", OFF)
set("my_beatmasher_effect_1", 0)
end
end)
capture("mycontroller", ALL, "jog_a", 0, function(d,e,v,p)
if get("my_beatmasher_effect_1") > 0 then
send("traktor", "effect_1_amount_unit_1", v * foo * bar)
send("traktor", "effect_1_amount_unit_2", v * fu * baz)
end
end)
you can also capture() variable change events, so adding this would turn an led on/off:
Code:
pipe("_varchange", "my_beatmasher_effect_1", 0, "mycontroller", "some_led")
not that you'd need to in this example ofc - it could go at the end of that first capture() code block
Bookmarks