PC Review


Reply
Thread Tools Rate Thread

how to create a WAV file of different tones?

 
 
Tim_Mac
Guest
Posts: n/a
 
      25th Jun 2008
hi,
i'm trying to create a WAV file using c# that will contain a set of
beep tones, which are only known at run time. It is a bit like morse
code except that each tone will correspond to an alphanumeric
character. I've searched around the newsgroups and google and most of
what i found was about using Win32 functions to perform system beeps,
but i want to create a WAV file containing the beeps, not beep out
through the system speaker.
i've looked at DTMF but i'm looking for something with a complete
'alphabet' of sounds, not just the digit tones. i'm expecting to
define my own alphabet of tones, but have no idea where to start.
if someone could give me a few pointers i'd be really grateful.
tim
 
Reply With Quote
 
 
 
 
Tim_Mac
Guest
Posts: n/a
 
      25th Jun 2008
hi Pete. thanks for your very informative reply.
i meant 'tone' in the general sense like a 'ring tone', technically it
should be that each letter/digit translates to a different frequency.
in terms of an alphabet, i only mean having a pre-defined mapping of
frequencies to letters/digits, that can be encoded by a server into
WAV and decoded by a client hearing the file played back. just like
the way DTMF tones are used to communicate through an automated phone
system. although the application is speaker/microphone based instead
of using any cabled medium.
the question is related to c# because .Net is the platform the
application is being developed in. in the absence of a .Net sound
newsgroup, i picked c# as a best bet. i gather the APIs in the .Net
framework don't do any sound creation or manipulation, so in that
sense you're right it isn't much to do with c#. although since there
is a Win32 function to emit a beep at a specified frequency and
duration, i thought it would not be too much to hope that a similar
function would be available (somewhere) that would output the sound to
a file rather than the outputting directly through PC sound-card or
speaker.
DirectMusic looks like exactly what i was hoping for... i'll probably
end up writing a library that could work something like this:

public void Encode(string code, string filename)
{
using(MemoryStream ms = new MemoryStream())
{
foreach(char c in code.ToCharArray())
ms.Write(TranslateCharToAudio(c));
}
writeStreamToDiskInWavFormat(filename) etc
}

thanks for pointing me in the right direction.
tim.
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
alarm tones =?Utf-8?B?SiBHcmlsbA==?= Microsoft Word Document Management 1 16th Feb 2005 07:49 PM
P3B-F error tones Richard Morris Asus Motherboards 1 25th Oct 2004 11:31 AM
How to get tones from modem during fax? *Vanguard* Windows XP General 2 25th May 2004 08:09 PM
Length of fax tones =?Utf-8?B?TGVl?= Windows XP Print / Fax 3 25th May 2004 04:46 AM
notification tones John Windows XP General 0 9th Jan 2004 05:54 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:37 AM.