Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Turing sound play is messed. please help
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
lufthansa747




PostPosted: 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
Sponsor
Sponsor
Sponsor
sponsor
Insectoid




PostPosted: 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.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: