Help "drawAnalyserBackground", "drawAnalyserPath" "drawAnalyserGrid",
-
I was looking for MatrixPeakmeter via trace(obj). Trace function doesn't show anything.
What do you mean?
-
const var PeakMtr = Content.getComponent("PeakMtr"); const var Laf = Content.createLocalLookAndFeel(); Laf.registerFunction("drawMatrixPeakMeter", function(g, obj) { Console.print(trace(obj)); g.setColour(Colours.pink); g.drawRect(obj.area, 2.0); g.setColour(Colours.greenyellow); g.fillPath(obj.peaks, obj.area); }); PeakMtr.setLocalLookAndFeel(Laf);
I can't not figure out how to customize Peaks and max peaks.
-
@DabDab obj.peaks is not a path
-
@d-healey So How can I make custom LAF Matrix peak meter with gradient.
-
@DabDab Without doing it for you there's not much more to say. This is the function I'm using, perhaps it will give you some guidance.
laf.registerFunction("drawMatrixPeakMeter", function(g, obj) { var a = obj.area; var value = 0; var numActive = 0; for (x in obj.peaks) { if (x > 0) { numActive++; value += x; } } value = value / numActive; g.setColour(obj.itemColour); g.fillRoundedRectangle(a, 8); g.setColour(Colours.withAlpha(obj.itemColour2, 0.2 + value)); if (a[2] > a[3]) { a[2] *= value; } else { a[1] = a[1] + a[3] - a[3] * value; a[3] *= value; } g.fillRoundedRectangle(a, 8); });
-
@d-healey Oho... really complicated scripts. It was beyond my knowledge database..
Thank you so much.
-
@DabDab It's not complicated, it just looks it at first. This handles vertical and horizontal meters in my project.
-
@d-healey Yes.. I am going through the code.
-
@DabDab said in Help "drawAnalyserBackground", "drawAnalyserPath" "drawAnalyserGrid",:
@d-healey Yes.. I am going through the code.
My code is also to draw a single bar with the average of all channels. That's what this part does.
for (x in obj.peaks) { if (x > 0) { numActive++; value += x; } }
You don't need that if you want to display each channel individually or if you have a mono signal.
-
@d-healey Ok.. got it. (y)
-
D DabDab marked this topic as a question on
-
D DabDab has marked this topic as solved on
-
@DabDab I have done so - a highly detailed LAF documentation and tutorial. look in the repository…wherever they put it. It's where all the contributions go…I just don't remember off the top of my head.
-
@clevername27 Can you please put the url here ?
-
@d-healey Just to add the David's comments, depending on what you need, it can be simply to add LAF parameters by modifying HISE's C++ code. For example, I posted a while back about adding the component name to LAFs for specific widgets.
-
@DabDab I have written and posted Peak Meter LAF documentation, and a tutorial, this week on the forum.
-
@clevername27 Ok.. Sure.. (y)
-
@DabDab can these be used to do the work on the goniometer?
I'd like the dots to remain on screen and fade out over a few dozen milliseconds, so that it looks like they're leaving a trail.
-
@aaronventure No I don't think we have any control from the scripting API (except usual properties) over the appearance of this component.
-
@d-healey Oh man, I already have like 3 requests open. :face_with_tears_of_joy: