HISE Logo Forum
    • Categories
    • Register
    • Login

    Freq to note (st + cents)

    Scheduled Pinned Locked Moved General Questions
    10 Posts 3 Posters 626 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.
    • hisefiloH
      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.healeyD 1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey @hisefilo
        last edited by d.healey

        @hisefilo Go to the API help in HISE and type in "freq". :D 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

        hisefiloH 1 Reply Last reply Reply Quote 0
        • hisefiloH
          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.healeyD
            d.healey
            last edited by d.healey

            Time to make an array/MIDI list.

            Link Preview Image
            Piano key frequencies - Wikipedia

            favicon

            (en.wikipedia.org)

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

            hisefiloH 1 Reply Last reply Reply Quote 0
            • hisefiloH
              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.healeyD 1 Reply Last reply Reply Quote 0
              • d.healeyD
                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:

                Link Preview Image
                How to convert frequency to pitch

                I saw somewhere that James Earl Jones' speaking voice is around 85 Hz. What musical pitch is that? Let P be the frequency of some pitch you're interested in and let C = 261.626 be the frequency of middle C. If h is the number of half steps from C to P then P /

                favicon

                John D. Cook | Applied Mathematics Consulting (www.johndcook.com)

                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

                hisefiloH 1 Reply Last reply Reply Quote 0
                • Christoph HartC
                  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 ;)

                  hisefiloH 1 Reply Last reply Reply Quote 3
                  • hisefiloH
                    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
                    • hisefiloH
                      hisefilo @d.healey
                      last edited by hisefilo

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

                      hisefiloH 1 Reply Last reply Reply Quote 1
                      • hisefiloH
                        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

                        53

                        Online

                        1.7k

                        Users

                        11.7k

                        Topics

                        101.8k

                        Posts