-
Notifications
You must be signed in to change notification settings - Fork 11
Milestone FOA ported to use AmbiX instead of FuMa
Trond Lossius edited this page Dec 9, 2019
·
25 revisions
As plugins are updated, their names need to change so that old and new versions are not mixed up in Reaper projects. The approach to this will be similar to how Blue Ripple did the same transition:
- Old version has names starting with
ATK FOA (something)
- New version has names starting with
ATK O1A (something)
In the FuMa version of the plugins, the GUI gets redrawn all the time. This ought to be changed so that they only redraw when needed, saving quite a bit of CPU. Doing so should be part of this milestone.
Here's Justin's example code illustrating how this can be done:
desc: Test Line Draw Aliasing
@init
gfx_clear=-1; // prevent auto clear of each frame (since we only draw when the frame changes)
@gfx 500 500
// Determine geometry
gCenterX = gfx_w * 0.5;
gCenterY = gfx_h * 0.5;
// Update sliders when mouse is pressed
(mouse_cap == 1) ? (
slider1 = (mouse_x - gCenterX) / gCenterX;
slider2 = -(mouse_y - gCenterY) / gCenterY;
slider_automate(slider1);
slider_automate(slider2);
);
// Draw circle
(gfx_w != last_gfx_w || gfx_h != last_gfx_h || slider1 != last_slider1 || slider2 != last_slider2) ? (
gfx_a = 1.;
// manually clear framebuffer. we could also choose a minimal area to update (last circle position if the width/height didn't change, for example)
gfx_r=gfx_b=gfx_b=0;
gfx_rect(0,0,gfx_w,gfx_h);
last_gfx_w = gfx_w;
last_gfx_h = gfx_h;
last_slider1=slider1;
last_slider2=slider2;
gfx_r = 0.8;
gfx_g = 0.2;
gfx_b = 0.2;
gfx_circle((slider1 + 1)*gCenterX, (-slider2+1)*gCenterY, 10, 1, 1);
);