Forum

    • Register
    • Login
    • Search
    • Categories

    Audio Loop Player Auto Detect Note

    Bug Reports
    2
    3
    55
    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.
    • DanH
      DanH last edited by

      I have a 1 second timer running which returns the root note (as automatically detected in the loop player). This updates a combo box with which you can select a new root note or whatever. Basically you drag in a file and within a second it updates the root note combo box.

      Now, when I begin changing the start point of the sample the root note changes! Is it updating itself based on what the start is? The sample is a vocal so changes pitch throughout. It's not very helpful tbh! Once the root note is set I imagine you want it kept that way.

      I don't think there is a callback for loading in a new audio file - please correct me if I'm wrong...

      1 Reply Last reply Reply Quote 0
      • d.healey
        d.healey last edited by d.healey

        I've just encountered the same issue. I'm wondering if we can use the new broadcaster system for this and react when the pitch is updated. @Christoph-Hart ??

        By the way, the detected pitch seems to be 10 semitones out for me. If I load a C3 (MIDI 60) file the detected pitch is 50. If the file is 73 the detected pitch is 63. Are you experiencing that? Maybe it's just my audio files.

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public HISE tutorials

        1 Reply Last reply Reply Quote 0
        • d.healey
          d.healey last edited by d.healey

          Actually I found the proper solution and it's quite simple.

          const audioFile = AudioLoopPlayer1.getAudioFile(0);
          	
          audioFile.setContentCallback(function(event)
          {
              if (isDefined(event))
              {
          	var rootNote = AudioLoopPlayer1.getAttribute(AudioLoopPlayer1.RootNote);
          	knbRoot.setValue(rootNote);
              }			
          });
          

          Libre Wave - Freedom respecting instruments and effects
          My Patreon - HISE tutorials
          YouTube Channel - Public HISE tutorials

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

          4
          Online

          851
          Users

          5.7k
          Topics

          52.9k
          Posts