Forum

    • Register
    • Login
    • Search
    • Categories

    Freq to note (st + cents)

    General Questions
    3
    10
    348
    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.
    • hisefilo
      hisefilo last edited by

      Hi guys. I got a table with a lot of frequencies and amplitudes. (still doing additive weird things). Is there a way to turn frequencies to notes? les't say I set freq 447 and the module gets A4 +7 cents value? and to pass that value via scripting?

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

        @hisefilo Go to the API help in HISE and type in "freq". 😄 I only see the opposite - turn note into frequency.

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

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

          @d-healey because I need the opposite 🙂 Engine.getFrequencyForMidiNoteNumber(int midiNumber)

          I need to get note number + cents for a freq. Maybe it's a silly question but you know my basic skills

          Let's say I got an array with "32" frequencies, then I need a sine module to play all of these notes for the freqs on the array

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

            Time to make an array/MIDI list.

            https://en.wikipedia.org/wiki/Piano_key_frequencies

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

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

              @d-healey yes. I already have it but looking for a way to just paste freqs on Hise. Not to convert manually outside Hise

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

                @hisefilo Oh I see the problem.

                Well this page has a formula to convert frequency to pitch:

                https://www.johndcook.com/blog/2013/06/22/how-to-convert-frequency-to-pitch/

                So you should implement this and then share it with us 🙂 or maybe @Christoph-Hart can add it as an Engine function.

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

                hisefilo 1 Reply Last reply Reply Quote 0
                • Christoph Hart
                  Christoph Hart last edited by

                  Basically its just the inversion of this formula from the JUCE method:

                  double MidiMessage::getMidiNoteInHertz (const int noteNumber, const double frequencyOfA) noexcept
                  {
                      return frequencyOfA * std::pow (2.0, (noteNumber - 69) / 12.0);
                  }
                  

                  I‘ll leave that here as excercise in basic math 😉

                  hisefilo 1 Reply Last reply Reply Quote 3
                  • hisefilo
                    hisefilo @Christoph Hart last edited by

                    @Christoph-Hart god bless you. I was about to drop my MacBook through the window 🙂

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

                      @d-healey can't warranty I can do it. But if I get something will share

                      hisefilo 1 Reply Last reply Reply Quote 1
                      • hisefilo
                        hisefilo @hisefilo last edited by hisefilo

                        @d-healey @Christoph-Hart Playing around with additive + FM for pad
                        https://sampleson.com/temp/more-testing.mp3
                        it's just a patch

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

                        8
                        Online

                        810
                        Users

                        5.5k
                        Topics

                        51.9k
                        Posts