Security News
The Dark Side of Open Source
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
jp.keijiro.klak.timeline.midi
Advanced tools
Readme
MIDI Animation Track is a custom timeline/playables package that provides
functionality to control object properties based on sequence data contained
in a standard MIDI file (.mid
file). This allows you to create musically
synchronized animation using a DAW (digital audio workstation) that is easy
to manage accurately synchronized timings compared to other non-musical
timeline editors like Unity's one.
This package is distributed via the npmjs registry. You can import it using the scoped registry feature of Unity Package Manager.
To import the package, please add the following sections to the package
manifest file (Packages/manifest.json
).
To the scopedRegistries
section:
{
"name": "Keijiro",
"url": "https://registry.npmjs.com",
"scopes": [ "jp.keijiro" ]
}
To the dependencies
section:
"jp.keijiro.klak.timeline.midi": "1.0.5"
After changes, the manifest file should look like below:
{
"scopedRegistries": [
{
"name": "Keijiro",
"url": "https://registry.npmjs.com",
"scopes": [ "jp.keijiro" ]
}
],
"dependencies": {
"jp.keijiro.klak.timeline.midi": "1.0.5",
...
You can import a .mid
file as an asset file. Simply drag and drop it to the
project view, or navigate to "Assets" - "Import New Asset...".
At the moment, the MIDI file importer doesn't support set-tempo meta events, so the sequence tempo value (BPM) must be manually specified in the inspector.
An imported asset may contain multiple tracks that are shown as sub-assets under it.
To create a MIDI animation track, drag and drop one of these clip assets to a timeline.
You can animate object properties from a MIDI animation track using track controls. To create a new track control, select a MIDI animation track (not a clip) in the Timeline editor. Then track control editor will appear in the inspector.
A track control only can animate a single property. You can add multiple controls to animate multiple different properties.
At the moment, a track control only supports float
, Vector3
, Quaternion
and Color
properties. Please note that it requires a public property to
be animated; Just providing a public variable is not enough.
There are three modes in the track control: Note Envelope, Note Curve and CC.
Note Envelope is a mode where a property is animated by a classic ADSR style envelope. This mode is useful when you want to make animation react to key-off events.
You can specify which Note/Octave the control reacts to. Please note that key velocity affects the envelope. It's simply multiplied to the envelope output.
Note Curve is a mode where a property is animated by an animation curve. It starts playing animation on key-on events and keeps playing until it ends (key-off events will be ignored).
You can specify which Note/Octave the control reacts to. Please note that key velocity affects the animation curve. It's simply multiplied to the curve value.
CC is a mode where a property is animated by CC (control change) events contained in a MIDI track.
You can specify which CC Number the control reacts to.
A MIDI animation track also supports sending Timeline Signals on key-on/off events. To receive MIDI events from a track, you can use the MIDI Signal Receiver component.
You can add multiple receiver components to a single game object. It's useful to invoke different methods for each note.
FAQs
MIDI Animation Track is a custom timeline/playables package that provides functionality to control object properties based on sequence data contained in a standard MIDI file
The npm package jp.keijiro.klak.timeline.midi receives a total of 2,038 weekly downloads. As such, jp.keijiro.klak.timeline.midi popularity was classified as popular.
We found that jp.keijiro.klak.timeline.midi demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
Research
Security News
The Socket Research team found this npm package includes code for collecting sensitive developer information, including your operating system username, Git username, and Git email.
Security News
OpenJS is warning of social engineering takeovers targeting open source projects after receiving a credible attempt on the foundation.