Download the PHP package remithefox/morse without Composer

On this page you can find all versions of the php package remithefox/morse. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package morse

remithefox/wave

A PHP library that generates morse code to wave file

Installation

Composer

Usage

Creating wave file object

First you need to have object of writable wave file (package remithefox/wave). You can open existing file or create new by builder e.g.:

Creating morse encoder object

Next you need to create MorseEncoder object. e.g.:

Constructor parameters

parameter type default description
$wave WaveInterface (none) wave file object
$channels array (none) array of channel numbers which you want to use
$wpm float 20 speed in WPM (words per minute; see speed)
$tone float 700 signal tone in Hz
$volume float 1 volume (should be in range 0..1)

NOTICE: wpm, tone and volume can be changed after create object (see setters).

Generating text messages

To generate text messages you can use MorseEncoder::text() method. e.g.:

On " " character, to file will be added moment of silence with length 10 times longer than dot. You can also use method MorseEncoder::space() to add this silence. e.g.:

Sending procedural characters

To send procedural characters you can use dedicated methods (see procedural character table). e.g.:

You can also use shortcut between < and > to send procedural characters (see procedural character table). e.g.

Procedural character table

shortcut dedicated method morse code significance
<AR> endOfMessage() ╸━╸╸━╸╸ End of Message
<AS> wait() ╸━╸╸╸╸ Wait (I need some time)
<BK> breakIn() ━╸╸╸╸━╸╸━╸ Break in
<EC> endCopy() ╸━╸╸━╸╸ End Copy - end of transmission
<HH> correction() ╸╸╸╸╸╸╸╸ Correction
<KA> attention() ━╸╸━╸╸━╸ Attention
<KN> goAhead() ━╸╸━╸━╸╸ Go ahead
<RT> newLine() ╸━╸╸━╸ Return - new line
<SK> silentKey() ╸╸╸━╸╸━╸ End of contact (after call sign means deceased operator)
<SOS> sos() ╸╸╸━╸━╸━╸╸╸╸ SOS, Save Our Souls - distress signal
<VE> verified() ╸╸╸━╸╸ Verified

Short numbers mode

If you want to use short number signals you can set short numbers mode. e.g.:

NOTICE: some short number signals are same as some letter signals. You can use short number mode when you are sending lot digits e.g. phone number, but you should avoid to sending short number signals otherwise, especially during sending call signs or QTH locators. e.g.:

digit normal code short code shor code same as
1 ╸━╸━╸━╸━╸ ╸━╸ A
2 ╸╸━╸━╸━╸ ╸╸━╸ U
3 ╸╸╸━╸━╸ ╸╸╸━╸ V
4 ╸╸╸╸━╸ ╸╸╸╸━╸ (none)
5 ╸╸╸╸╸ E
6 ━╸╸╸╸╸ ━╸╸╸╸╸ (none)
7 ━╸━╸╸╸╸ ━╸╸╸╸ B
8 ━╸━╸━╸╸╸ ━╸╸╸ D
9 ━╸━╸━╸━╸╸ ━╸╸ N
0 ━╸━╸━╸━╸━╸ ━╸ T

Getters

getter returning type significance
getWpm() float returns transmission speed in WPM (words per minute)
getTone() float returns tone in Hz
isShortNumbers() bool returns true short numbers mode is set
getVolume() float returns volume

Setters

setter parametr type significance
setWpm() float sets transmission speed in WPM (words per minute; see speed)
setTone() float sets tone in Hz
setShortNumbers() bool sets or unsets short numbers mode
setVolume() float sets volume (should be in range 0..1)

Exceptions

All exceptions are in namespace \RemiTheFox\Morse\Exception implements \RemiTheFox\Morse\Exception\MorseExceptionInterface.

exception significance
FileIsNotWritableException wave file is not writable
UnknownCharacterException unknown character
UnknownProceduralCharacterException unknown procedural character
UnterminatedProceduralCharacterException unterminated procedural character in text

Speed

Speed in words per minute cannot be specified precisely because it depends on length of words. Wpm parameter is using to define dot, dash, and silence times.

element time rule 15 WPM 20 WPM 25 WPM
dot 1 200ms / WPM 80ms 60ms 48ms
dash 3 600ms / WPM 240ms 180ms 144ms
silence inside character 1 200ms / WPM 80ms 60ms 48ms
silence between characters 3 600ms / WPM 240ms 180ms 144ms
silence between words 12 000ms / WPM 800ms 600ms 480ms

long text? ASCII-fox:

━╸━╸╸╸╸   ╸╸╸━╸━╸


All versions of morse with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
remithefox/wave Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package remithefox/morse contains the following files

Loading the files please wait ....