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": null,
"name": "adafruit-circuitpython-rtttl",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "adafruit, rtttl, tones, melodies, hardware, micropython, circuitpython",
"author": null,
"author_email": "Adafruit Industries <circuitpython@adafruit.com>",
"download_url": "https://files.pythonhosted.org/packages/d7/25/46957dcc4d5062b4e737d2112ed9a98742434aa645a7caef97ee953268f2/adafruit_circuitpython_rtttl-2.4.23.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.23",
"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": "1834312e449b8042f274d890933e87727e21f5335f0655f49ffac4a8056f0cbb",
"md5": "b95162c8f3649b7abbd7b1379c8e8265",
"sha256": "5887dac0967acbd4bc5d874724f0d1d1bfaa455a46d70f63d14fa7b1ead6c0eb"
},
"downloads": -1,
"filename": "adafruit_circuitpython_rtttl-2.4.23-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b95162c8f3649b7abbd7b1379c8e8265",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 5782,
"upload_time": "2024-10-07T22:35:00",
"upload_time_iso_8601": "2024-10-07T22:35:00.225730Z",
"url": "https://files.pythonhosted.org/packages/18/34/312e449b8042f274d890933e87727e21f5335f0655f49ffac4a8056f0cbb/adafruit_circuitpython_rtttl-2.4.23-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d72546957dcc4d5062b4e737d2112ed9a98742434aa645a7caef97ee953268f2",
"md5": "98979697f295edb337169b16eb9ed76b",
"sha256": "6ce50066829268b19d5a60a3faf9ce32bf5c2c72ee3cefcefcdbb8efb3c08cd0"
},
"downloads": -1,
"filename": "adafruit_circuitpython_rtttl-2.4.23.tar.gz",
"has_sig": false,
"md5_digest": "98979697f295edb337169b16eb9ed76b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 27291,
"upload_time": "2024-10-07T22:35:02",
"upload_time_iso_8601": "2024-10-07T22:35:02.578175Z",
"url": "https://files.pythonhosted.org/packages/d7/25/46957dcc4d5062b4e737d2112ed9a98742434aa645a7caef97ee953268f2/adafruit_circuitpython_rtttl-2.4.23.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-07 22:35:02",
"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"
}