VU meter issue

  • Hi, im trying to add VU meter but I have some problem.
    I created strip with 128 images but when I changed size and filename in code I've got something like this

    I used this code

    /** Creates a VU-Meter from a filmstrip for the master volume. */
    inline function createFilmStripVuMeter(name, x, y, isLeft)
    	local widget = Content.addPanel(name, x, y);
        Content.setPropertiesFromJSON(name, {
          "width": 71, // this uses the exact dimensions of one filmstrip
          "height": 559,
          "opaque": true // opaque is important in order to increase the drawing performance
        // Put the image in your image folder
        widget.loadImage("{PROJECT_FOLDER}elo.bmp", "filmstrip");
        = 0.0; = isLeft;
        // Set the initial image 
        widget.setImage("filmstrip", 0, 0);
        	// Get the peak value from the master output
        	var newValue = Engine.getMasterPeakLevel( ? 0 : 1);
        	if(newValue >
 = newValue;
        		// Just decay the current value (0.92 controls the decay time)
 = * 0.92;
        	// Calculate the filmstrip index
        	// this must be an integer value
        	// 84 is used instead of 128 because 84 is ~0dB which is
        	// more accurate for this example filmstrip
        	var index = parseInt( * 84.0);
        	// If you just want to paint one image, 
        	// you don't need the paint routine, but
        	// just use this method
        	// the yOffset is index * heightOfFilmstrip
        	this.setImage("filmstrip", 0, index * 65);	
        return widget;

  • On:

    I think you have to replace name with the name of your item.
    I could be wrong though

  • Shouldn't be png file?

  • @ustk I just saw that too. All the images need to be .png files

  • @dustbro @ustk are you sure guys? Because I see "animation" but it's very glitchy

  • Yeah I saw that issue too. Latest Hise has a bug about image strip vu meter stuff.

    I resized my image strip to smaller size and it solved.

  • @orange ok, so I need tweak my GUI 🙂 Thx 🙂

Log in to reply