How to create and animate a signal/gain custom meter in GUI?
-
Hey @Christoph-Hart ,
I was wondering if you could please share some enlightenment on how to create a simple animated vertical meter that displays signal level?
I have added several samplers (one for each drum set component) and created a mixer with vertical sliders each connected to a different sampler. I would like to add a simple vertical meter display for each mixer channel. Here is the PNG I would like to animate:
It should be at scale 0.5.
Thanks so much!
-
@gorangrooves You need to look at a program called knobman. All these kind of meters are just a number of .png images stitched together. Have a look through some of the examples that you can download at https://www.g200kg.com/en/webknobman/gallery.php
Another way to do it, which would give you more flexibility, is to manually stitch the .png files together in something like photoshop, or print an animation out of After Effects or something. If you look at what Knobman does you'll understand what I mean. Once you've got your images stitched together, just tell Hise how many steps (frames) it has and you're good to go! (You can do it with the paint routine too, so it's not using .png's, you can see how that's done in the demo projects.)
A .png vu meter is basically a slider. Take a look at the demo projects, the music box and the one titled MultichannelPlugin, and take a look at this post. I was trying to figure out the same thing a couple weeks ago...
https://forum.hise.audio/topic/1026/can-t-change-slider-style/19
-
I've been using Inkscape to make my film strips. Works pretty well and is free
-
@duno thanks very much. Making a filmstrip is not a problem for me. I've made sliders in illustrator. It is good to know that is what is required as the first step. I will look into your example to see how to animate it.
Thanks a lot! -
That seems like such a simple graphics, I'd just do it with a paint routine in HISE, no need for image files.
-
@gorangrooves Yeah, listen to @d-healey, he knows way more than me! Filmstrips are good for detailed stuff. For sharp clean styles the paint routine's better. There's an example below just using the built in sliders, hopefully will show what's going on.
HiseSnippet 1470.3oc6X0saaaCEVxNZHwsoacnXXWJDrKbA5BrbcbZVwPch+oMqIMFQtoaWLzQKQayUIRMJpzZTTf8n0Gg8nz2fsCIkijcbRs2ZtXsU2wyue7bN7vCUWNyCGGy3Flq0abD1v75VtiohQMGgHTi8aYXVx5jD6CwBL2XuwQn3XrugoYwGJ4at1JFpu28f8PAHpGNijgwILhG9.RHQjQsaiGSBB5f7w8Hg4jtVi88Xzlr.VBfkhVULhPdu.MD+DjTrBVFleQaehfwcEHAN1vbk8X9icGwdIUK+IjXR+.rbgigK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0OGBpC8MggxN2PFvnNL+DvsSO+irsdJCY4X9AMjCSPgxzw4GJ7JYnnEEt2zpKQ3MZ93svbvqrw4ULdSGwbcq1CF.47LvthUme9pedx7PY0KXd+UszyC8gXZ+nEdZeyh+Gmtux++lt+ym69T7b2MzP4ZVtvXypydJf7Mp01OCtLy9gXJlKCpNWxgv+5C+gP8co8f66hiXwSYXWbHoGLeQbdhxql33+PcKXd5MgqjlKq28fNvlbt53hDIbU4xtgrDpXpxihKbNYId5+Jet4fBtEWL39d96DqMAitjvn.baJ7BSXReEF+ZqzwolPc555CYTVzHFk3kOoeLVvICGh44w9b2P6JDv3XYTtUiiwAXT9B3uqwAPgGhKGI6eYrvYwiEWV95aszv0VdXz9iil5E+zro9wrD4inNDAEpvanrfGg3B8R8voCXKetuYAY+P85Jx05loTe0h+F9RY5HWalxzYByOZ7QHxiydtm9WJHOurphBDaopev6Zvalg01NS9GBx3O75Wxy87jIzuGx.yWipKsF2co0n1RqwVKsF0WZM1do03dWhFxK31MAdPr93MPnaa0qvMMaSQvoC0IIi+QGL33L
-
Seems like a perfect candidate for a customized ScriptPanel:
Content.makeFrontInterface(600, 500); const var Panel1 = Content.getComponent("Panel1"); // Use this variable to update the change rate // (0.7 - 0.99, higher = slower decay) const var DECAY_RATE = 0.9; // use any colours you like, this goes from green to red const var colours = [ 0xFFFF0000, 0xFFFF1100, 0xFFFF2200, 0xFFFF3300, 0xFFFF4400, 0xFFFF5500, 0xFFFF6600, 0xFFFF7700, 0xFFFF8800, 0xFFFF9900, 0xFFFFAA00, 0xFFFFBB00, 0xFFFFCC00, 0xFFFFDD00, 0xFFFFEE00, 0xFFFFFF00, 0xFFEEFF00, 0xFFDDFF00, 0xFFCCFF00, 0xFFBBFF00, 0xFFAAFF00, 0xFF99FF00, 0xFF88FF00, 0xFF77FF00, 0xFF66FF00, 0xFF55FF00, 0xFF44FF00, 0xFF33FF00, 0xFF22FF00, 0xFF11FF00, 0xFF00FF00 ]; // Grab the module you want to meter const var MasterChain = Synth.getChildSynth("Master Chain"); Panel1.data.currentLevel = 0.0; Panel1.setPaintRoutine(function(g) { // Invert the peak (the colour array is actually the other way around) // and limit the value for clipping var invPeak = Math.range(1.0 - this.data.currentLevel, 0.0, 1.0); // Fake a logarithmic scale by multipling the value with itself invPeak = invPeak * invPeak; // calculate the index in the colour array var index = parseInt(invPeak * (colours.length-1)); g.setColour(colours[index]); // fill the circle g.fillEllipse([8, 8, this.getWidth()-16, this.getHeight()-16]); // give it some funky lighting effect g.addDropShadowFromAlpha(colours[index], 8); }); Panel1.setTimerCallback(function() { // grab the value var peakl = MasterChain.getCurrentLevel(false); var peakr = MasterChain.getCurrentLevel(false); // don't care which channel, if you do, don't do this. var peak = Math.max(peakl, peakr); // this logic makes sure that sudden peak increases are // reflected instantly on the UI, but the decay will get // smoothed (which is how analog VU meters work) if(peak > this.data.currentLevel) { this.data.currentLevel = peak; } else { this.data.currentLevel *= DECAY_RATE; } // Repaint the panel this.repaint(); }); Panel1.startTimer(30);
Example preset (make sure to turn the volume down, it has a sequenced saw generator on 0dB).
HiseSnippet 2061.3oc2Y08aajaDeW6rGh0U0dGZd3d3dfHnEU9NEcZk+FAtmr0GoF0NV0xI2EDbHfdWJIBuK4VtbsiZwAb+o126K8+f1gj6pcoitT6fjCoUHIP+FNC4vg+lgCUFI3AjzTtvwcsymmPbb+Udimyjy5MCSYNG02w8W6cBNURDHinCmmfSSIgNttq9Dk.20tmi9y+5aODGgYAjRQNNOmSCHGSioxRoi59moQQCwgjyowUzdytGEvY83Q7LveV0qsSBN3R7TxSwJ0Vwyw8SFDRkbwXIVRRcbu2g7v4imwulYz+4zT5EQDEv2YLLQFwC4QgJOV8cmdynQgiJ12oNNtdiJiBqZhBOv6DZHcg7xnwmoG.UZQ03g6JuM2y+cz8bq3d2y3det23.AMQVNhx29TuiXvA0DLbDT0sL55rR5Zd83fFLYqX7kjgB.rvhFa2tcSzVsau9iqWqdM3fHUhtBKPivLRjOZeTgsSIxd73DNC.MdnY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Dahg9ddUPfha7HH5rbK5bmsXi6rEadmsXq6rEaemsXm6rE69VrP0j4AYvMTF9NHXz.yEOtKtLycUm+CklLE9
-
@christoph-hart said in How to create and animate a signal/gain custom meter in GUI?:
Master Chain
Thank you.
I am having troubles getting your code to work. What am I looking for to get the following line setup correctly?
// Grab the module you want to meter
const var MasterChain = Synth.getChildSynth("Master Chain");I have a Sampler titled KICK, which I want to meter. Is this what I need to specify and if so, what would the exact syntax be? If not, where from do I get the correct name for a particular Sampler?
I am getting an error that getCurrentLevel is Uknown function.
Thank you.
-
Hey guys,
after spending several hours banging my head on this, I am no closer to making this work than I was at the beginning.I read and re-read everything several times.
I messed around with both the paint technique and filmstrip, unsuccessfully. At this stage I prefer to animate a filmstrip, as it will be a lot more straightforward for me.
I made a slider and assigned a filmstrip to it. It displays as it should and it works by dragging it with the mouse. It is located on the main canvas.
Now the challenge for me is to make it "dance" by reacting to incoming level. It doesn't need a separate left/right. Just the overall level. It is not connected to processorid or parameterid.Here are the specific labels I used:
Sampler- KICK
slider with the meter filmstrip- Knob13I'd like to see the "Knob13" display the signal output level of Sampler KICK.
@Christoph-Hart
Can you please give me code that I can copy+paste to see this magic happen?
Once I have this one channel going, I will be able to easily replicate to the other channels.
Thanks so much!
-
@gorangrooves You might need to change the response of the slider. In the same properties window as you load in the filmstrip, under component specific properties, try selecting something like min -100, max 0. See if that helps. Might be an idea to export where you're up to as a snippet and post here if you're still having no joy.
-
Make sure you've got it set to vertical in the same section too, not knob.
-
@duno I can not make the filmstrip show up if I set the style as vertical. It only shows up when used within Knob style.
While I was able to see your example from hisesnippet, I wasn't able to get anything connected properly for my needs.
My brain hurts at this point -
Ha, I know how you feel! Gave you some bad info there, sorry. Keep it on knob for filmstrip, but try taking the min / max down to -100 to 0 or something, and play with the middle position too. And make sure all your components and modules that you're wanting to control are declared, and nothings spelt wrong, ie space where there shouldn't be one, or caps etc. If you right click on them you can copy a variable direct from there, and just paste it into your script.
Doesn't take long to wrap your head around whats going on, just look through as many snippets and demos as you can to see how everything connected.
-
Hey guys,
So, I managed to get a single meter working successfully. Thank you @A-Former-User and @Christoph-Hart !I am struggling with replicating that single meter for other channels (samplers). I get the following error message:
Interface:! Line 62, column 11: const var declaration must be on global level
The line in question is this:
const var StereoLevel = Content.getComponent("SnareMeter");
The working slider id is KickMeter and the sampler ID I am metering is KICK.
I created a new slider with ID SnareMeter and it is supposed to meter sampler id
SNARE.Here is the full script I tweaked and changed labels to make a bit clearer as to what is what.
// KICK METER const var StereoLevel = Content.getComponent("KickMeter"); const var masterMeterLeft = Synth.getChildSynth("KICK"); const var masterMeterRight = Synth.getChildSynth("KICK"); // Use this variable to update the change rate // (0.7 - 0.99, higher = slower decay) const var DECAY_RATE = 0.9; var PeakL = 0; var PeakR = 0; const var t = Engine.createTimerObject(); t.setTimerCallback(function() { var PeakL = masterMeterLeft.getCurrentLevel(1); var PeakR = masterMeterRight.getCurrentLevel(0); PeakL = Engine.getDecibelsForGainFactor(PeakL); PeakR = Engine.getDecibelsForGainFactor(PeakR); // Combine left and right channels to measure the sum var peak = Math.max(PeakL, PeakR); StereoLevel.setValue(peak); }); t.startTimer(50); }
-
What do I need to change in order to get it working for subsequent channels (samplers)?
-
As you can see, I used const DECAY_RATE, but the following line of code in the script, later on, did not work:
this.data.currentLevel *= DECAY_RATE;
What needs to be changed here for decay to work properly?
Thanks a lot!
-
-
This isn't the full script, you are opening a bracket somewhere before that.
The error you are seeing is created like this:
if(something) { const var s = 2; // const var must be on global level } const var s2 = ok;
The reason for this is that a const variable slot MUST be declared and can't be depending on the value of
something
.Also there are a few irregularities - you're creating a timer object which has no
data
property.I'd recommend you post a full snippet with the thing you want to show - it's impossible to spot the error with a partial code example like this.
-
@Christoph-Hart Thanks, Christoph.
I tried declaring the value of SnareMeter, but as soon as I try to do it, I get the same error that constant must be declared on a global level.I exported my script panel as a HISE snippet:
HiseSnippet 7616.3oc68zzbabbkCH0HIBSZSY6MUJW6V6DlOL3FQR7E+xpTL.A.onM+J.TN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Hjo9dKLjKSl+2nPlhBYJJjoPDxTz8vvymgLcgSsOkKFExzy1gLs3KXgLEBVyRQQSdB87WJJZxnnIihlLJZxmgil7IAV5pM9Z91FSOTsgYloYgLsqLyvBYFWYlkExrtxbQVHWzUlKwB4RtxbYVHW1UlqvB4JtxbUVHW0MSvAKJkGdjSljatTJGroTt4SobvnR4lSkxAqJkadUJGLqT83VbsEqppbmpJx5pJTM1KSSAzUkEoSo.+13uERwcnXqtl81ZCgpbmpUQigyA8x7GhzgFhLgFhrgFhECMDKEZHVNzPrxI.AFWX9t5JsMFZDRXuRFlShUpm4jw49+gEQizO
Everything shows as compiled OK, until I try to declare a new element. Please let me know what I need to add/change and where exactly. I look forward to your findings.
Thank you so much! -
@Christoph-Hart said in How to create and animate a signal/gain custom meter in GUI?:
var invPeak = Math.range(1.0 - this.data.currentLevel, 0.0, 1.0);
HiseSnippet 1289.3oc2W0raaaDDdojXPkRcPSQJPORXzCzEoNRtIosHH0xV+DHD+ifksZ7IiUjqj1ZxcYWtTwpAFnuF4VeM5M+HzGidLm5U2YWRIR6xnlJ2VTDBYXrye629wYlcXWA2gDFxEHixGNMffL9PydSYxwMFioLTmlJAGRBkT1Hq9Gg1dZ.NLj3hLLJ9LkEFkKgzOuYyswdXlCIUDB0mScH6P8oxToA0eN0yqM1kbH0Oi0OrdGGNqA2iGAnonYUT.14T7HxdXkYELQF2pkKUxE8jXIIDYTZat6zdi4ujEaeeZHcfGQsnFpGDnXws4dtJDqjhZLl541c1oNDgLL6lxAEi4f6YtK0kNWdJW7QZEVodjkOLJrH3UKK7plK7plG7Lx.uRwv6tl8bDz.YpFE1tsYGljHFhgWAYgUrsnB+VAyFbvBlbce7oj1BXwbOreb0p225QUqt1SVoxJUfWDgRqIXA7N25oVy7aDQ1f6GvYvB6U6ezpW25cwgP.07E3lNQR6j5ToWYuZZxTh2Y8uYqFac7IGr0gs.2qt92TCrPI2IRnET8Z6mDj1hMhxHq6HH.sqRoD6O36INRaU3kqGRjZgMv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