Page 1 of 1
playing a sound in Basic
Posted: Thu Feb 26, 2015 2:31 am
by mrEliotGhost
Hi........I would like to augment a small program that I have writing to play a small sound........my question is, how do I put the file from my PC to the iPad and then access it in Basic, and also, what is the code sample to play the sound........these are two basic questions about the 'global' process I am describing, and I appreciate the insight much........I am not familiar with directory structures on iOS devices........thank you........-Eliot
Re: playing a sound in Basic
Posted: Thu Feb 26, 2015 4:16 am
by Mr. Kibernetik
Please read these topics for information how to transfer files from PC to iPad:
viewtopic.php?f=9&t=316
viewtopic.php?f=20&t=41
Please look at sample programs in "Music and Sound" section and also read "Music" section of documentation for information about musical and sound functions of smart BASIC.
Re: playing a sound in Basic
Posted: Thu Feb 26, 2015 1:15 pm
by mrEliotGhost
thank you..will give this a try in the p.m. today........
Re: playing a sound in Basic
Posted: Fri Apr 03, 2015 9:39 pm
by mrEliotGhost
hello..I have done the dropbox steps, and copied the .wav file to the local system of iPad OS of Dropbox, and now have the music commands..however, I get a file error..is there a specific directory tree that I have to address in the commands? A little help here would be good, ty........
Re: playing a sound in Basic
Posted: Sat Apr 04, 2015 2:37 am
by Mr. Kibernetik
Ok, nice that you could import your music files!
Please show your code and tell what error do you receive.
Re: playing a sound in Basic
Posted: Sat Apr 04, 2015 6:20 am
by mrEliotGhost
it's a very small program..
music 1 load "files/beepdoub.wav"
music 1 play
the error is.."Error loading music..music 1 load "files/beepdoub.wav"
Re: playing a sound in Basic
Posted: Sat Apr 04, 2015 7:11 am
by Mr. Kibernetik
Your code assumes that your sound file is in the "files" folder, which is in the same directory as your program.
Is it so?
Re: playing a sound in Basic
Posted: Sat Apr 04, 2015 10:08 pm
by mrEliotGhost
I believe so actually..the file is in the same list as the programs, where the running prog is........originally, i had it in a local folder one.b, which had a similar error with a complimentary code, so I switched to the file folder hoping for a result..I assume /file is the beginning of the directory tree........
Re: playing a sound in Basic
Posted: Sun Apr 05, 2015 12:16 am
by Mr. Kibernetik
If you put your music file in the same directory with your program, then your command will be:
music 1 load "beepdoub.wav"
music 1 play
Re: playing a sound in Basic
Posted: Sun Apr 05, 2015 2:50 am
by mrEliotGhost
thank you kind sir, I will try this in the A.M. ........Eliott