HISE Logo Forum
    • Categories
    • Register
    • Login
    1. HISE
    2. Lurch
    3. Best
    L
    • Profile
    • Following 0
    • Followers 0
    • Topics 19
    • Posts 111
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: Preset Browser callback?

      @d-healey Ahh gotcha - thanks as always d.healey!

      For the future:

      //PresetDisplay
      const var PresetNameLabel = Content.getComponent("PresetNameLabel");
      UserPresetHandler.setPostCallback(function()
      {
      	PresetNameLabel.set("text", Engine.getCurrentUserPresetName());
      });
      
      posted in Scripting
      L
      Lurch
    • RE: Best way to do wet dry volume compensation?

      @griffinboy This was it! For some reason I never even noticed the drop down on the wet/dry gain! Thanks as always :)

      posted in ScriptNode
      L
      Lurch
    • RE: More Types of Saturation

      @griffinboy Can't wait to see what you make, this sounds amazing!

      posted in General Questions
      L
      Lurch
    • RE: Is it possible to insert a looping video in a UI?

      @ulrik That one didn't work properly for me so I use this:

      Link Preview Image
      CSS Sprite Generator - CSS Portal

      Welcome to CSS Sprite Generator, the fastest way for you to make CSS sprites.

      favicon

      (www.cssportal.com)

      What I did to get this working was:

      • Trim the empty space from the video edges.
      • Convert the video to GIF - https://ezgif.com/video-to-gif
      • Extract the frames from the GIF as PNG files - https://ezgif.com/split
      • Convert all the PNGs into a filmstrip with the above CSS Sprite Generator
      • attach filmstrip to Panel in HISE.
      /** Looping Video Panel */
      inline function createHeadSprite(name, x, y)
      {
          local widget = Content.addPanel(name, x, y);
          
          Content.setPropertiesFromJSON(name, {
            "width": WIDTH OF SINGLE PNG,
            "height": HEIGHT OF SINGLE PNG,
            "saveInPreset": true,
            "allowCallbacks": "Clicks, Hover & Dragging"
          });
          
          // Asset Strip
          widget.loadImage("{PROJECT_FOLDER}FILMSTRIP.png", "filmstrip");
          
          widget.setPaintRoutine(function(g)
          {
              // Calculate the index (the filmstrip has 100 slices, each ???px high
              var index = parseInt(this.getValue()*197.0);
              
              g.drawImage("filmstrip", [0, 0, this.getWidth(), this.getHeight()], 0, index * ???);
          });
          
          // This is the sensitivity of the rotation
          widget.data.sensitivity = 300;
          
          // Save the down value as reference for all drag deltas
          widget.data.downValue = 0.0;
          
          widget.setMouseCallback(function(event)
          {
              if(event.clicked)
              {
                  // Store the current value for reference when dragging
                  this.data.downValue = this.getValue();
              }
              
              if(event.drag)
              {
                  // Use both axis to allow diagonal drag behaviour
                  var delta = event.dragX + -1.0 * event.dragY;
                  
                  // normalize the delta using the given sensitivity
                  var deltaNormalized = delta / this.data.sensitivity;
                  
                  // Calculate the new value and truncate it to 0...1
                  var newValue = this.data.downValue + deltaNormalized;
                  newValue = newValue - Math.floor(newValue);
                  
                  // Update the panel
                  this.setValue(newValue);
                  this.changed();
                  this.repaint();
              }
          });
          
          return widget;
      };
      
      const sprite = createHeadSprite("LOOPPANEL", X, Y);
      
      //	timer for animation (FPS)
      reg count = 0;
      sprite.setTimerCallback(function()
      {
      	count = (count+1) % 24;
      	this.setValue(count * 1/24);
      	this.changed();
      });
      //Speed
      sprite.startTimer(62); //Play with this to set speed
      

      Hope that helps someone out!

      posted in General Questions
      L
      Lurch
    • RE: Is it possible to insert a looping video in a UI?

      @d-healey I saw in another thread you advised someone to check the pool to see how much memory the bitmaps were using (if I understood correctly at least!). Created a popup window, Image pool table, although looking at it now it might not be showing the full size as hise sees it.

      posted in General Questions
      L
      Lurch
    • RE: Is it possible to insert a looping video in a UI?

      @ulrik Thank you! Thank works beautifully - I had a few issues but I've got it going smoothly and it looks killer. Thank you to you all.

      RE memory usage, I cropped the dead space from the video when I converted it to a film strip, according to the image pool table it looks like it's using around 100mb RAM, much better than expected.

      @d-healey Once again thanks for your help - is there a way we can update the documentation to reflect the fix above? Or can only Christopher do that?

      posted in General Questions
      L
      Lurch
    • RE: Convolution impulse not included in final plugin

      @Soundavid Thanks for your response!
      I already have multithreading and 'Rebuild Pool Files' enabled as I suspected they might help! I hadn't cleaned my build folder, I've done that now and recompiled and ITS WORKING! Thank you so much for your help.
      Just as a learning moment - did I do something wrong here? How often should I be cleaning my build directories?

      posted in General Questions
      L
      Lurch
    • RE: Neural Amp Modeler (NAM) in HISE

      @Christoph-Hart Any news? This would be an amazing addition to HISE.

      posted in General Questions
      L
      Lurch
    • RE: HISE supports gif images

      @CatABC Not sure what you're trying to do but this might help - if you want moving images in HISE what I did to get this working was:

      Link Preview Image
      CSS Sprite Generator - CSS Portal

      Welcome to CSS Sprite Generator, the fastest way for you to make CSS sprites.

      favicon

      (www.cssportal.com)

      Extract the frames from the GIF as PNG files - https://ezgif.com/split
      Convert all the PNGs into a filmstrip with the above CSS Sprite Generator
      Add your filmstrip to your project images folder
      Attach filmstrip to Panel in HISE.

      You'll need to tweak the timer and speed values to get it looking how you want.

      /** Looping Video Panel */
      inline function createHeadSprite(name, x, y)
      {
          local widget = Content.addPanel(name, x, y);
          
          Content.setPropertiesFromJSON(name, {
            "width": WIDTH OF SINGLE PNG,
            "height": HEIGHT OF SINGLE PNG,
            "saveInPreset": true,
            "allowCallbacks": "Clicks, Hover & Dragging"
          });
          
          // Asset Strip
          widget.loadImage("{PROJECT_FOLDER}FILMSTRIP.png", "filmstrip");
          
          widget.setPaintRoutine(function(g)
          {
              // Calculate the index (the filmstrip has 100 slices, each ???px high
              var index = parseInt(this.getValue()*197.0);
              
              g.drawImage("filmstrip", [0, 0, this.getWidth(), this.getHeight()], 0, index * ???);
          });
          
          // This is the sensitivity of the rotation
          widget.data.sensitivity = 300;
          
          // Save the down value as reference for all drag deltas
          widget.data.downValue = 0.0;
          
          widget.setMouseCallback(function(event)
          {
              if(event.clicked)
              {
                  // Store the current value for reference when dragging
                  this.data.downValue = this.getValue();
              }
              
              if(event.drag)
              {
                  // Use both axis to allow diagonal drag behaviour
                  var delta = event.dragX + -1.0 * event.dragY;
                  
                  // normalize the delta using the given sensitivity
                  var deltaNormalized = delta / this.data.sensitivity;
                  
                  // Calculate the new value and truncate it to 0...1
                  var newValue = this.data.downValue + deltaNormalized;
                  newValue = newValue - Math.floor(newValue);
                  
                  // Update the panel
                  this.setValue(newValue);
                  this.changed();
                  this.repaint();
              }
          });
          
          return widget;
      };
      
      const sprite = createHeadSprite("LOOPPANEL", X, Y);
      
      //	timer for animation (FPS)
      reg count = 0;
      sprite.setTimerCallback(function()
      {
      	count = (count+1) % 24;
      	this.setValue(count * 1/24);
      	this.changed();
      });
      //Speed
      sprite.startTimer(62); //Play with this to set speed
      
      
      posted in Feature Requests
      L
      Lurch
    • RE: Creating a velocity limiting knob, can someone show me how this should look?

      @d-healey That would help. Face palmed pretty hard there.

      Just in case it helps anyone in future!

      function onNoteOn()
      {
      //Velocity Limiter Knob
      Message.setVelocity(Math.min(Message.getVelocity(), MaxVelKnob.getValue())); 
      Console.print("Velocity: " + Message.getVelocity());
      };
       
      
      posted in Scripting
      L
      Lurch
    • RE: custom node compile log on Mac vs Windows

      @Orvillain I had this same thing, I also had an xcbeautify warning in all my compilation logs - d.Healey gave me the fix for this the other day (check my post history) and after swapping the xcbeautify exec with the correct one (and removing the quarantine in terminal) the error disappeared in HISE and now I have a clear readout (same as Xcode) within the HISE debugger.

      posted in C++ Development
      L
      Lurch