Spectrum Analyzer gets stuck
-
@d-healey I put that code in onit and get an error
Interface:! Line 107, column 7: Cannot define local variables outside of inline functions or callbacks.
Parametric:! Line 107, column 7: Cannot define local variables outside of inline functions or callbacks.This line
local dbs = Synth.getDisplayBufferSource("Parametriq EQ1");
-
@pcs800 Ah that makes sense. Change the local to a const.
-
Const dbs = Synth.getDisplayBufferSource("Parametriq EQ1");
Interface:! Line 107, column 7: Found identifier when expecting ';'
Parametric:! Line 107, column 7: Found identifier when expecting ';' -
@pcs800 Lowercase
c
-
@d-healey Oh boy, it seems that upper/lower case thing trips me up a lot :-/
So yes, now the analyzer is retracting as expected.
My next adventure will be to change its color to cyan.
How do I do that? Is it a laf thing? If so, I will be stuck for a while, I have not watched any tutorials on laf. -
@pcs800 Yeah
laf
is the way to go. There are a few laf functions for the analyser. -
@d-healey Can you point me to something that would educate the quickest for this particular use?
-
@pcs800 Have you used paint routines?
-
@d-healey Actually I spoke too soon. The analyzer is still sticking, but not as much. Meaning, it leaves less of a peak showing than before. So I changed "Decay": 0.6, to "Decay": 0.3, and it seems to have fixed it
-
@d-healey Paint routines, no I have not
-
@pcs800 In that case just search my channel for look and feel/laf/paint routine videos. I haven't done one specifically about the EQ or analyser but once you know how laf works for one component it's pretty much the same for all.
In some of the older videos I'm using
global
look and feel because that's all we had. But these days you should uselocal
look and feel instead - except for a few special places.You might also be able to use css for the analyser, but I haven't covered that in any videos.
Btw, paint routines and laf are essentially the same. Paint routines are for panels only, while laf is for all other components.
-
@d-healey Ok I will check into it. Thanks
-
@d-healey So, instead of
const laf = Engine.createGlobalLookAndFeel();I should use
const laf = Engine.createLocalLookAndFeel();
Correct? -
@pcs800
Content.createLocalLookAndFeel
I think - check the API browser