{"id":15703950,"url":"https://github.com/keijiro/midianimationtrack","last_synced_at":"2025-04-13T11:48:19.954Z","repository":{"id":37924457,"uuid":"156225583","full_name":"keijiro/MidiAnimationTrack","owner":"keijiro","description":"SMF (.mid) file importer for Unity Timeline","archived":false,"fork":false,"pushed_at":"2022-07-10T13:16:39.000Z","size":2395,"stargazers_count":457,"open_issues_count":8,"forks_count":46,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-04-11T14:43:52.557Z","etag":null,"topics":["midi","timeline","unity","unity3d"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/keijiro.png","metadata":{"files":{"readme":"README.md","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-11-05T13:52:12.000Z","updated_at":"2025-04-10T09:54:29.000Z","dependencies_parsed_at":"2022-07-12T17:03:28.024Z","dependency_job_id":null,"html_url":"https://github.com/keijiro/MidiAnimationTrack","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keijiro%2FMidiAnimationTrack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keijiro%2FMidiAnimationTrack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keijiro%2FMidiAnimationTrack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keijiro%2FMidiAnimationTrack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/keijiro","download_url":"https://codeload.github.com/keijiro/MidiAnimationTrack/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248710411,"owners_count":21149186,"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":["midi","timeline","unity","unity3d"],"created_at":"2024-10-03T20:09:04.312Z","updated_at":"2025-04-13T11:48:19.934Z","avatar_url":"https://github.com/keijiro.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"MIDI Animation Track for Unity Timeline\n=======================================\n\n![Ableton](https://i.imgur.com/yxJr18E.png)\n![Unity](https://i.imgur.com/aTMgdnB.gif)\n\n**MIDI Animation Track** is a custom timeline/playables package that provides\nfunctionality to control object properties based on sequence data contained\nin a standard MIDI file (`.mid` file). This allows you to create musically\nsynchronized animation using a DAW (digital audio workstation) that is easy\nto manage accurately synchronized timings compared to other non-musical\ntimeline editors like Unity's one.\n\nSystem requirements\n-------------------\n\n- Unity 2019.1 or later\n\nInstallation\n------------\n\nThis package is distributed via the [npmjs] registry. You can import it using\nthe [scoped registry] feature of Unity Package Manager.\n\nTo import the package, please add the following sections to the package\nmanifest file (`Packages/manifest.json`).\n\nTo the `scopedRegistries` section:\n\n```\n{\n  \"name\": \"Keijiro\",\n  \"url\": \"https://registry.npmjs.com\",\n  \"scopes\": [ \"jp.keijiro\" ]\n}\n```\n\nTo the `dependencies` section:\n\n```\n\"jp.keijiro.klak.timeline.midi\": \"1.0.5\"\n```\n\nAfter changes, the manifest file should look like below:\n\n```\n{\n  \"scopedRegistries\": [\n    {\n      \"name\": \"Keijiro\",\n      \"url\": \"https://registry.npmjs.com\",\n      \"scopes\": [ \"jp.keijiro\" ]\n    }\n  ],\n  \"dependencies\": {\n    \"jp.keijiro.klak.timeline.midi\": \"1.0.5\",\n    ...\n```\n\n[npmjs]: https://www.npmjs.com/\n[scoped registry]: https://docs.unity3d.com/Manual/upm-scoped.html\n\nImporting .mid files\n--------------------\n\nYou can import a `.mid` file as an asset file. Simply drag and drop it to the\nproject view, or navigate to \"Assets\" - \"Import New Asset...\".\n\nAt the moment, the MIDI file importer doesn't support set-tempo meta events,\nso the sequence tempo value (BPM) must be manually specified in the inspector.\n\n![Inspector](https://i.imgur.com/Yap4Tn0.png)\n\nAn imported asset may contain multiple tracks that are shown as sub-assets\nunder it.\n\n![Sub-assets](https://i.imgur.com/tuBe3py.png)\n\nTo create a MIDI animation track, drag and drop one of these clip assets to\na timeline.\n\n![Drag and drop](https://i.imgur.com/WVMaG6J.gif)\n\nTrack controls\n--------------\n\nYou can animate object properties from a MIDI animation track using **track\ncontrols**. To create a new track control, select a MIDI animation track (not a\nclip) in the Timeline editor. Then track control editor will appear in the\ninspector.\n\n![Track controls](https://i.imgur.com/uOwwWKR.gif)\n\nA track control only can animate a single property. You can add multiple\ncontrols to animate multiple different properties.\n\nAt the moment, a track control only supports `float`, `Vector3`, `Quaternion`\nand `Color` properties. Please note that it requires a public *property* to\nbe animated; Just providing a public *variable* is not enough.\n\nThere are three modes in the track control: **Note Envelope**, **Note Curve**\nand **CC**.\n\n### Note Envelope mode\n\n![Inspector](https://i.imgur.com/7SFMCk9.png)\n\n**Note Envelope** is a mode where a property is animated by a classic [ADSR]\nstyle envelope. This mode is useful when you want to make animation react to\nkey-off events.\n\nYou can specify which **Note/Octave** the control reacts to. Please note that\nkey velocity affects the envelope. It's simply multiplied to the envelope\noutput.\n\n[ADSR]: https://en.wikipedia.org/wiki/Envelope_(music)\n\n### Note Curve mode\n\n![Inspector](https://i.imgur.com/YFATPN0.png)\n\n**Note Curve** is a mode where a property is animated by an animation curve.\nIt starts playing animation on key-on events and keeps playing until it ends\n(key-off events will be ignored).\n\nYou can specify which **Note/Octave** the control reacts to. Please note that\nkey velocity affects the animation curve. It's simply multiplied to the curve\nvalue.\n\n### CC mode\n\n![Inspector](https://i.imgur.com/ERFtPKL.png)\n\n**CC** is a mode where a property is animated by CC (control change) events\ncontained in a MIDI track.\n\nYou can specify which **CC Number** the control reacts to.\n\nMIDI signals\n------------\n\nA MIDI animation track also supports sending [Timeline Signals] on key-on/off\nevents. To receive MIDI events from a track, you can use the **MIDI Signal\nReceiver** component.\n\n[Timeline Signals]:\n    https://blogs.unity3d.com/2019/05/21/how-to-use-timeline-signals/\n\n![Inspector](https://i.imgur.com/LAwiWel.png)\n\n1. Add the MIDI Signal Receiver component to a game object that receives MIDI\n   signals. \n2. Specify which **Note/Octave** the receiver reacts to.\n3. Register methods to **Note On/Off Events**.\n4. Set the receiver game object as the output destination of the track.\n\n![Output destination](https://i.imgur.com/PqYi9cN.gif)\n\nYou can add multiple receiver components to a single game object. It's useful\nto invoke different methods for each note.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeijiro%2Fmidianimationtrack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeijiro%2Fmidianimationtrack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeijiro%2Fmidianimationtrack/lists"}