| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | C Soundz .. |
-=> Quoting Frank's message to Mark about New comer .. <=-
FA> G'Day Mark,
How Are Ya Frank ??
FA> A very crude piano, you'll need the ascii chart handy to play music
FA> :-)
FA> #include /* for getch() and kbhit() */
FA> #include /* for sound() and nosound() */
FA> int main()
FA> {
FA> int freq,key = 0;
FA>
FA> printf("\nPress ESC to end.");
FA>
FA> while(key != 27) /* loop until esc was pressed */
FA> {
FA> key = getch(); /* get a key from console */
FA> if(key && key != 27) /* if the key is not 0 and not ESC */
FA> {
FA> freq = key*3; /* set a good audible frequency */
FA> while(!kbhit()) sound(freq); /* play until another key is hit */
FA> nosound(); /* switch off this sound */
FA> }
FA> } /* do it again */
FA> return 0;
FA> }
FA> Hope this gets you going.
Yeah Thanx ..
I messed around with this code, but I cant get the sounds to come up
automaticaly, without a keypress .. Can you please help me again ..
Here's a brief example of what I want to do .. I want to print out a
string, after each char is printed I wont to create a clicking sound .. So
the out out looks like some one is type it with the sounds aswell ..
Also, is there a command like WAIT or something that'll pause for a
few seconds ??
Thanx immensly ..
C'ya ..
... Mr Bungle ...
T.i.T.u
`'`'`'`
... Breast fed: A female FBI agent.
---
* Origin: Insane BBS * 632 6806 * Í[24 hr Multi-Line]Í (3:712/852.1)SEEN-BY: 50/99 620/243 623/630 711/401 409 410 413 430 808 809 932 934 SEEN-BY: 712/311 407 411 505 506 515 517 617 624 704 816 820 824 828 841 844 SEEN-BY: 712/852 713/888 714/906 800/1 @PATH: 712/852 624 517 515 711/808 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.