{"id":16731499,"url":"https://github.com/skratchdot/audio-automator","last_synced_at":"2025-03-15T18:22:36.691Z","repository":{"id":57186564,"uuid":"50736061","full_name":"skratchdot/audio-automator","owner":"skratchdot","description":"A better way to change AudioParam values","archived":false,"fork":false,"pushed_at":"2016-01-30T18:59:40.000Z","size":675,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-22T08:10:27.886Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://projects.skratchdot.com/audio-automator/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skratchdot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-30T17:33:08.000Z","updated_at":"2016-02-03T23:11:37.000Z","dependencies_parsed_at":"2022-09-14T17:10:24.666Z","dependency_job_id":null,"html_url":"https://github.com/skratchdot/audio-automator","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/skratchdot%2Faudio-automator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skratchdot%2Faudio-automator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skratchdot%2Faudio-automator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skratchdot%2Faudio-automator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skratchdot","download_url":"https://codeload.github.com/skratchdot/audio-automator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243771110,"owners_count":20345403,"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-10-12T23:37:37.110Z","updated_at":"2025-03-15T18:22:36.668Z","avatar_url":"https://github.com/skratchdot.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# audio-automator\n\n[![NPM version](https://badge.fury.io/js/audio-automator.svg)](http://badge.fury.io/js/audio-automator)\n[![Build Status](https://travis-ci.org/skratchdot/audio-automator.png?branch=master)](https://travis-ci.org/skratchdot/audio-automator)\n[![Code Climate](https://codeclimate.com/github/skratchdot/audio-automator.png)](https://codeclimate.com/github/skratchdot/audio-automator)\n[![Coverage Status](https://coveralls.io/repos/skratchdot/audio-automator/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/skratchdot/audio-automator?branch=master)\n[![Dependency Status](https://david-dm.org/skratchdot/audio-automator.svg)](https://david-dm.org/skratchdot/audio-automator)\n[![devDependency Status](https://david-dm.org/skratchdot/audio-automator/dev-status.svg)](https://david-dm.org/skratchdot/audio-automator#info=devDependencies)\n\n[![NPM](https://nodei.co/npm/audio-automator.png)](https://npmjs.org/package/audio-automator)\n\n\n## Description\n\nA better way to change AudioParam values.\n\nThis library was created to deal with some of the issues I've encountered when\nworking with the WebAudio [AudioParam](http://webaudio.github.io/web-audio-api/#AudioParam)\n([MDN](https://developer.mozilla.org/en-US/docs/Web/API/AudioParam))\nautomation features. The [web-audio-api](http://webaudio.github.io/web-audio-api/)\nprovides 6 functions for automating param values, as well as letting you set the\nparam.value directly:\n\n- AudioParam.cancelScheduledValues()\n- AudioParam.exponentialRampToValueAtTime()\n- AudioParam.linearRampToValueAtTime()\n- AudioParam.setTargetAtTime()\n- AudioParam.setValueAtTime()\n- AudioParam.setValueCurveAtTime()\n\nThere are however, some annoyances with the API (IMHO), so I created this\nlibrary.  For example, when using any of the 6 functions above, the param.value\ndoes not change while automations are occurring, so you cannot inspect where in\nthe automation you are (you have to calculate this yourself by keeping track\nof timings).  Also, when you cancel an automation, the \"value\" jumps back to\nthe value when the automation started (which may or may not be what you intended).\n\nI've \"fixed\" these issues by always setting the param.value directly, and not\nusing the built-in web audio automation functions.  This allows me to expose\ndifferent types of automation easing functions, as well as allowing end users\nto inspect automation timings and values at any time.  It also lets you schedule\nnew automations that just \"pick up from the right spot\".  Meaning you don't have\nto cancel running automations if you don't want to.  Just schedule a new one,\nand the most recent automation added will work correctly.\n\nYou can check out a live demo here:\n\n- [http://projects.skratchdot.com/audio-automator/demo](http://projects.skratchdot.com/audio-automator/demo)\n\n\n## Getting Started\n\nInstall the module with: `npm install audio-automator`\n\n\n## Documentation\n\n#### Basic Usage\n\n```javascript\nimport AudioAutomator from 'audio-automator';\n\n// create a context, and a gain node (which we will automate)\nconst audioContext = new AudioContext();\nconst gain = audioContext.createGain();\n\n// create our AudioAutomator\nconst auto = new AudioAutomator(audioContext);\n\n// Automate the gain node:\n// This waits for 3 seconds, then starts using a `sinInOut` easing\n// function to change the value of the gain node to 0.5. It will\n// take 1.2 seconds to complete the automation.\nauto.sinInOut(gain.gain, 0.5, 1.2, 3);\n```\n\n\n## Links\n\n- [Homepage](https://github.com/skratchdot/audio-automator/)\n- [Demo](http://projects.skratchdot.com/audio-automator/demo)\n\n\n## License\nCopyright (c) 2016 [skratchdot](http://skratchdot.com/)  \nLicensed under the [MIT license](LICENSE-MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskratchdot%2Faudio-automator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskratchdot%2Faudio-automator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskratchdot%2Faudio-automator/lists"}