{"id":13826445,"url":"https://github.com/eriknyquist/tones","last_synced_at":"2025-05-01T05:30:24.350Z","repository":{"id":56031331,"uuid":"142721388","full_name":"eriknyquist/tones","owner":"eriknyquist","description":"Pure-python library for generating audio tones, with support for polyphony, pitch-bending and vibrato","archived":false,"fork":false,"pushed_at":"2020-12-01T06:45:09.000Z","size":36,"stargazers_count":17,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-06T08:27:37.718Z","etag":null,"topics":["audio","audio-synthesis","beep","beeps","digital-signal-processing","music","music-composition","pure-python","synthesis","tones"],"latest_commit_sha":null,"homepage":"https://tones.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eriknyquist.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-29T01:19:54.000Z","updated_at":"2023-11-24T10:49:20.000Z","dependencies_parsed_at":"2022-08-15T11:50:21.253Z","dependency_job_id":null,"html_url":"https://github.com/eriknyquist/tones","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eriknyquist%2Ftones","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eriknyquist%2Ftones/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eriknyquist%2Ftones/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eriknyquist%2Ftones/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eriknyquist","download_url":"https://codeload.github.com/eriknyquist/tones/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251830449,"owners_count":21650802,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio","audio-synthesis","beep","beeps","digital-signal-processing","music","music-composition","pure-python","synthesis","tones"],"created_at":"2024-08-04T09:01:37.848Z","updated_at":"2025-05-01T05:30:24.041Z","avatar_url":"https://github.com/eriknyquist.png","language":"Python","readme":"Tones\n=====\n\nA pure-python module for generating simple tones as audio samples, which can\noptionally be written directly to a .wav audio file. Supports pitch-bending,\nvibrato, polyphony, several waveform types (sine, square, triangle,\nsawtooth), and several other waveform-shaping options.\n\nInstallation\n============\n\nInstall from the PyPi repository:\n\n::\n\n    pip install tones\n\nExample\n=======\n\n.. code:: python\n\n   from tones import SINE_WAVE, SAWTOOTH_WAVE\n   from tones.mixer import Mixer\n\n   # Create mixer, set sample rate and amplitude\n   mixer = Mixer(44100, 0.5)\n\n   # Create two monophonic tracks that will play simultaneously, and set\n   # initial values for note attack, decay and vibrato frequency (these can\n   # be changed again at any time, see documentation for tones.Mixer\n   mixer.create_track(0, SAWTOOTH_WAVE, vibrato_frequency=7.0, vibrato_variance=30.0, attack=0.01, decay=0.1)\n   mixer.create_track(1, SINE_WAVE, attack=0.01, decay=0.1)\n\n   # Add a 1-second tone on track 0, slide pitch from c# to f#)\n   mixer.add_note(0, note='c#', octave=5, duration=1.0, endnote='f#')\n\n   # Add a 1-second tone on track 1, slide pitch from f# to g#)\n   mixer.add_note(1, note='f#', octave=5, duration=1.0, endnote='g#')\n\n   # Mix all tracks into a single list of samples and write to .wav file\n   mixer.write_wav('tones.wav')\n    \n   # Mix all tracks into a single list of samples scaled from 0.0 to 1.0, and\n   # return the sample list\n   samples = mixer.mix()\n\nDocumentation\n=============\n\nFull API documention is here: `\u003chttps://tones.readthedocs.io\u003e`_\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feriknyquist%2Ftones","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feriknyquist%2Ftones","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feriknyquist%2Ftones/lists"}