playing a sound in Basic
- mrEliotGhost
- Posts: 7
- Joined: Thu Feb 26, 2015 2:28 am
- My devices: iPad Mini 3
playing a sound in Basic
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
Sincerely, mr. Eliot Ghost........
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: playing a sound in Basic
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.
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.
- mrEliotGhost
- Posts: 7
- Joined: Thu Feb 26, 2015 2:28 am
- My devices: iPad Mini 3
Re: playing a sound in Basic
thank you..will give this a try in the p.m. today........
Sincerely, mr. Eliot Ghost........
- mrEliotGhost
- Posts: 7
- Joined: Thu Feb 26, 2015 2:28 am
- My devices: iPad Mini 3
Re: playing a sound in Basic
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........
Sincerely, mr. Eliot Ghost........
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: playing a sound in Basic
Ok, nice that you could import your music files!
Please show your code and tell what error do you receive.
Please show your code and tell what error do you receive.
- mrEliotGhost
- Posts: 7
- Joined: Thu Feb 26, 2015 2:28 am
- My devices: iPad Mini 3
Re: playing a sound in Basic
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"
music 1 load "files/beepdoub.wav"
music 1 play
the error is.."Error loading music..music 1 load "files/beepdoub.wav"
Sincerely, mr. Eliot Ghost........
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: playing a sound in Basic
Your code assumes that your sound file is in the "files" folder, which is in the same directory as your program.
Is it so?
Is it so?
- mrEliotGhost
- Posts: 7
- Joined: Thu Feb 26, 2015 2:28 am
- My devices: iPad Mini 3
Re: playing a sound in Basic
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........
Sincerely, mr. Eliot Ghost........
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: playing a sound in Basic
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
music 1 load "beepdoub.wav"
music 1 play
- mrEliotGhost
- Posts: 7
- Joined: Thu Feb 26, 2015 2:28 am
- My devices: iPad Mini 3
Re: playing a sound in Basic
thank you kind sir, I will try this in the A.M. ........Eliott
Sincerely, mr. Eliot Ghost........