HISE Logo Forum
    • Categories
    • Register
    • Login

    Last call for help Audiowaveform xD

    Scheduled Pinned Locked Moved General Questions
    2 Posts 2 Posters 59 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.
    • T
      tiesvdam
      last edited by

      Hi everyone,

      I’m working with an audio waveform that’s linked to a sampler. The loop itself does work, and when I update the start and end points, the loop points adjust accordingly — which is good.

      However, the issue is that when I move the start and end points further apart again, the loop points don’t update anymore. They seem to only respond in one direction (when getting closer), not both ways.

      I’ve been trying to fix this for the past two months, just for this one part — and I still haven’t figured it out. I’ve already received some helpful input through the forum, but I’m stuck on this final issue.

      If anyone is willing to help — even on a paid basis — feel free to reach out.
      I’d really appreciate any insight or solution.

      Thanks in advance!

      //AudioWave LAF
      const var laf = Content.createLocalLookAndFeel();
      
      const var AudioWaveform1 = Content.getComponent("AudioWaveform1");
      AudioWaveform1.setLocalLookAndFeel(laf);
      
      laf.registerFunction("drawThumbnailRange", function(g, obj) {
          
          if (obj.rangeIndex > 0)
          	return;
      
          g.fillAll(0);
          
          // Draw playhead position
          var x = obj.position * obj.area[2];
          
          g.setColour(0xFFFF5400);
          g.drawLine(x, x, 0, obj.area[3], 10.0);
          
          g.setColour(0xFFFFFFFF);
          g.drawLine(x, x, 0, obj.area[3], 1.5);
          
          // Draw start point marker
          var startPointX = obj.area[0];
          g.setColour(0xFFFF5400);
          g.drawLine(startPointX, startPointX, 0, obj.area[3], 10.0);
          g.setColour(0xFFFFFFFF);
          g.drawLine(startPointX, startPointX, 0, obj.area[3], 1.5);
          g.setFont("regular", 12);
          g.setColour(Colours.white);
          g.drawAlignedText("Start", [startPointX - 0, 5, 40, 20], "centred");  // Tekst voor startpunt
          
          // Draw end point marker
          var endPointX = obj.area[2];
          g.setColour(0xFFFF5400);
          g.drawLine(endPointX, endPointX, 0, obj.area[3], 10.0);
          g.setColour(0xFFFFFFFF);
          g.drawLine(endPointX, endPointX, 0, obj.area[3], 1.5);
          g.setFont("regular", 12);
          g.setColour(Colours.white);
          g.drawAlignedText("End", [endPointX - 40, 5, 40, 20], "centred");
      });
      
      
      laf.registerFunction("drawThumbnailPath", function(g, obj) {
          g.fillAll(obj.bgColour);
          
          var a = obj.area;
          g.setGradientFill([0xFFFF5400, a[0], a[1], 0xFF8d478d, a[2], a[3]]);
          g.drawPath(obj.path, obj.area,1.5);
          g.fillPath(obj.path, obj.area);
      });
      
      

      Scherm­afbeelding 2025-05-22 om 10.40.08.png Scherm­afbeelding 2025-05-22 om 10.41.06.png

      HISEnbergH 1 Reply Last reply Reply Quote 0
      • HISEnbergH
        HISEnberg @tiesvdam
        last edited by

        @tiesvdam This is just the paint routine. Do the loop points work without the paint routine. Do you have a minimal snippet?

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

        30

        Online

        1.7k

        Users

        11.8k

        Topics

        102.7k

        Posts