Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   play music in C (http://www.go4expert.com/forums/play-music-c-t18423/)

hoda 8Jul2009 14:30

play music in C
Is it possible to write codes in c programming to play music when we run the program?
if the answer is yes can anybody write for me?

shabbir 8Jul2009 14:51

Re: play music in C
I can give you hint. You should use the beep function with needed frequency

mayjune 9Jul2009 21:16

Re: play music in C
i wouldn't really call that beep "music" to my ears .. :p

shabbir 9Jul2009 21:28

Re: play music in C
beep is the function which takes frequency as input

mayjune 9Jul2009 21:40

Re: play music in C
i know, i have heard it & thats why i said its nt really music to my ears....

xpi0t0s 10Jul2009 11:21

Re: play music in C
It's possible to play music in C yes but this is very platform dependent. What operating system are you using, what compiler (and version), and what kind of music do you want to play: do you want to play MIDI files using the standard sound card, do you want to play MP3 files, WAV files or similar, or do you want to synthesis the sounds yourself like a soft synth? Do you want the C program to be directly responsible for creating the sound or could you use C to create, for example, CSound input files then launch CSound to do the sound production?

naimish 10Jul2009 11:24

Re: play music in C
It won't be music I think, it will only an eratative sound, like beep, beep, and beep

All times are GMT +5.5. The time now is 05:52.