Computer Science Canada

Turing sound play is messed. please help

Author:  lufthansa747 [ Wed Nov 03, 2010 5:53 pm ]
Post subject:  Turing sound play is messed. please help

What is the problem you are having?
i am trying to get theese sounds to play during my game. but the problem is that turing seems to change the pitch of the notes depending on which is played first. for example if the coin sound is played first all the other sound are in a higher pitch. please help

Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
Turing:

process PlayMusic (playMusic : string, Play : boolean)
    if Play = true then
        if playMusic = "coin" then
            play (">>>>8c2g")
        elsif playMusic = "door" then
            play ("<<<<<4cd+2f")
        elsif playMusic = "key" then
            play (">>>8gc2e")
        elsif playMusic = "die" then
            play ("<<<2b1c+")
        end if
    end if
    return
end PlayMusic

var t : char
fork PlayMusic ("coin", true)
t := getchar
fork PlayMusic ("door", true)
t := getchar
fork PlayMusic ("key", true)
t := getchar
fork PlayMusic ("die", true)
t := getchar
fork PlayMusic ("coin", true)
t := getchar
fork PlayMusic ("door", true)
t := getchar
fork PlayMusic ("key", true)
t := getchar
fork PlayMusic ("die", true)
t := getchar


Please specify what version of Turing you are using
newest

Author:  Insectoid [ Thu Nov 04, 2010 9:56 am ]
Post subject:  RE:Turing sound play is messed. please help

I'm not sure about this, but i think '>' and '<' change the octave of the sound, right?

Turing won't reset the octave after the sound is played, so if you increase the octave by 3 (>>>) you'll need to decrease by 3 (<<<) to reset the sound to normal.


: