Skip to content

AVK-Apps/MorseCodeToAudio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MorseCodeToAudio

Convert Morse Code from string to bytes[] and then convert to stream for audio playback. See Examples Below.

NuGet

Install using Package Manager console

Install-Package MorseCodeToAudio

Example

    TextToMorse converter = new TextToMorse();
    byte[] convertedbytes = converter.ConvertToMorse(MorseText);

Now using convertedbytes you can convert this to a Stream and create/play audio. See UWP Specific Sample below

You can also control the Character Speed, Words Per Minute and Frequency of the Audio.

    TextToMorse converter = new TextToMorse(20,20,600);
    byte[] convertedbytes = converter.ConvertToMorse(MorseText);

UWP Example

You can use MemoryRandomAccessStream to convert this to Stream and Play using Media Player.

	byte[] outfile = converter.ConvertToMorse(Text);
	MemoryRandomAccessStream randomAccessStream = new MemoryRandomAccessStream(outfile);
	MediaPlayer mediaPlayer = new MediaPlayer();
	mediaPlayer.Source = MediaSource.CreateFromStream(randomAccessStream, "wav");
	mediaPlayer.Play();

Credits

This Project is based on jstoddard/CWLibrary. Thanks to @jstoddard for his awesome Library.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages