C# Tutorials and offshore development in India

Tutorials Resources Forum Reviews Interview Jobs Projects Training Your Ad Here


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...




Resources » Articles » .NET Framework »

Enhancing the Audio Capabilities in .NET Framework Applications (Musical Fest in Console namespace)


Posted Date: 12 Oct 2007    Resource Type: Articles    Category: .NET Framework
Author: Vasudevan Deepak KumarMember Level: Diamond    
Rating: 1 out of 5Points: 10


I just wanted to share a few points on how best .NET Framework 2.0 enhances the applications by way of rich audio abilities right from a quick system beep to a melodious musical note.



Introduction


I just wanted to share a few points on how best .NET Framework 2.0 enhances the applications by way of rich audio abilities right from a quick system beep to a melodious musical note. This discussion was part of my other article on Dotnetspider (reference http://www.dotnetspider.com/kb/Article3360.aspx). However, I recieved a good number of messages from a section of users who actually suggested me that even though the API forms part of Console, it has a more broader compelling scope for all types of desktop applications and they were also eager to see a bit more detailed highlight on the same.

I hence thought of decoupling the topic from there and elevating it as an independant note of its own.

The Decibel Significance


Windows has grown significantly on its multitasking abilities. It provides tremendous powers and abilities to even users to run multiple applications at a single point of time. Windows XP enhances its GUI in this perspective that it introduced a 'Group Similar Icons' feature for the Taskbar. This actually reduced the visual clutter over the desktop but at the same time, the light flash which happens when some one sends an Instant Message to you via MSN or Yahoo might go unnoticed. Here comes the ability of an application to give a good audible alert.

Windows itself has builtin Audio capabilities for various of its events like Low Battery, Information Message etc.

The .NET Framework Helping Hands


Till about .NET Framework 2.0, the only ability for an application for having audio ability is to use P/Invoke other than having a short beep which can be coded using ASCII 7. However, .NET Framework 2.0 breaks this barrier by introducing a cute little API called

]
Console.Beep();
Console.Beep(frequency, duration);


The first overload is similar to ASCII 7. However, the second overload is quite powerful that you can even configure your system to play musical notes. A quick look at the MSDN for documentation on Console.Beep() would give you musical notes of the first few lines in 'Mary had a little lamb' poem.

A Peek Into the History


A few of you who might have worked in either GWBasic or QBasic would have known about the three powerful commands there:

BEEP: Produces a short shirk beep from the computer speaker
SOUND freq, duration: Produces sound of frequency freq for dur milliseconds
PLAY Plays a musical note from your computer speaker.

Sometime back when I started venturing into this musical power, I posted a question in one of the forums and I even got lot of library references as responses. I would like to give the permalink of the discussion thread for readers reference here: http://www.codeproject.com/script/comments/forums.asp?msg=2213024&forumid=1650#xx2213024xx

Summary


I hope this would have been an enriching experience for the users to know more about a novel feature in .NET Framework 2.0 to add more musical fest and audio alert abilities to thier applications.



Responses to the resource: "Enhancing the Audio Capabilities in .NET Framework Applications (Musical Fest in Console namespace)"

No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: About Caching
Previous Resource: Quick Steps to Email-Enabling your Applications
Return to Discussion Resource Index
Post New Resource
Category: .NET Framework


Post resources and earn money!
 
More Resources




About Us    Contact Us    Privacy Policy    Terms Of Use