HISE Logo Forum
    • Categories
    • Register
    • Login

    Loop Player Root Note

    Scheduled Pinned Locked Moved Scripting
    24 Posts 5 Posters 2.2k 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.
    • DanHD
      DanH @paper_lung
      last edited by

      @paper_lung yes you do. I tend to compress the hise folder before tinkering so I have a backup.

      DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
      https://dhplugins.com/ | https://dcbreaks.com/
      London, UK

      1 Reply Last reply Reply Quote 1
      • d.healeyD
        d.healey @paper_lung
        last edited by

        @paper_lung Yes compile debug versions because it's much quicker. Learn to use git as well, it will make life easier for you when switching between versions or reverting changes that you've made.

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

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

          I managed to remove the root note pitch detection, thanks for the tips everyone. For anyone interested, I commented out the following code in the AudioLooper.cpp file within the source files:

          /*if (copy.getNumSamples() > 0)
          	{
          		auto freq = PitchDetection::detectPitch(copy, 0, copy.getNumSamples(), sr);
          		
          		if (freq == 0.0)
          			return;
          
          		Array<Range<double>> freqRanges;
          
          		freqRanges.add(Range<double>(0, MidiMessage::getMidiNoteInHertz(1) / 2));
          
          		for (int i = 1; i < 126; i++)
          		{
          			const double thisPitch = MidiMessage::getMidiNoteInHertz(i);
          			const double nextPitch = MidiMessage::getMidiNoteInHertz(i + 1);
          			const double prevPitch = MidiMessage::getMidiNoteInHertz(i - 1);
          
          			const double lowerLimit = thisPitch - (thisPitch - prevPitch) * 0.5;
          			const double upperLimit = thisPitch + (nextPitch - thisPitch) * 0.5;
          
          			freqRanges.add(Range<double>(lowerLimit, upperLimit));
          		}
          
          		for (int j = 0; j < freqRanges.size(); j++)
          		{
          			if (freqRanges[j].contains(freq))
          			{
          				setAttribute(AudioLooper::SpecialParameters::RootNote, (float)(j), sendNotification);
          				return;
          			}
          		}
          	} */
          

          I've not fully tested it yet, but hopefully proves useful to someone.

          T 1 Reply Last reply Reply Quote 3
          • T
            treynterrio @paper_lung
            last edited by

            @paper_lung hi, If I remove the pitch detection in the source code, which note will be loaded as root note when I insert a sound?

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

            31

            Online

            1.8k

            Users

            12.0k

            Topics

            104.4k

            Posts