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

Username:   Password: 
 RegisterRegister   
 Keyboard thing
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
MihaiG




PostPosted: Mon Jul 18, 2005 8:11 pm   Post subject: Keyboard thing

well figure out how to play....hint...(a---A)(w---A#)(s---B)etc....

this wroks on frequencies..not the horendus play function Evil or Very Mad

so far i cna play a bit of mario,tetris,sonic


code:
var a := 440
var a2 := 446
var b := 494
var c := 524
var c2 := 554
var d := 588
var d2 := 622
var e := 660
var f := 698
var f2 := 740
var g := 784
var g2 := 830
var a3 := 880



var key : array char of boolean
loop
    Input.KeyDown (key)
    if key ('a') then
        sound (a, 250)
    elsif key ('w') then
        sound (a2, 250)
    elsif key ('s') then
        sound (b, 250)
    elsif key ('d') then
        sound (c, 250)
    elsif key ('r') then
        sound (c2, 250)
    elsif key ('f') then
        sound (d, 250)
    elsif key ('t') then
        sound (d2, 250)
    elsif key ('g') then
        sound (e, 250)
    elsif key ('h') then
        sound (f, 250)
    elsif key ('u') then
        sound (f2, 250)
    elsif key ('j') then
        sound (g, 250)
    elsif key ('i') then
        sound (g2, 250)
    elsif key ('k') then
        sound (a3, 250)
    end if
end loop
Sponsor
Sponsor
Sponsor
sponsor
MysticVegeta




PostPosted: Tue Jul 19, 2005 12:31 pm   Post subject: (No subject)

whyd o you need variables to do that? you can use no varibles and do it
Cervantes




PostPosted: Tue Jul 19, 2005 1:46 pm   Post subject: (No subject)

It's more readable, this way. Though it would be better if they were constants.
Albrecd




PostPosted: Thu Nov 10, 2005 9:10 am   Post subject: Octaves

You should add Higher/Lower Octaves.
[Gandalf]




PostPosted: Thu Nov 10, 2005 4:06 pm   Post subject: (No subject)

Look here for a much better version of this type idea:
http://www.compsci.ca/v2/viewtopic.php?t=10107
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: