Skip to content

Milestone FOA ported to use AmbiX instead of FuMa

Trond Lossius edited this page Dec 19, 2019 · 25 revisions

Content

 

 

Naming conventions

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)

 

 

Code refactoring

Make all atk library code use namespace pseudo-objects as outlined here, similar to how this is done in the cookdsp library

 

 

GUI Improvements

State that plugin uses AmbiX

For plugins with GUIs this can be part of the GUI.

For plugins without GUIs I need to consider how best to do this. Maybe all plugins should have GUIs, even if they are not really used for anything? Combined with the below point, there are strong arguments for always providing GUIs.

Is this to behave differently when the GUI window is large or small (small as when embedded in Track or Mixer Panels?)

 

Warning when an insufficient number of channels

Provide feedback to the user when a track is set up with an insufficient number of channels

 

Redraw efficiency

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);

);

 

Different background colours for encoders, transforms and decoders

Consider to use different background colours for the different kinds of plugins:

  • Encode => Red
  • Transform => Green
  • Decode => Blue

All variations should be darkish and discrete.

 

Improve GUI for encoders

These plugins will be more user-friendly if it is clear fromt he GUI how channel assignments are set up.

 

Update GUIs for FOA Transforms

Update the indication of perceived localization focus from |rV| to |rE|.

Mapping to |rE| offers a stronger sense of how localized an encoded planewave will appear after transform.

This change will require an update to the figures presented in documentation for atk-sc3.

To implement will require a brief conversation with @lossius as to details.

This is further discussed in Issue 24. Even though that issue is closed (moved here), the information in the discussion remains valid, and should be refered to when implementing this.

 

Add loudspeaker polarity indicator to decoder GUIs

@lossius in relation to the GUI enhancement #9, (RMS) levels are now displayed for loudspeaker feeds.

Add an indicator to illustrate the average polarity of channel output feeds. This is "easily" calculated. E.g.:

polarityLF = TimeAverage(LF * W)

By monitoring the polarity of polarityLF we can determine whether the average signal presented at LF is "in phase" or "out of phase" with W. This is a very useful indicator illustrating decoder performance and sound-field quality.

More details... there are actually three states of interest:

polarity > 0 means "in phase" polarity = 0 means "in quadrature" polarity < 0 means "out of phase"

I'm thinking these states could be represented by a colour or shading change of the current metering.

 

Review mouse action in small interfaces

With Reaper 6 it is possible to add JSFX GUIs to Track or Mix panels. This is very attractive with ATK, as the user then can monitor and interact with encoders and transforms from track panels or the mixer. The GUI is pretty small when embedded within these panels. Do we want to implement a way of fine-tuning parameter values in the GUI when it is small?

 

Report latency in kernel-based plugins

Message from witti:

Quite some time ago i tried to change the code of the js amp-modelers to make them reporting the correct latency (in samples) they are introducing with the different IRs. The method is not very elegant, but it seems to work and maybe it helps to fix some problems some of your plugins have, too.

What i did was: Getting the value which is responsible for the latency and make a slider from that. Then in @slider i've added pdc_delay and top/bottom channels.

Example for your UHJ decoder:

old:

@sample
// Update delay compensation
pdc_delay = ((1.5 * mKernelSize)|0) - 2;

// Delay compensation affects channels 1-2
pdc_bot_ch=0;
pdc_top_ch=2;

new:

slider3:0,(read-only) PDC delay

@slider
pdc_delay = slider3;
pdc_bot_ch=0;
pdc_top_ch=2;

@sample
// Update delay compensation
slider3 = ((1.5 * mKernelSize)|0) - 2;
sliderchange(slider3);
Clone this wiki locally