Git Product home page Git Product logo

morse.js's Introduction

Morse.js

A jQuery Plugin that annotates text with Morse Code

Samuel F. B. Morse created a code for the electric telegraph in the early 1840s that allowed alphanumeric characters to be encoded into a sequence of short and long tones. It is still widely used among radio operators as a means of identifying themselves, as well as communicating messages over a channel too narrow or noisy for speech transmission.1

This plugin will transcribe the morse code for text in the selected elements. In browsers that support the <ruby> HTML element, the transcription will appear above the text. By default, clicking on these elements will play the corresponding audio for the transcription.

Demo

Bleeps and bloops speak louder than words:

Try it out at: http://mattt.github.com/Morse.js/

Note: Requires browser with support for HTML5 <audio>, such as Safari 4, Firefox 3.5, or Chrome

Usage

$("p").morseCode({bpm:12});
  • bpm rate at which the message is played (default: 12, or 1 unit = 100ms)

In addition, there are two namespaced events that you can trigger and bind to:

  • morse.emit will generate and play the tones for morse code elements
  • morse.mute will stop morse code tone sounds from <audio> elements

Requirements

  • jQuery 1.4+

Credit

Javascript client-side WAV generation based on code by sk89q See http://sk89q.therisenrealm.com/ for more info.

Thanks to Justin Slepak for adding support for punctuation characters.

Contact

Mattt Thompson

License

Morse.js is available under the MIT license. See the LICENSE file for more info.

morse.js's People

Contributors

mattt avatar jrslepak avatar

Watchers

James Cloos avatar Philip Eriksson avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.