Qbasicnews.com

Full Version: C++ Music(not mine)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7
Hey guys, a bunch of college students wanted to know if you can play music using TurboC++?

They say its kinda like our "Play" statement. :*)

BTW, They also need a "Calendar" proggie. :*)
You have to code it yourself, I mean, you have to communicate with the speaker in low level and write the parser for the "PLAY - alike" notation.
Hm...I believe one of Turbo's non-ANSI library functions plays a note for a specified duration and frequency...so you could use that and just tinker, find out which frequencies turn out to be A, B, etc.
You can use sound(frequency), delay(milliseconds) and nosound() to play notes in TC/BC. (They're in DOS.H)
I knew it! I knew it! Confusedhifty:
Zack: meh

You could use the table provided by Plasma to write a function which accepts a string and then parses it to play the 'music'.
Just trying to show off my nerdiness, no other braggadocio implied... Tongue
:lol:
Quote:You can use sound(frequency), delay(milliseconds) and nosound() to play notes in TC/BC. (They're in DOS.H)

Okay, I don't have TurboC++ But would QuickC suffice?


I mean the calling procedures look different.

I'll try to find a book an learn C to see what I can do.


Just yesterday, I help another bunch of students with their turbo pascal proggie. A baking proggie, not really hard as I had lil experience in Turbo pascal already. :*)

But C? I have 0 knowledge. :*(

I just want to help these students seeing how they persevere to know stuff. :*)
I suggested to bear directly with hardware 'cause these functions only work in BorlandC. BorlandC can be evil: it features tons and tons of non portable functions, so it is very usual that BorlandC code doesn't work anywhere else.
Pages: 1 2 3 4 5 6 7