HISE Logo Forum
    • Categories
    • Register
    • Login

    Image Strip usage in the MatrixMeterFloating Tile

    Scheduled Pinned Locked Moved General Questions
    18 Posts 5 Posters 1.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • FortuneF
      Fortune @d.healey
      last edited by

      @d-healey Thanks for the tip.

      Ok so I loaded the image strip to the laf. then recalled it from the laf but it doesn't worked. I think the peak value logic that I am trying is incorrect. I tried including the frame numbers here but I really couldn't figured it out.

      NOTE: 83 is the height of the each image frame. 95= width & 51 = height that I need to scale the frame down to maintain the high image resolution.

      Any help would be appreciated.

      laf.loadImage("{PROJECT_FOLDER}VU_Meter.png", "VUMeter");
      
      laf.registerFunction("drawMatrixPeakMeter", function(g, obj)
         {
         	var value = 0;
      	var numActive = 0;
      	
             for (x in obj.peaks)
             {
      		if (x > 0)
      		{
      			numActive++;
      			value += x;
      			
      		}	        
             }
             value = value / numActive;
      
         	
         	g.drawImage("VUMeter", [0, 0, 95, 51], 0, 83 * value);	   	
      });
          
      
      ustkU 1 Reply Last reply Reply Quote 0
      • ustkU
        ustk @Fortune
        last edited by

        @Fortune Shouldn't be the drawing part inside the loop?

        Can't help pressing F5 in the forum...

        FortuneF 1 Reply Last reply Reply Quote 1
        • FortuneF
          Fortune @ustk
          last edited by

          @ustk Like this? It doesn't work though. I think the frame numbers should be included too. But I can't figure it out...

          laf.registerFunction("drawMatrixPeakMeter", function(g, obj)
             {
             	var value = 0;
          	var numActive = 0;
          	
                 for (x in obj.peaks)
                 {
          		if (x > 0)
          		{
          			value += x;
          			g.drawImage("VUMeter", [0, 0, 95, 51], 0, 83 * value);				
          		}	        
                 }  	
             	
          });
          
          
          orangeO 1 Reply Last reply Reply Quote 0
          • orangeO
            orange @Fortune
            last edited by orange

            @Fortune This is a quick example for the left channel, you need to edit the frame number and adjust the floating tile width-height sizes as your taste. Apply for the right channel with using obj.peaks[1]

            laf.registerFunction("drawMatrixPeakMeter", function(g, obj)
               {
            
            	var a = obj.area;
            	var left = obj.peaks[0];
            	var frames = 128;
            	var left_value = 0;
            	
            	
            	if (left <= 1)
            	left_value = Math.round((frames - 1) * left);
            	
            		
            		
            	else
            	left_value = frames - 1;	
            		
            	g.drawImage("VUMeter", [0, 0, a[2], a[3]], 0, 83 * left_value);	
               	
            });
            
            

            develop Branch / XCode 13.1
            macOS Monterey / M1 Max

            FortuneF 1 Reply Last reply Reply Quote 2
            • FortuneF
              Fortune @orange
              last edited by

              @orange That's it, Thank you!

              BTW, as I see the UpDecayTime and DownDecayTime is not available in laf?

              Any way to set decay times? the VU meter goes pretty fast, a smoothing decay would make this usable, otherwise it is not useable like this...

              orangeO 1 Reply Last reply Reply Quote 0
              • orangeO
                orange @Fortune
                last edited by orange

                @Fortune said in Image Strip usage in the MatrixMeterFloating Tile:

                BTW, as I see the UpDecayTime and DownDecayTime is not available in laf?

                I will check it.

                develop Branch / XCode 13.1
                macOS Monterey / M1 Max

                orangeO FortuneF 2 Replies Last reply Reply Quote 0
                • orangeO
                  orange @orange
                  last edited by orange

                  Plus the DecayTime thing above: If we hard pan to the right or left, the signal level significantly increases.

                  As you can see, when the pan is in the middle, the peak level is around -23 dB. But for hard left or right pan, the peak value increases to the -13 dB.

                  Edit: the difference is 3 dB, not 10 dB.

                  PM.gif

                  develop Branch / XCode 13.1
                  macOS Monterey / M1 Max

                  ustkU 1 Reply Last reply Reply Quote 0
                  • ustkU
                    ustk @orange
                    last edited by

                    @orange Could it be a linear vs decibel conversion issue when drawing?
                    10dB is quite a drastic pan law indeed... So what is the value saying in the end? (not the image)

                    Can't help pressing F5 in the forum...

                    orangeO 1 Reply Last reply Reply Quote 0
                    • orangeO
                      orange @ustk
                      last edited by orange

                      @ustk OK, I set the gain to 0 dB for both channels and tried again.

                      • Pan is in the middle: 0 dB & 0 dB

                      • Hard Right Pan: -100 dB& +3 dB

                      • Hard Left Pan: +3 dB& -100 dB

                      Is this 3 dB rule?

                      develop Branch / XCode 13.1
                      macOS Monterey / M1 Max

                      Dan KorneffD ustkU 2 Replies Last reply Reply Quote 0
                      • Dan KorneffD
                        Dan Korneff @orange
                        last edited by

                        @orange that sounds correct

                        Dan Korneff - Producer / Mixer / Audio Nerd

                        1 Reply Last reply Reply Quote 1
                        • ustkU
                          ustk @orange
                          last edited by

                          @orange yep 3dB is the expected power loss compensation

                          Can't help pressing F5 in the forum...

                          1 Reply Last reply Reply Quote 0
                          • FortuneF
                            Fortune @orange
                            last edited by

                            Any ideas about the DownDecayTime and UpDecayTime on laf please?

                            orangeO 1 Reply Last reply Reply Quote 0
                            • orangeO
                              orange @Fortune
                              last edited by orange

                              Well, it is not a bug. The DownDecayTime & UpDecayTime functions works great here.

                              I think the issue occurs if multiple floating tiles are assigned to the same Processor module. If you set the FloatingTile to the different module, it works great.

                              The Peak Meter with FilmStrip Image LAF example has been added to our great collection. Yes DecayTime is working in this example. You can see it from HERE.

                              PM.gif

                              develop Branch / XCode 13.1
                              macOS Monterey / M1 Max

                              FortuneF 1 Reply Last reply Reply Quote 1
                              • FortuneF
                                Fortune @orange
                                last edited by

                                @orange I see. Thank you!

                                1 Reply Last reply Reply Quote 0
                                • First post
                                  Last post

                                30

                                Online

                                1.8k

                                Users

                                12.1k

                                Topics

                                105.7k

                                Posts