morse2sound


Namemorse2sound JSON
Version 1.0.3 PyPI version JSON
download
home_pageNone
SummarySoftware to convert text into Morse code sound files.
upload_time2024-06-19 21:24:05
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseNone
keywords morse morsecode ham amateur radio cw
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Morse2sound

## What can I do with this?

From some text, produce a sound file that contains that text, encoded
in Morse code.

## Background

### What's this Morse code thing?

Fast message transport via telegraphy was one of the first practical
uses of electricity, dating back to the middle of the 18th century.

[Samuel F. B. Morse](https://en.wikipedia.org/wiki/Samuel_Morse)
originally devised a scheme to transmit numbers via electric pulses,
with a code book that allowed translation of words to those numbers
and back.  Later, his assistant [Alfred
L. Vail](https://en.wikipedia.org/wiki/Alfred_Vail) improved on this
by coding single letters, so the code book became obsolete.  He used
short, long, longer, and extra long impulses.  His original method is
still remembered as [American Morse
Code](https://en.wikipedia.org/wiki/American_Morse_code), although it
sees little use.  This was again improved by [Friedrich
C. Gerke](https://en.wikipedia.org/wiki/Friedrich_Clemens_Gerke), who
simplified from four different impulse lengths to just two.  Gerke's
code is virtually identical to what is nowadays known as International
Morse Code.  In 1865, an international treaty established the
[ITU](https://www.itu.int/en/Pages/default.aspx) as the first
multinational standards organization, with the purpose of facilitating
cross-border transport of messages.  That same [1865
treaty](http://handle.itu.int/11.1004/020.1000/5.1.61.fr.200) also
formalized Gerke's version of the Morse code.  The coding of the
letters a-z and the digits 0-9 have remained unchanged since then, but
other things like punctuation indeed have seen some changes.  The ITU
still exists and to this day standardizes the [international Morse
code](https://www.itu.int/dms_pubrec/itu-r/rec/m/R-REC-M.1677-1-200910-I!!PDF-E.pdf),
among many other things.

### Is anybody still using Morse telegraphy?

Morse telegraphy is still extensively used by certain sections of the
HAM [amateur radio](https://en.wikipedia.org/wiki/Amateur_radio)
community. For obscure historical/technical reasons, Morse telegraphy
is generally designated as "CW".

CW is ubiquitous.  On an everyday basis, any CW-capable short wave
receiver (such as [Twente Web-SDR](http://websdr.ewi.utwente.nl:8901/)
available on the internet) is likely to pick up CW signals if tuned
through the designated telegraphy ranges, e.g., 7000-7040 kHz.  CW
sees extensive use among DXers (radio amateurs trying to reach rare
far-away places), in contests (radio amateur competitions), and by the
"home-brew" community (radio amateurs constructing their own
equipment).  By its supporters, CW is considered an enjoyable mode of
operation.

## Usage

### What does this software do?

It takes text and produces, as a sound file or stream, a Morse encoded
version of that text.

The output format is that of
[`.wav`](https://en.wikipedia.org/wiki/WAV) files.

### Basic usage

```shell
morse2sound --in message.txt --wpm 12 --out message.wav
```

For more info, do `morse2sound --help` or `morse2sound -h` .


### Character set

The international Morse code.

## Remarks

## Installation

Make sure when you say `python3`, then a resonably recent version of
Python comes up.  In particular, `python3 --version` should give a
3.10.something or later version.

_This software could be easily backported to 3.9 or 3.8, it's only
typing hints that require 3.10 or better.  (Previous published
versions also needed 3.10 or better, but claim to make do with 3.8 or
3.9.  This was a bug.  It has been fixed with 1.0.3: The software now
correctly says it needs Python>=3.10.)_

I suggest you create and activate a `venv`.  On Linux:

    python3 -m venv venv
    . venv/bin/activate

### Install

    pip install morse2sound

### Compression

The `.wav` files generated compress quite well, with the compression
algorithm of your choice, `zip` or something.

## Contributing

Have `git` installed.

```shell
git clone https://gitlab.com/4ham/morse2sound.git
```

Change to the directory `morse2sound` that was created by the above.

Create and activate a virtual environment as per the
[documentation](https://docs.python.org/3/library/venv.html#creating-virtual-environments)
pertaining to your OS.

Then:

```shell
pip install -r requirements_test.frozen
./lint.py
```

Do your changes and repeat that `python ./lint.py` part in your branch
before starting a pull request as usual towards the
[repository](https://gitlab.com/4ham/morse2sound).

## To run locally

```shell
PYTHONPATH=$(pwd)/src python src/cw_enc/driver.py -h
```

## To build locally

In an activated
[virtual environment](https://docs.python.org/3/library/venv.html#creating-virtual-environments):

```shell
pip install --upgrade build
rm -rf dist build morse2sound.egg-info
python -m build
```

To install what you built:

```shell
pip install dist/morse2sound-*-py3-none-any.whl
```

## To upload

This is useful only for the maintainer:

Extended tests with `pip install doit && doit --verbosity 2` .

* Edit the version in `pyproject.toml`
* `git tag -s vx.y.z`
* `git push origin --tags`

```shell
pip install --upgrade build twine
rm -rf dist build src/morse2sound.egg-info
python -m build
python -m twine upload dist/*
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "morse2sound",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "Morse, Morsecode, ham, amateur radio, cw",
    "author": null,
    "author_email": "\"Dr. Andreas Kr\u00fcger, DJ3EI\" <dj3ei@famsik.de>",
    "download_url": "https://files.pythonhosted.org/packages/09/be/5362268bd398a2172cfcf1415c93958e9aa018bcd9296b02a8d8d18bf405/morse2sound-1.0.3.tar.gz",
    "platform": null,
    "description": "# Morse2sound\n\n## What can I do with this?\n\nFrom some text, produce a sound file that contains that text, encoded\nin Morse code.\n\n## Background\n\n### What's this Morse code thing?\n\nFast message transport via telegraphy was one of the first practical\nuses of electricity, dating back to the middle of the 18th century.\n\n[Samuel F. B. Morse](https://en.wikipedia.org/wiki/Samuel_Morse)\noriginally devised a scheme to transmit numbers via electric pulses,\nwith a code book that allowed translation of words to those numbers\nand back.  Later, his assistant [Alfred\nL. Vail](https://en.wikipedia.org/wiki/Alfred_Vail) improved on this\nby coding single letters, so the code book became obsolete.  He used\nshort, long, longer, and extra long impulses.  His original method is\nstill remembered as [American Morse\nCode](https://en.wikipedia.org/wiki/American_Morse_code), although it\nsees little use.  This was again improved by [Friedrich\nC. Gerke](https://en.wikipedia.org/wiki/Friedrich_Clemens_Gerke), who\nsimplified from four different impulse lengths to just two.  Gerke's\ncode is virtually identical to what is nowadays known as International\nMorse Code.  In 1865, an international treaty established the\n[ITU](https://www.itu.int/en/Pages/default.aspx) as the first\nmultinational standards organization, with the purpose of facilitating\ncross-border transport of messages.  That same [1865\ntreaty](http://handle.itu.int/11.1004/020.1000/5.1.61.fr.200) also\nformalized Gerke's version of the Morse code.  The coding of the\nletters a-z and the digits 0-9 have remained unchanged since then, but\nother things like punctuation indeed have seen some changes.  The ITU\nstill exists and to this day standardizes the [international Morse\ncode](https://www.itu.int/dms_pubrec/itu-r/rec/m/R-REC-M.1677-1-200910-I!!PDF-E.pdf),\namong many other things.\n\n### Is anybody still using Morse telegraphy?\n\nMorse telegraphy is still extensively used by certain sections of the\nHAM [amateur radio](https://en.wikipedia.org/wiki/Amateur_radio)\ncommunity. For obscure historical/technical reasons, Morse telegraphy\nis generally designated as \"CW\".\n\nCW is ubiquitous.  On an everyday basis, any CW-capable short wave\nreceiver (such as [Twente Web-SDR](http://websdr.ewi.utwente.nl:8901/)\navailable on the internet) is likely to pick up CW signals if tuned\nthrough the designated telegraphy ranges, e.g., 7000-7040 kHz.  CW\nsees extensive use among DXers (radio amateurs trying to reach rare\nfar-away places), in contests (radio amateur competitions), and by the\n\"home-brew\" community (radio amateurs constructing their own\nequipment).  By its supporters, CW is considered an enjoyable mode of\noperation.\n\n## Usage\n\n### What does this software do?\n\nIt takes text and produces, as a sound file or stream, a Morse encoded\nversion of that text.\n\nThe output format is that of\n[`.wav`](https://en.wikipedia.org/wiki/WAV) files.\n\n### Basic usage\n\n```shell\nmorse2sound --in message.txt --wpm 12 --out message.wav\n```\n\nFor more info, do `morse2sound --help` or `morse2sound -h` .\n\n\n### Character set\n\nThe international Morse code.\n\n## Remarks\n\n## Installation\n\nMake sure when you say `python3`, then a resonably recent version of\nPython comes up.  In particular, `python3 --version` should give a\n3.10.something or later version.\n\n_This software could be easily backported to 3.9 or 3.8, it's only\ntyping hints that require 3.10 or better.  (Previous published\nversions also needed 3.10 or better, but claim to make do with 3.8 or\n3.9.  This was a bug.  It has been fixed with 1.0.3: The software now\ncorrectly says it needs Python>=3.10.)_\n\nI suggest you create and activate a `venv`.  On Linux:\n\n    python3 -m venv venv\n    . venv/bin/activate\n\n### Install\n\n    pip install morse2sound\n\n### Compression\n\nThe `.wav` files generated compress quite well, with the compression\nalgorithm of your choice, `zip` or something.\n\n## Contributing\n\nHave `git` installed.\n\n```shell\ngit clone https://gitlab.com/4ham/morse2sound.git\n```\n\nChange to the directory `morse2sound` that was created by the above.\n\nCreate and activate a virtual environment as per the\n[documentation](https://docs.python.org/3/library/venv.html#creating-virtual-environments)\npertaining to your OS.\n\nThen:\n\n```shell\npip install -r requirements_test.frozen\n./lint.py\n```\n\nDo your changes and repeat that `python ./lint.py` part in your branch\nbefore starting a pull request as usual towards the\n[repository](https://gitlab.com/4ham/morse2sound).\n\n## To run locally\n\n```shell\nPYTHONPATH=$(pwd)/src python src/cw_enc/driver.py -h\n```\n\n## To build locally\n\nIn an activated\n[virtual environment](https://docs.python.org/3/library/venv.html#creating-virtual-environments):\n\n```shell\npip install --upgrade build\nrm -rf dist build morse2sound.egg-info\npython -m build\n```\n\nTo install what you built:\n\n```shell\npip install dist/morse2sound-*-py3-none-any.whl\n```\n\n## To upload\n\nThis is useful only for the maintainer:\n\nExtended tests with `pip install doit && doit --verbosity 2` .\n\n* Edit the version in `pyproject.toml`\n* `git tag -s vx.y.z`\n* `git push origin --tags`\n\n```shell\npip install --upgrade build twine\nrm -rf dist build src/morse2sound.egg-info\npython -m build\npython -m twine upload dist/*\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Software to convert text into Morse code sound files.",
    "version": "1.0.3",
    "project_urls": {
        "Homepage": "https://gitlab.com/4ham/morse2sound",
        "Issues": "https://gitlab.com/4ham/morse2sound/-/issues",
        "Repository": "https://gitlab.com/4ham/morse2sound"
    },
    "split_keywords": [
        "morse",
        " morsecode",
        " ham",
        " amateur radio",
        " cw"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2e63090538640beddc02d0e737b25499ec0dc8398b4b69082f88accc36501e46",
                "md5": "5ed2b1b8def6a8e2c04b0597f8b1cc84",
                "sha256": "97e7cc347ea6faf08d5e6e3846e7aafa30bff02af8dc8a6e2dd53a1c96fbc69a"
            },
            "downloads": -1,
            "filename": "morse2sound-1.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5ed2b1b8def6a8e2c04b0597f8b1cc84",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 15879,
            "upload_time": "2024-06-19T21:24:03",
            "upload_time_iso_8601": "2024-06-19T21:24:03.488772Z",
            "url": "https://files.pythonhosted.org/packages/2e/63/090538640beddc02d0e737b25499ec0dc8398b4b69082f88accc36501e46/morse2sound-1.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "09be5362268bd398a2172cfcf1415c93958e9aa018bcd9296b02a8d8d18bf405",
                "md5": "de9529798f13aa567b7995142b022e3d",
                "sha256": "f71f69189d0e450cbb51c85ed782cb47e2fd4b2f3fe378e20a1f5753d26bf636"
            },
            "downloads": -1,
            "filename": "morse2sound-1.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "de9529798f13aa567b7995142b022e3d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 20385,
            "upload_time": "2024-06-19T21:24:05",
            "upload_time_iso_8601": "2024-06-19T21:24:05.513087Z",
            "url": "https://files.pythonhosted.org/packages/09/be/5362268bd398a2172cfcf1415c93958e9aa018bcd9296b02a8d8d18bf405/morse2sound-1.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-19 21:24:05",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "4ham",
    "gitlab_project": "morse2sound",
    "lcname": "morse2sound"
}
        
Elapsed time: 0.26675s