{"id":20762023,"url":"https://github.com/donkeyclip/motorcortex-sounddrag","last_synced_at":"2025-04-30T06:28:38.911Z","repository":{"id":40434594,"uuid":"382037766","full_name":"donkeyclip/motorcortex-sounddrag","owner":"donkeyclip","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-14T05:28:34.000Z","size":2851,"stargazers_count":0,"open_issues_count":15,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-14T06:31:07.887Z","etag":null,"topics":["motorcortex","motorcortex-plugin","sound"],"latest_commit_sha":null,"homepage":"","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/donkeyclip.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-07-01T13:12:24.000Z","updated_at":"2022-04-01T08:46:00.000Z","dependencies_parsed_at":"2023-11-18T00:53:29.693Z","dependency_job_id":"dacab684-53f0-4766-ae87-a7f45838336e","html_url":"https://github.com/donkeyclip/motorcortex-sounddrag","commit_stats":{"total_commits":319,"total_committers":10,"mean_commits":31.9,"dds":0.4106583072100314,"last_synced_commit":"69af7d7b15557f756d23ed79ff217c51698dd73e"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donkeyclip%2Fmotorcortex-sounddrag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donkeyclip%2Fmotorcortex-sounddrag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donkeyclip%2Fmotorcortex-sounddrag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donkeyclip%2Fmotorcortex-sounddrag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/donkeyclip","download_url":"https://codeload.github.com/donkeyclip/motorcortex-sounddrag/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251653557,"owners_count":21622150,"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":["motorcortex","motorcortex-plugin","sound"],"created_at":"2024-11-17T10:28:43.322Z","updated_at":"2025-04-30T06:28:38.844Z","avatar_url":"https://github.com/donkeyclip.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MotorCortex-SoundDrag\n\n**Table of Contents**\n\n- [MotorCortex-SoundDrag](#motorcortex-sounddrag)\n  - [Demo](#demo)\n- [Intro / Features](#intro--features)\n- [Getting Started](#getting-started)\n  - [Installation](#installation)\n  - [Importing and Loading](#importing-and-loading)\n- [Creating Incidents](#creating-incidents)\n  - [Track](#track)\n  - [Extra Effects](#extra-effects-with-audioeffect)\n- [Adding Incidents in your clip](#adding-incidents-in-your-clip)\n- [Contributing](#contributing)\n- [License](#license)\n- [Sponsored by](#sponsored-by)\n\n## Demo\n\n[Check it out here](https://donkeyclip.github.io/motorcortex-sounddrag/demo/)\n\n# Intro / Features\n\nThe MotorCortex-SoundDrag is a plugin that allows you to add music or sound effects easily to your clips.\nGo to [sounds.donkeyclip.com](https://sounds.donkeyclip.com/) find the sound you like to use from a big list of license-free sounds and copy the name of the sound. Then create a new track incident and use the copied name as the value for the attribute key name and you have done.\n\n\n# Getting Started\n## Installation\n\n```bash\n$ npm install --save @donkeyclip/motorcortex-sounddrag\n# OR\n$ yarn add @donkeyclip/motorcortex-sounddrag\n```\n\n## Importing and loading\n\n```javascript\nimport { loadPlugin } from \"@donkeyclip/motorcortex/\";\nimport SoundDragPlugin from \"@donkeyclip/motorcortex-sounddrag\";\nconst SoundDrag = loadPlugin(SoundDragPlugin);\n```\n\n# Creating Incidents\n## Track\n\n```javascript\nconst newHTMLClip = new SoundDrag.Track(\n  {\n    name: \"Electronic-Violin_16057\",\n    startFrom: 0,\n    duration: 2000,\n    fadeIn: false,\n    fadeOut: false,\n  },\n  {\n    repeats: 3,\n    hiatus: 1000,\n    delay: 1000,\n    id: \"myClip\",\n  }\n);\n```\n\n### Track Attrs\n\n| Name      |                       Are                       |  Values |\n| --------- | :---------------------------------------------: | ------: |\n| name      | name of the sound from donkeyclip.sounddrag.com |   sting |\n| startFrom |      millisecond which sound start playing      |     num |\n| duration  |        for how long the sound will play         |     num |\n| fadeIn    |       this will enable the fadein effect        | boolean |\n| fadeOut   |       this will enable the fadeout effect       | boolean |\n\n## Extra Effects with AudioEffect\nIf `fadeIn` and `fadeOut` effects are not enough for you, you can create your effects using MotorCortex [AudioEffect](https://docs.motorcortexjs.com/sound/audio-incidents#audioeffect) to apply your custom effect you need an id to select the Audio source this id is \"track-id\"\nand then add the incident to the track incident.\n#### Example\n\n```javascript\nconst MyEffect = new AudioEffect(\n  {\n    animatedAttrs: {\n      pan: 1,\n      gain: 0,\n    },\n  },\n  {\n    selector: \"~#track-id\",\n    duration: 3000,\n  }\n);\n\ntrackIncident.addIncident(MyEffect, 1000);\n```\n\n#### IMPORTANT\nYou should import AudioEffect from MotorCortex.\n```javascript\nimport { AudioEffect } from \"@donkeyclip/motorcortex\";\n```\n# Adding Incidents in your clip\n\n```javascript\nclipName.addIncident(incidentName,startTime);\n```\n\n# Contributing \n\nIn general, we follow the \"fork-and-pull\" Git workflow, so if you want to submit patches and additions you should follow the next steps:\n1.\t**Fork** the repo on GitHub\n2.\t**Clone** the project to your own machine\n3.\t**Commit** changes to your own branch\n4.\t**Push** your work back up to your fork\n5.\tSubmit a **Pull request** so that we can review your changes\n\n# License\n\n[MIT License](https://opensource.org/licenses/MIT)\n\n# Sponsored by\n[\u003cimg src=\"https://presskit.donkeyclip.com/logos/donkey%20clip%20logo.svg\" width=250\u003e\u003c/img\u003e](https://donkeyclip.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdonkeyclip%2Fmotorcortex-sounddrag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdonkeyclip%2Fmotorcortex-sounddrag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdonkeyclip%2Fmotorcortex-sounddrag/lists"}