Pitch fade confusion



  • 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
    

 

1
Online

383
Users

1.2k
Topics

8.8k
Posts