Introduction
============
.. image:: https://readthedocs.org/projects/adafruit-circuitpython-rtttl/badge/?version=latest
:target: https://docs.circuitpython.org/projects/rtttl/en/latest/
:alt: Documentation Status
.. image:: https://raw.githubusercontent.com/adafruit/Adafruit_CircuitPython_Bundle/main/badges/adafruit_discord.svg
:target: https://adafru.it/discord
:alt: Discord
.. image:: https://github.com/adafruit/Adafruit_CircuitPython_RTTTL/workflows/Build%20CI/badge.svg
:target: https://github.com/adafruit/Adafruit_CircuitPython_RTTTL/actions/
:alt: Build Status
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
:alt: Code Style: Black
This plays `RTTTL <https://en.wikipedia.org/wiki/Ring_Tone_Transfer_Language>`_ melodies.
Dependencies
=============
This driver depends on:
* `Adafruit CircuitPython <https://github.com/adafruit/circuitpython>`_
* `Adafruit CircuitPython Waveform <https://github.com/tannewt/Adafruit_CircuitPython_Waveform>`_
Please ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloading
`the Adafruit library and driver bundle <https://github.com/adafruit/Adafruit_CircuitPython_Bundle>`_.
Installing from PyPI
====================
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
PyPI <https://pypi.org/project/adafruit-circuitpython-rtttl/>`_. To install for current user:
.. code-block:: shell
pip3 install adafruit-circuitpython-rtttl
To install system-wide (this may be required in some cases):
.. code-block:: shell
sudo pip3 install adafruit-circuitpython-rtttl
To install in a virtual environment in your current project:
.. code-block:: shell
mkdir project-name && cd project-name
python3 -m venv .venv
source .venv/bin/activate
pip3 install adafruit-circuitpython-rtttl
Usage Example
=============
This plays Frosty the Snowman:
.. code-block:: python
import board
import adafruit_rtttl
adafruit_rtttl.play(board.A0, "Snowman:d=8,o=5,b=200:2g,4e.,f,4g,2c6,b,c6,4d6,4c6,4b,a,2g.,b,c6,4d6,4c6,4b,a,a,g,4c6,4e.,g,a,4g,4f,4e,4d,2c.,4c,4a,4a,4c6,4c6,4b,4a,4g,4e,4f,4a,4g,4f,2e.,4e,4d,4d,4g,4g,4b,4b,4d6,d6,b,4d6,4c6,4b,4a,4g,4p,2g")
CPX Usage Example
=================
This plays Frosty the Snowman on a Circuit Playground Express (we must enable onboard speaker):
.. code-block:: python
import board
from digitalio import DigitalInOut, Direction
import adafruit_rtttl
spkrenable = DigitalInOut(board.SPEAKER_ENABLE)
spkrenable.direction = Direction.OUTPUT
spkrenable.value = True
adafruit_rtttl.play(board.A0, "Snowman:d=8,o=5,b=200:2g,4e.,f,4g,2c6,b,c6,4d6,4c6,4b,a,2g.,b,c6,4d6,4c6,4b,a,a,g,4c6,4e.,g,a,4g,4f,4e,4d,2c.,4c,4a,4a,4c6,4c6,4b,4a,4g,4e,4f,4a,4g,4f,2e.,4e,4d,4d,4g,4g,4b,4b,4d6,d6,b,4d6,4c6,4b,4a,4g,4p,2g")
Documentation
=============
API documentation for this library can be found on `Read the Docs <https://docs.circuitpython.org/projects/rtttl/en/latest/>`_.
For information on building library documentation, please check out `this guide <https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/sharing-our-docs-on-readthedocs#sphinx-5-1>`_.
Contributing
============
Contributions are welcome! Please read our `Code of Conduct
<https://github.com/adafruit/Adafruit_CircuitPython_rtttl/blob/main/CODE_OF_CONDUCT.md>`_
before contributing to help this project stay welcoming.
Raw data
{
"_id": null,
"home_page": "",
"name": "adafruit-circuitpython-rtttl",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "adafruit,rtttl,tones,melodies,hardware,micropython,circuitpython",
"author": "",
"author_email": "Adafruit Industries <circuitpython@adafruit.com>",
"download_url": "https://files.pythonhosted.org/packages/4f/e0/d3c25bb7515478721a05ee905eea92268c3269565efc7e788aba040b90c8/adafruit-circuitpython-rtttl-2.4.22.tar.gz",
"platform": null,
"description": "\nIntroduction\n============\n\n.. image:: https://readthedocs.org/projects/adafruit-circuitpython-rtttl/badge/?version=latest\n :target: https://docs.circuitpython.org/projects/rtttl/en/latest/\n :alt: Documentation Status\n\n.. image:: https://raw.githubusercontent.com/adafruit/Adafruit_CircuitPython_Bundle/main/badges/adafruit_discord.svg\n :target: https://adafru.it/discord\n :alt: Discord\n\n.. image:: https://github.com/adafruit/Adafruit_CircuitPython_RTTTL/workflows/Build%20CI/badge.svg\n :target: https://github.com/adafruit/Adafruit_CircuitPython_RTTTL/actions/\n :alt: Build Status\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n :target: https://github.com/psf/black\n :alt: Code Style: Black\n\nThis plays `RTTTL <https://en.wikipedia.org/wiki/Ring_Tone_Transfer_Language>`_ melodies.\n\nDependencies\n=============\nThis driver depends on:\n\n* `Adafruit CircuitPython <https://github.com/adafruit/circuitpython>`_\n* `Adafruit CircuitPython Waveform <https://github.com/tannewt/Adafruit_CircuitPython_Waveform>`_\n\nPlease ensure all dependencies are available on the CircuitPython filesystem.\nThis is easily achieved by downloading\n`the Adafruit library and driver bundle <https://github.com/adafruit/Adafruit_CircuitPython_Bundle>`_.\n\nInstalling from PyPI\n====================\n\nOn supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from\nPyPI <https://pypi.org/project/adafruit-circuitpython-rtttl/>`_. To install for current user:\n\n.. code-block:: shell\n\n pip3 install adafruit-circuitpython-rtttl\n\nTo install system-wide (this may be required in some cases):\n\n.. code-block:: shell\n\n sudo pip3 install adafruit-circuitpython-rtttl\n\nTo install in a virtual environment in your current project:\n\n.. code-block:: shell\n\n mkdir project-name && cd project-name\n python3 -m venv .venv\n source .venv/bin/activate\n pip3 install adafruit-circuitpython-rtttl\n\nUsage Example\n=============\n\nThis plays Frosty the Snowman:\n\n.. code-block:: python\n\n import board\n import adafruit_rtttl\n\n adafruit_rtttl.play(board.A0, \"Snowman:d=8,o=5,b=200:2g,4e.,f,4g,2c6,b,c6,4d6,4c6,4b,a,2g.,b,c6,4d6,4c6,4b,a,a,g,4c6,4e.,g,a,4g,4f,4e,4d,2c.,4c,4a,4a,4c6,4c6,4b,4a,4g,4e,4f,4a,4g,4f,2e.,4e,4d,4d,4g,4g,4b,4b,4d6,d6,b,4d6,4c6,4b,4a,4g,4p,2g\")\n\nCPX Usage Example\n=================\n\nThis plays Frosty the Snowman on a Circuit Playground Express (we must enable onboard speaker):\n\n.. code-block:: python\n\n import board\n from digitalio import DigitalInOut, Direction\n import adafruit_rtttl\n spkrenable = DigitalInOut(board.SPEAKER_ENABLE)\n spkrenable.direction = Direction.OUTPUT\n spkrenable.value = True\n\n adafruit_rtttl.play(board.A0, \"Snowman:d=8,o=5,b=200:2g,4e.,f,4g,2c6,b,c6,4d6,4c6,4b,a,2g.,b,c6,4d6,4c6,4b,a,a,g,4c6,4e.,g,a,4g,4f,4e,4d,2c.,4c,4a,4a,4c6,4c6,4b,4a,4g,4e,4f,4a,4g,4f,2e.,4e,4d,4d,4g,4g,4b,4b,4d6,d6,b,4d6,4c6,4b,4a,4g,4p,2g\")\n\nDocumentation\n=============\n\nAPI documentation for this library can be found on `Read the Docs <https://docs.circuitpython.org/projects/rtttl/en/latest/>`_.\n\nFor information on building library documentation, please check out `this guide <https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/sharing-our-docs-on-readthedocs#sphinx-5-1>`_.\n\nContributing\n============\n\nContributions are welcome! Please read our `Code of Conduct\n<https://github.com/adafruit/Adafruit_CircuitPython_rtttl/blob/main/CODE_OF_CONDUCT.md>`_\nbefore contributing to help this project stay welcoming.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "CircuitPython library for playing RTTTL melodies.",
"version": "2.4.22",
"project_urls": {
"Homepage": "https://github.com/adafruit/Adafruit_CircuitPython_RTTTL"
},
"split_keywords": [
"adafruit",
"rtttl",
"tones",
"melodies",
"hardware",
"micropython",
"circuitpython"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "8ba3de4c7587d4c7787b817b46eae2713303ce97f6c1f2eeeb2dbd4f4b4c1b1d",
"md5": "79d501f46bd11205aa05d9f8935459c2",
"sha256": "90537f01c4d86fee68ea97acdedea4f2ffd77a278db6c35508b6aee1c7007b6a"
},
"downloads": -1,
"filename": "adafruit_circuitpython_rtttl-2.4.22-py3-none-any.whl",
"has_sig": false,
"md5_digest": "79d501f46bd11205aa05d9f8935459c2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 5784,
"upload_time": "2023-12-09T17:53:47",
"upload_time_iso_8601": "2023-12-09T17:53:47.192957Z",
"url": "https://files.pythonhosted.org/packages/8b/a3/de4c7587d4c7787b817b46eae2713303ce97f6c1f2eeeb2dbd4f4b4c1b1d/adafruit_circuitpython_rtttl-2.4.22-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4fe0d3c25bb7515478721a05ee905eea92268c3269565efc7e788aba040b90c8",
"md5": "66b781290b75b4167980801eb55d541d",
"sha256": "9e57ef46034c6087b829f3baee0ffce83d1d883979fa30a55589a38d1edb34d2"
},
"downloads": -1,
"filename": "adafruit-circuitpython-rtttl-2.4.22.tar.gz",
"has_sig": false,
"md5_digest": "66b781290b75b4167980801eb55d541d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 27285,
"upload_time": "2023-12-09T17:53:48",
"upload_time_iso_8601": "2023-12-09T17:53:48.845302Z",
"url": "https://files.pythonhosted.org/packages/4f/e0/d3c25bb7515478721a05ee905eea92268c3269565efc7e788aba040b90c8/adafruit-circuitpython-rtttl-2.4.22.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-12-09 17:53:48",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "adafruit",
"github_project": "Adafruit_CircuitPython_RTTTL",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "Adafruit-Blinka",
"specs": []
},
{
"name": "adafruit-circuitpython-waveform",
"specs": []
}
],
"lcname": "adafruit-circuitpython-rtttl"
}