{"id":13603507,"url":"https://github.com/jpmec/oscillixir","last_synced_at":"2025-04-11T19:32:06.900Z","repository":{"id":146094946,"uuid":"49852606","full_name":"jpmec/oscillixir","owner":"jpmec","description":"An Elixir audio synthesizer","archived":false,"fork":false,"pushed_at":"2016-02-04T14:49:21.000Z","size":59,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2024-11-07T07:46:45.431Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jpmec.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-18T04:45:18.000Z","updated_at":"2023-06-03T22:03:13.000Z","dependencies_parsed_at":"2023-06-25T22:46:29.060Z","dependency_job_id":null,"html_url":"https://github.com/jpmec/oscillixir","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpmec%2Foscillixir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpmec%2Foscillixir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpmec%2Foscillixir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpmec%2Foscillixir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jpmec","download_url":"https://codeload.github.com/jpmec/oscillixir/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248466988,"owners_count":21108577,"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":[],"created_at":"2024-08-01T19:00:23.763Z","updated_at":"2025-04-11T19:32:06.598Z","avatar_url":"https://github.com/jpmec.png","language":"Elixir","funding_links":[],"categories":["Elixir"],"sub_categories":[],"readme":"# Oscillixir\n\nAn attempt at making an audio synthesizer in Elixir.\n\n\n## Components\n\n### Time Source\nThe Source.Timer module provides a time source for audio signal.\nIt periodically notifies the Sequence.Range which creates a series of time values.\n\nBy default:\n\n    * The Source.Timer generates an event notification every 10 ms.\n    * The Sequence.Range generates 441 time events with interval of 0.000022675736961451248.\n\nThe result is a sequence of time events representing 44100 Hz.\n\n### Oscillators\nAn Oscillator is notified with a time, and creates a signal event.\nThe supported oscillators are:\n\n    * Square\n    * Saw\n    * Triangle\n    * Sine\n\n\n\n## Background Research and Design Choices\n\nFor CD-quality audio:\n* the sample rate is 44,100 samples per second.\n* has a sample size of 16 bits\n* has 2 channels\n\nThe common range of human hearing is 20 Hz to 20 kHz.  Humans can hear as low as 12 Hz.\n\n1/44100 second/samples = 0.000022675736961451248 second/sample ~= 23 microsecond/sample\n\n(0.001 second) / (0.000023 second/sample) = 43.47826086956522 samples ~= 43 samples\n\n\nThe Erlang timer is only accurate to 1 millisecond.\nErlang rem function only works on integers.\n:math.sin/1 is the Erlang sine function\n\n\nThe base time unit will be 1 microsecond.\nThis allows many of the calculations to be performed as integers.\n\n\n\n\n\n\n\n\n## Installation\n\nIf [available in Hex](https://hex.pm/docs/publish), the package can be installed as:\n\n  1. Add oscillixir to your list of dependencies in `mix.exs`:\n\n        def deps do\n          [{:oscillixir, \"~\u003e 0.0.1\"}]\n        end\n\n  2. Ensure oscillixir is started before your application:\n\n        def application do\n          [applications: [:oscillixir]]\n        end\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpmec%2Foscillixir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjpmec%2Foscillixir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpmec%2Foscillixir/lists"}