| 09-06-2007, 06:23 AM | #1 |
I am trying to convert one note into a range of notes and I think I can do it using that function. However starting with middle C (or any other note for that matter) I don't know what values to input to get the different notes... If anyone could help at all it would be much appreciated ^.^ |
| 09-06-2007, 06:43 AM | #2 |
In the modern tuning, there are 12 notes from C to C up an octave. They are evenly spaced in the logarithmic frequency domain. So, to go up n half steps, you compute (2.^(1./12.))^n My guess would be that, if SetSoundPitch, this is the right domain for it. |
| 09-06-2007, 07:42 AM | #3 |
um could you give me an example please I don't quite get how it works |
| 09-06-2007, 07:50 AM | #4 |
SetSoundPitch(snd,Pow(2.,4./12.)) should increase the pitch of snd four half steps or a major third. |
| 09-06-2007, 07:53 AM | #5 |
So it would go from C to C#, Db, D, D#? And one more thing I cant find what notes have #'s and b's because I don't think all of them do... EDIT: I found a note list and I believe that the 4th half-step would actually be C, C#, D, D#, E with E being the note. Is that correct? EDIT also according to this formula "(2.^(1./12.))^n" wouldn't the formula actually convert to "SetSoundPitch(snd,Pow(n, Pow(2,1/12))" and as such 4 half steps be SetSoundPitch(snd,Pow(4, Pow(2,1/12)) |
| 09-06-2007, 10:25 PM | #6 |
4 half-steps up from "C" is "E"; the 4th tone is "D#"/"Eb". Notes:
C, C#, D, D#, E, F, F#, G, G#, A, A#, B, C Or C, Db, D, Eb, E, F, Gb, G, Ab, A, Bb, B, C |
| 09-07-2007, 01:13 AM | #7 |
Ok I get that now tks for the list it helps :) as for the formula one or the other was wrong is it correct as "SetSoundPitch(snd,Pow(n, Pow(2,1/12))" or "SetSoundPitch(snd,Pow(2.,n./12.))" PS: @pyro "The Spell Request Thread — Currently Open" closed the thread? |
| 09-07-2007, 01:50 AM | #8 |
(a^n)^m = exp(log((a^n)^m)) = exp(m log(a^n)) = exp(m n log(a)) = exp(log(a^(m n))) = a^(m n) |
| 09-07-2007, 01:58 AM | #9 |
and again im confused :/ what is the value of a, m, and n Or where you just saying that both formulas are the same? |
