Hey Peter,
Could you please add the script we were talking about before, ?
X/Y PAD Morphing module to morph between Presets of selected parameters, something like metasurface in audiomulch, NI KORE2'S morph pad
The metasurface pad in audio mulch is much better and prefered but maybe more complex to program.
regards
X/Y PAD Morphing module
Re: X/Y PAD Morphing module
Why not to make use of the LUA script block and make your own custom processing block with the GUI that you like?:) The incoming v1.5.1 will contain a sample "grid" LUA script, with scalable interface and many configuration options. It should give you a nice starting point to build that.
Re: X/Y PAD Morphing module
my scripting knowledge isn't that goodWhy not to make use of the LUA script

plus you said to me that you will help me with this , please do

Re: X/Y PAD Morphing module
Please do not over-interpret my responses because you will be ignored, not listened. I have searched through our communication and all I have replied was: "If I have time I will add another embedded LUA example with the X/Y Pad.". So yes, I will add a sample X/Y Pad LUA project, but only if/when I have time to do this (which might be in a month or 2 years period). If you don't want to wait, there's a feature (that many users have asked for) allowing you to create such "module" on your own. Basically you can start with simply drawing a rectangle and responding to mouse down/drag/up events generating two distinct parameter changes (for X and Y axes separately). All other remaining transformations (eg. triggering actual MIDI messages based on those param changes) can be done in MIDI Lab outside of the LUA Script block.
You can start with this template (it outputs parameters in range 0-1 for indexes 0 (X) and 1 (Y)):
You can start with this template (it outputs parameters in range 0-1 for indexes 0 (X) and 1 (Y)):
Code: Select all
require "include/midilab"
-- placement and size
local rect_x, rect_y = 20, 40
local rect_width, rect_height = 400, 300
function plugin.processBlock(samples, smax)
end
local J = juce
local mouse = J.Point(-1,-1)
local frame = J.Rectangle_int(rect_x, rect_y, rect_width, rect_height)
local sideways = J.AffineTransform():rotated(math.pi*0.5)
params = plugin.manageParams {
{
name = "X";
min = 0;
max = 127;
default = 0;
changed = function(val) end;
};
{
name = "Y";
min = 0;
max = 127;
default = 0;
changed = function(val) end;
};
}
function gui.paint(g)
g:fillAll()
g:setColour(J.Colour.green)
g:fillRect(frame)
if (mouse.x ~= -1) then
g:setColour(J.Colour.red)
g:fillRect(J.Rectangle_int(mouse.x-10,mouse.y-10,20,20))
end
g:drawText("X", rect_x, rect_y + rect_height, rect_width, 20, J.Justification.centred)
g:addTransform(sideways)
g:drawText("Y", rect_y, -(2*rect_x + rect_width), rect_height, 20, J.Justification.centred)
end
local function mouseHandler(event)
if not frame:contains(J.Point(event.x,event.y)) then
return
end
plugin.setParameter (0, (event.x - rect_x) / rect_width)
plugin.setParameter (1, (event.y - rect_y) / rect_height)
mouse = J.Point(event.x,event.y)
gui.getComponent():repaint()
end
local function mouseUp(event)
if not frame:contains(J.Point(event.x,event.y)) then
return
end
mouse = J.Point(-1,-1)
gui.getComponent():repaint()
end
gui.addHandler("mouseDrag", mouseHandler)
gui.addHandler("mouseDown", mouseHandler)
gui.addHandler("mouseUp", mouseUp)