
-----------------------------------
Jonny Tight Lips
Wed Oct 13, 2004 7:22 pm

Sound troubles with Music.PlayFile
-----------------------------------
My code
loop
Music.PlayFile ("sworddraw.wav")
end loop

The code seems right to me but when I use it no sounds comes out. There are no errors. I'm thinking that there might be something wrong with the actual sound file so I shal attach it for you all to look at. Hope you can help me. thx
EDIT: Or maybe I won't attch it since compsci doesn't seem to allow you to attach music files. Might I sujest someone (mod/admin) make it so you can. thank you 

-----------------------------------
Cervantes
Wed Oct 13, 2004 7:27 pm


-----------------------------------
When using Music.PlayFile, do not use it in a loop.  I believe that that code would start the song and then restart it each time through the loop.  So you wouldn't hear anything, most likely, because there is no sound in the first thousanth of a second in that file.
Otherwise, for that to actually play the file sworddraw.wav has to be in the same directory as your turing program.  If it is in a parent directory you can use ..   if it is in a different directory all together you can write out the whole path.

-----------------------------------
Jonny Tight Lips
Wed Oct 13, 2004 7:29 pm


-----------------------------------
Nope, and nope. I have it in the same directory and I took off the loops and still nothing.

-----------------------------------
Dan
Wed Oct 13, 2004 8:51 pm


-----------------------------------
Might I sujest  that you learn how to use a ziping progame so you do not use up all my bandwith and space :snooty:

-----------------------------------
Cervantes
Thu Oct 14, 2004 3:38 pm


-----------------------------------
I suggest you open a new turing window and just type in
Music.PlayFile ("sworddraw.wav")
and see if it works.  that way, you know if its that specific line or something with your program (that prevents that line from being executed).

in your program, use processes now for playing sound.

-----------------------------------
Jonny Tight Lips
Thu Oct 14, 2004 5:35 pm


-----------------------------------
Still won't let me post the file. And I did zip it but nothing happens when I hit add attchment just refreshs the page and nothing diffent happens.  
And all I have in my program is the Music.PlayFile ("sworddraw.wav") and it still doesn't work.

-----------------------------------
Cervantes
Thu Oct 14, 2004 6:00 pm


-----------------------------------
then it's your file.  have you tried playing it in some other program? (like windows media player or winamp?)
and dan purposefully doesn't allow .wav files to be uploaded.  think about it, they are huge :?

-----------------------------------
Paul
Thu Oct 14, 2004 6:07 pm


-----------------------------------
I use Music.PlayFileLoop
and
Music.PlayFileStop

-----------------------------------
Jonny Tight Lips
Thu Oct 14, 2004 6:42 pm


-----------------------------------
Yah there was something wrong with my sound file so I jsut got another one.
Now I have another question. How do I stop the music from playing I've tryed
        Music.PlayFile ("woo.mp3")
        Music.PlayFileStop
and 
        Music.PlayFile ("woo.mp3")
        Music.SoundOff

but nethor of them worked. So how do I stop it?[/code]

-----------------------------------
Jonny Tight Lips
Fri Oct 15, 2004 4:17 pm


-----------------------------------
lil help would be appreicated

-----------------------------------
Cervantes
Fri Oct 15, 2004 4:47 pm


-----------------------------------

        var finished : boolean := false

	% Loop playing background music until 'finished' is true.
        process BackgroundMusic
            loop
                exit when finished
                Music.PlayFile ("background.mid")
            end loop
        end BackgroundMusic
        
        fork BackgroundMusic    % Start the background music
        Time.Delay (30000)  % Wait for 30 seconds
        
        % Stop the background music.
        finished := true        % The flag must be set first
        Music.PlayFileStop  % Music.PlayFile will return immediately


-----------------------------------
Jonny Tight Lips
Sat Oct 16, 2004 1:35 pm


-----------------------------------
Ohh I get it. Thanks for the help :D

-----------------------------------
boredstudent3
Sun Oct 24, 2004 12:05 am


-----------------------------------
turing doesn't play mp3's does it?...

if not then i'm sure it will play wav files,,can anybody direct me w/ a link to a good mp3 to wav converter?...thanks folks!...=)

-----------------------------------
Tony
Sun Oct 24, 2004 12:07 am


-----------------------------------
turing plays mp3 files
