
-----------------------------------
ravenzblood
Sat Oct 04, 2003 3:39 pm

Help! With Music Insertion!
-----------------------------------
i need help w/ getting music into my turing code, can anyone gimme the source code to play a file on my comp? and like how to stop/pause/play them?

and how do i create music directly in turing? thx all.

-----------------------------------
Blade
Sat Oct 04, 2003 5:07 pm


-----------------------------------
Music.PlayFile("C:\path\to\file.wav") you can also use MP3's in turing 4

-----------------------------------
AsianSensation
Sat Oct 04, 2003 6:33 pm


-----------------------------------
creating music is fun!!!

use play

and type in the parameter "piano codes", and turing plays the little piano for you.

-----------------------------------
AsianSensation
Sat Oct 04, 2003 6:38 pm


-----------------------------------
here:

http://www.compsci.ca/v2/viewtopic.php?t=618&start=15

download my Xmas songs from this thread. Me and a friend made this, it uses play.

Other than that, I don't know if you can create music.

though you can use
 sound 
to create different frequencies...

-----------------------------------
thoughtful
Sun Oct 12, 2003 12:20 pm

THese are the ways for sound
-----------------------------------
you can use the following for music

this one plays n e notes

Music.Play ( "8cdefgab>c" )


this one opens a file

 Music.PlayFile ("yourfile.wav")
or 
 Music.PlayFile ("path/yourfile.wav")


this one plays a single sound of given frequency for the given period of time

 Music.Sound ( frequenccy, time in miliseconds))   
i.e
Music.Sound ( 1000,100 ) 


this program is in the turing reference using the above command

  process siren
            loop
                for i : 100 .. 3000 by 100
                    Music.Sound ( i, 50 )   % Sound note
                end for
                for decreasing i : 2900 .. 200 by 100
                    Music.Sound ( i, 50 )   % Sound note
                end for
            end loop
        end siren
        
        fork siren
       %he rest of the program goes here while the siren continues "¦


-----------------------------------
Mazer
Sun Oct 12, 2003 2:22 pm


-----------------------------------
just a word of warning if you're going to use the sound command: don't use it for prolonged periods of time (ok, maybe that was more than one word), it'll make you want to shove something sharp in your ears.

-----------------------------------
krishon
Mon Oct 13, 2003 6:18 pm


-----------------------------------
blade, i thought u had to put the music int he same directory, unless its changed from the older versions

-----------------------------------
thoughtful
Mon Oct 13, 2003 8:42 pm

Well
-----------------------------------
Well you can either give the path to the sound file or if its in the same folder you can just give the name

-----------------------------------
krishon
Mon Oct 13, 2003 9:21 pm


-----------------------------------
ok then
