The midiratio solution is probably the easiest, and you'll get the freqs in tempered tuning.Using Pythagorean ratios you wetting your feet in the 'just intonation' swampland, a lovely murky world with warm beating qualities. (https://en.wikipedia.org/wiki/Just_intonation).With some caveats:rate * (8/9) * (8/9) * (8/9) * (8/9) * (8/9) * (8/9) == 0.493wheras:rate * 1/2 == 0.5also:rate * (9/8) * (9/8) * (9/8) * (9/8) * (9/8) * (9/8) == 2.027whereas:rate * 2/1 == 2So don't get dragged to far down by seconds if you want to stay true to to your root. ;-)+EirikOn Wed, Jan 9, 2019 at 5:26 PM <eli.fieldsteel@xxxxxxxxx> wrote:You can use the midiratio method:12.midiratio; //—> 2The math involves multiplying the starting frequency by 2 raised to the power of n/12, where n is the up/down semitone shift.Eli--On Wed, Jan 9, 2019 at 10:11 AM <kennethflak@xxxxxxxxxxxxxx> wrote:Just got stumped trying to figure out a conversion between playback rate and semitones. Given that playing back a sample at a rate of 0.5 will transpose it down 12 semitones, and playing it back at 2 will transpose it up 12 st... How do I calculate arbitrary semitone transpositions up and down in terms of playback rates? My math part of the brain is apparently not working today._______________Eli Fieldsteel, DMADirector, University of Illinois Experimental Music StudiosAssistant Professor of Composition-TheoryOffice: 217-300-0956
MB 4008, School of Music1114 W Nevada StreetUrbana, IL 61801