HISE Logo Forum
    • Categories
    • Register
    • Login

    Pitch fade confusion

    Scheduled Pinned Locked Moved Scripting
    1 Posts 1 Posters 264 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.
    • d.healeyD
      d.healey
      last edited by d.healey

      I've been puzzled by something today with Synth.addPitchFade() but I think I've figured it out. I was adding a fine pitch target of -200ct but for some reason the pitch keeps going up instead of down. After playing around with it some more I think this happens because the fine pitch only expects a value of +-100ct and anything over 100 (in either direction) is reversed. So a value of 600 will cause the pitch to go up 1 semi-tone while a value of 700 will cause it to go down a semi-tone.

      @Christoph-Hart Could you confirm that this is the intended behaviour?

      The solution I'm about to implement is to check if the value is >100 and if so use it to set the coarse pitch, anything remaining will be used for the fine pitch.

      pitch = 150; //Cents
      reg coarse = parseInt(pitch / 100); //Get semi-tones
      reg fine = pitch % 100; //Get remaining
      

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

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

      22

      Online

      1.7k

      Users

      11.8k

      Topics

      103.0k

      Posts