├── Assets ├── Plugins │ ├── jp.goma_recorder.midity.playable │ │ ├── LICENSE.md │ │ ├── CHANGELOG.md │ │ ├── Samples │ │ │ ├── Loop1.mid │ │ │ ├── Loop1.wav │ │ │ ├── Test.unity.meta │ │ │ ├── Test.playable.meta │ │ │ ├── Loop1.mid.meta │ │ │ ├── Loop1.wav.meta │ │ │ └── Test.playable │ │ ├── CHANGELOG.md.meta │ │ ├── LICENSE.md.meta │ │ ├── package.json.meta │ │ ├── Editor.meta │ │ ├── Runtime.meta │ │ ├── Samples.meta │ │ ├── Editor │ │ │ ├── Shaders.meta │ │ │ ├── Utils.meta │ │ │ ├── CustomEditors.meta │ │ │ ├── CustomPropertyDrawer.meta │ │ │ ├── goma_recorder.Midity.Playable.Editor.asmdef.meta │ │ │ ├── Shaders │ │ │ │ ├── MidiClipBackground.shader.meta │ │ │ │ └── MidiClipBackground.shader │ │ │ ├── MidiClipEditor.cs.meta │ │ │ ├── MidiControlDrawer.cs.meta │ │ │ ├── Utils │ │ │ │ ├── CoreEditorUtils.cs.meta │ │ │ │ ├── MidiEditorUtility.cs.meta │ │ │ │ ├── MidiEditorUtility.cs │ │ │ │ └── CoreEditorUtils.cs │ │ │ ├── CustomEditors │ │ │ │ ├── MidiAnimationTrackEditor.cs.meta │ │ │ │ ├── MidiSignalReceiverEditor.cs.meta │ │ │ │ ├── MidiSignalReceiverEditor.cs │ │ │ │ └── MidiAnimationTrackEditor.cs │ │ │ ├── CustomPropertyDrawer │ │ │ │ ├── MidiEnvelopeDrawer.cs.meta │ │ │ │ ├── MidiNoteFilterDrawer.cs.meta │ │ │ │ ├── MidiNoteFilterDrawer.cs │ │ │ │ └── MidiEnvelopeDrawer.cs │ │ │ ├── goma_recorder.Midity.Playable.Editor.asmdef │ │ │ ├── MidiClipEditor.cs │ │ │ └── MidiControlDrawer.cs │ │ ├── Runtime │ │ │ ├── Internal.meta │ │ │ ├── TimelineCustoms.meta │ │ │ ├── goma_recorder.Midity.Playable.Runtime.asmdef.meta │ │ │ ├── MidiSignal.cs.meta │ │ │ ├── MidiControl.cs.meta │ │ │ ├── MidiSignalReceiver.cs.meta │ │ │ ├── Internal │ │ │ │ ├── ControlAction.cs.meta │ │ │ │ ├── MidiSignalPool.cs.meta │ │ │ │ ├── IPropertyCollectorExtension.cs.meta │ │ │ │ ├── MidiSignalPool.cs │ │ │ │ ├── IPropertyCollectorExtension.cs │ │ │ │ └── ControlAction.cs │ │ │ ├── TimelineCustoms │ │ │ │ ├── MidiAnimation.cs.meta │ │ │ │ ├── MidiAnimationAsset.cs.meta │ │ │ │ ├── MidiAnimationMixer.cs.meta │ │ │ │ ├── MidiAnimationTrack.cs.meta │ │ │ │ ├── MidiAnimationAsset.cs │ │ │ │ ├── MidiAnimationTrack.cs │ │ │ │ ├── MidiAnimationMixer.cs │ │ │ │ └── MidiAnimation.cs │ │ │ ├── MidiSignal.cs │ │ │ ├── goma_recorder.Midity.Playable.Runtime.asmdef │ │ │ ├── MidiSignalReceiver.cs │ │ │ └── MidiControl.cs │ │ └── package.json │ └── jp.goma_recorder.midity.playable.meta └── Plugins.meta ├── ProjectSettings ├── ProjectVersion.txt ├── ClusterInputManager.asset ├── PresetManager.asset ├── EditorBuildSettings.asset ├── XRSettings.asset ├── VersionControlSettings.asset ├── TimeManager.asset ├── VFXManager.asset ├── TimelineSettings.asset ├── AudioManager.asset ├── TagManager.asset ├── UnityConnectSettings.asset ├── EditorSettings.asset ├── DynamicsManager.asset ├── PackageManagerSettings.asset ├── NavMeshAreas.asset ├── Physics2DSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── QualitySettings.asset └── ProjectSettings.asset ├── UserSettings └── EditorUserSettings.asset ├── CHANGELOG.md ├── .releaserc.json ├── LICENSE ├── .gitignore ├── .github └── workflows │ └── Release.yml ├── Packages ├── manifest.json └── packages-lock.json └── README.md /Assets/Plugins/jp.goma_recorder.midity.playable/LICENSE.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2020.1.15f1 2 | m_EditorVersionWithRevision: 2020.1.15f1 (97d0ae02d19d) 3 | -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Samples/Loop1.mid: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goma-recorder/PlayableMidi/HEAD/Assets/Plugins/jp.goma_recorder.midity.playable/Samples/Loop1.mid -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Samples/Loop1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/goma-recorder/PlayableMidi/HEAD/Assets/Plugins/jp.goma_recorder.midity.playable/Samples/Loop1.wav -------------------------------------------------------------------------------- /ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_DefaultPresets: {} 8 | -------------------------------------------------------------------------------- /Assets/Plugins.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d87fb8bf051569a44a8bc35eb1acf92a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: [] 8 | m_configObjects: {} 9 | -------------------------------------------------------------------------------- /ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/CHANGELOG.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1d5c794d9242f2440afe3fd741679e2b 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/LICENSE.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b2fcabf962b72b34c8c53a4135c47817 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 47ce186bb45fad6498c626bdf9c43fc9 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Samples/Test.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 22b5e6f199008cd4eb30b5d1d25ab786 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2d58db1d7d94410981d7292756b7ff7b 3 | PackageManifestImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 95babd1e38954b141a69d83e99099c81 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Runtime.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1d2fe39e1f88eb14eba6086a76ae23a2 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Samples.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e1003bb638c712f42bdf55f9b970af21 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /ProjectSettings/VersionControlSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!890905787 &1 4 | VersionControlSettings: 5 | m_ObjectHideFlags: 0 6 | m_Mode: Visible Meta Files 7 | m_CollabEditorSettings: 8 | inProgressEnabled: 1 9 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Editor/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0e3384da983da834e820f4077446e925 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Editor/Utils.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: edacf461231e1464aa6848f82d07008f 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Runtime/Internal.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 39806c936f8f99942b82e4d1d2a04c22 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Editor/CustomEditors.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ba66b3742daa4a14897c7084679e8299 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Runtime/TimelineCustoms.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5bd9c7d316abd564abd7bfb01cd7dd12 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Editor/CustomPropertyDrawer.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 660eff358762f3749933136c223b5854 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Samples/Test.playable.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 88ce1f001e166b449939d0f2b995d6e2 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Editor/goma_recorder.Midity.Playable.Editor.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ae5a740b24f7927d68d54b3c358d7832 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Runtime/goma_recorder.Midity.Playable.Runtime.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a26697c371a4b9e209b2bf58ca857645 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Editor/Shaders/MidiClipBackground.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 29569d38b69283c4a9d089719dd7a001 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Runtime/MidiSignal.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 45ba6af390c2b457b9557855124f545c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Editor/MidiClipEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0ee31ff4ed9ad484c8b212f75b7c1a25 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Runtime/MidiControl.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7b350602dd7853c409d312790eeb640f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Editor/MidiControlDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fcbc59f31260b41cebe03ad99765e36c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Editor/Utils/CoreEditorUtils.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 70f2019bcef6baac9870fa910a9cafbf 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Runtime/MidiSignalReceiver.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 390e5cebc37d6d7258bdb58f0380f9d0 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Editor/Utils/MidiEditorUtility.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 07393333bf4c1f843ae3e3b879595142 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Runtime/Internal/ControlAction.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a1ba0916f9872be869205f5dccee7dea 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Runtime/Internal/MidiSignalPool.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 91de50b7bf16c45e08ac0e05ea7f0fe3 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Runtime/TimelineCustoms/MidiAnimation.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 02590cf8e0c07324fa883eb4a322a5e9 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Runtime/TimelineCustoms/MidiAnimationAsset.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5d6c12d8ad7901a4e8468f23ed0a2dc2 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Runtime/TimelineCustoms/MidiAnimationMixer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d335c00a6d0c6c547b9d4286eaa37650 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Runtime/TimelineCustoms/MidiAnimationTrack.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 69fd8133db33f2546993a421d269f5f6 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Editor/CustomEditors/MidiAnimationTrackEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 141e29605e4487d4bb31a3dcc133805a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Editor/CustomEditors/MidiSignalReceiverEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8b5bfb9b2f528710ea0c8a88ca701bbe 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Editor/CustomPropertyDrawer/MidiEnvelopeDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e12e48eb37ce3df48b751dd05827c52a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Editor/CustomPropertyDrawer/MidiNoteFilterDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1cc282875657ef84e9c39863a75e6db3 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Runtime/Internal/IPropertyCollectorExtension.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cd97f80342b76aa458264cde887ff998 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Samples/Loop1.mid.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3cc0a4a04746ea74286e69f866b42930 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 11500000, guid: 6782f17a22ce146e887bd8530aa7cadc, type: 3} 11 | _codeName: ascii 12 | -------------------------------------------------------------------------------- /ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_StripUpdateShader: {fileID: 0} 10 | m_RenderPipeSettingsPath: 11 | m_FixedTimeStep: 0.016666668 12 | m_MaxDeltaTime: 0.05 13 | m_CompiledVersion: 0 14 | m_RuntimeVersion: 0 15 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Runtime/MidiSignal.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.Playables; 3 | 4 | namespace Midity.Playable 5 | { 6 | // Payload for MIDI event notifications 7 | public sealed class MidiSignal : INotification 8 | { 9 | // MIDI event 10 | public MTrkEvent Event { get; set; } 11 | 12 | // Notification ID (not in use) 13 | PropertyName INotification.id => default; 14 | } 15 | } -------------------------------------------------------------------------------- /ProjectSettings/TimelineSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: a287be6c49135cd4f9b2b8666c39d999, type: 3} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | assetDefaultFramerate: 60 16 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Volume: 1 8 | Rolloff Scale: 1 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_SampleRate: 0 12 | m_DSPBufferSize: 1024 13 | m_VirtualVoiceCount: 512 14 | m_RealVoiceCount: 32 15 | m_SpatializerPlugin: 16 | m_AmbisonicDecoderPlugin: 17 | m_DisableAudio: 0 18 | m_VirtualizeEffects: 1 19 | m_RequestedDSPBufferSize: 1024 20 | -------------------------------------------------------------------------------- /UserSettings/EditorUserSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!162 &1 4 | EditorUserSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_ConfigSettings: 8 | vcSharedLogLevel: 9 | value: 0d5e400f0650 10 | flags: 0 11 | m_VCAutomaticAdd: 1 12 | m_VCDebugCom: 0 13 | m_VCDebugCmd: 0 14 | m_VCDebugOut: 0 15 | m_SemanticMergeMode: 2 16 | m_VCShowFailedCheckout: 1 17 | m_VCOverwriteFailedCheckoutAssets: 1 18 | m_VCOverlayIcons: 1 19 | m_VCAllowAsyncUpdate: 0 20 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Samples/Loop1.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9f2488d52fd30d3418f5ebf1c3d69e62 3 | AudioImporter: 4 | externalObjects: {} 5 | serializedVersion: 6 6 | defaultSettings: 7 | loadType: 0 8 | sampleRateSetting: 0 9 | sampleRateOverride: 44100 10 | compressionFormat: 1 11 | quality: 1 12 | conversionMode: 0 13 | platformSettingOverrides: {} 14 | forceToMono: 0 15 | normalize: 1 16 | preloadAudioData: 1 17 | loadInBackground: 0 18 | ambisonic: 0 19 | 3D: 1 20 | userData: 21 | assetBundleName: 22 | assetBundleVariant: 23 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Runtime/goma_recorder.Midity.Playable.Runtime.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "goma_recorder.Midity.Playable.Runtime", 3 | "references": [ 4 | "GUID:f06555f75b070af458a003d92f9efb00", 5 | "GUID:44ae2b388f237fe40a9f1cd7775307f1" 6 | ], 7 | "includePlatforms": [], 8 | "excludePlatforms": [], 9 | "allowUnsafeCode": false, 10 | "overrideReferences": false, 11 | "precompiledReferences": [], 12 | "autoReferenced": true, 13 | "defineConstraints": [ 14 | "USE_TIMELINE" 15 | ], 16 | "versionDefines": [ 17 | { 18 | "name": "com.unity.timeline", 19 | "expression": "1.3", 20 | "define": "USE_TIMELINE" 21 | } 22 | ], 23 | "noEngineReferences": false 24 | } -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Runtime/Internal/MidiSignalPool.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Midity.Playable 4 | { 5 | // Object pool class for MIDI signals 6 | internal sealed class MidiSignalPool 7 | { 8 | private readonly Stack _freeSignals = new Stack(); 9 | private readonly Stack _usedSignals = new Stack(); 10 | 11 | public MidiSignal Allocate(MTrkEvent data) 12 | { 13 | var signal = _freeSignals.Count > 0 ? _freeSignals.Pop() : new MidiSignal(); 14 | signal.Event = data; 15 | _usedSignals.Push(signal); 16 | return signal; 17 | } 18 | 19 | public void ResetFrame() 20 | { 21 | while (_usedSignals.Count > 0) _freeSignals.Push(_usedSignals.Pop()); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Editor/goma_recorder.Midity.Playable.Editor.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "goma_recorder.Midity.Playable.Editor", 3 | "references": [ 4 | "GUID:f06555f75b070af458a003d92f9efb00", 5 | "GUID:02f771204943f4a40949438e873e3eff", 6 | "GUID:44ae2b388f237fe40a9f1cd7775307f1", 7 | "GUID:a26697c371a4b9e209b2bf58ca857645" 8 | ], 9 | "includePlatforms": [ 10 | "Editor" 11 | ], 12 | "excludePlatforms": [], 13 | "allowUnsafeCode": false, 14 | "overrideReferences": false, 15 | "precompiledReferences": [], 16 | "autoReferenced": true, 17 | "defineConstraints": [ 18 | "USE_TIMELINE" 19 | ], 20 | "versionDefines": [ 21 | { 22 | "name": "com.unity.timeline", 23 | "expression": "1.3", 24 | "define": "USE_TIMELINE" 25 | } 26 | ], 27 | "noEngineReferences": false 28 | } -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_TestInitMode: 0 13 | CrashReportingSettings: 14 | m_EventUrl: https://perf-events.cloud.unity3d.com 15 | m_Enabled: 0 16 | m_LogBufferSize: 10 17 | m_CaptureEditorExceptions: 1 18 | UnityPurchasingSettings: 19 | m_Enabled: 0 20 | m_TestMode: 0 21 | UnityAnalyticsSettings: 22 | m_Enabled: 0 23 | m_TestMode: 0 24 | m_InitializeOnStartup: 1 25 | UnityAdsSettings: 26 | m_Enabled: 0 27 | m_InitializeOnStartup: 1 28 | m_TestMode: 0 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jp.goma_recorder.midity.playable", 3 | "displayName": "Playable Midi", 4 | "author": "Tabi Morinaga", 5 | "version": "2.1.0", 6 | "unity": "2020.1", 7 | "description": "Playable Midi is a custom timeline/playables package that provides functionality to control object properties based on sequence data contained in a standard MIDI file", 8 | "dependencies": { 9 | "jp.goma_recorder.midity": "1.1.0" 10 | }, 11 | "keywords": [ 12 | "unity", 13 | "midi" 14 | ], 15 | "license": "MIT", 16 | "repository": { 17 | "type": "git", 18 | "url": "https://github.com/goma-recorder/PlayableMidi.git" 19 | }, 20 | "bugs": { 21 | "url": "https://github.com/goma-recorder/PlayableMidi/issues" 22 | }, 23 | "homepage": "https://github.com/goma-recorder/PlayableMidi#readme", 24 | "samples": [ 25 | { 26 | "displayName": "Sample Project", 27 | "description": "This is sample", 28 | "path": "Samples~/" 29 | } 30 | ] 31 | } 32 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # [2.1.0](https://github.com/goma-recorder/PlayableMidi/compare/v2.0.0...v2.1.0) (2021-01-31) 2 | 3 | 4 | ### Features 5 | 6 | * Update Midity v1.2.0 ([618d5c3](https://github.com/goma-recorder/PlayableMidi/commit/618d5c30f17ac47e441ca51654cf9a6f719c5488)) 7 | 8 | # [2.0.0](https://github.com/goma-recorder/PlayableMidi/compare/v1.1.0...v2.0.0) (2021-01-11) 9 | 10 | 11 | ### Features 12 | 13 | * Remove Midity ([041ddb2](https://github.com/goma-recorder/PlayableMidi/commit/041ddb2a061446bed0ec919bb618110a59831c0b)) 14 | 15 | 16 | ### BREAKING CHANGES 17 | 18 | * Remove Midity 19 | 20 | # [1.1.0](https://github.com/goma-recorder/PlayableMidi/compare/v1.0.0...v1.1.0) (2020-12-03) 21 | 22 | 23 | ### Features 24 | 25 | * create serializer ([611e93d](https://github.com/goma-recorder/PlayableMidi/commit/611e93d4e5c2d13b5148566ccbd330db318f2cfa)) 26 | 27 | # 1.0.0 (2020-11-28) 28 | 29 | 30 | ### Features 31 | 32 | * first release ([1d707ba](https://github.com/goma-recorder/PlayableMidi/commit/1d707baa0ceba7802e5f11c1b250bafa857d6284)) 33 | -------------------------------------------------------------------------------- /.releaserc.json: -------------------------------------------------------------------------------- 1 | { 2 | "tagFormat": "v${version}", 3 | "plugins": [ 4 | [ 5 | "@semantic-release/commit-analyzer", 6 | { 7 | "preset": "angular" 8 | } 9 | ], 10 | "@semantic-release/release-notes-generator", 11 | [ 12 | "@semantic-release/changelog", 13 | { 14 | "preset": "angular" 15 | } 16 | ], 17 | [ 18 | "@semantic-release/npm", 19 | { 20 | "npmPublish": false, 21 | "pkgRoot": "Assets/Plugins/jp.goma_recorder.midity.playable" 22 | } 23 | ], 24 | [ 25 | "@semantic-release/git", 26 | { 27 | "assets": [ 28 | "Assets/Plugins/jp.goma_recorder.midity.playable/package.json", 29 | "CHANGELOG.md" 30 | ], 31 | "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" 32 | } 33 | ], 34 | "@semantic-release/github" 35 | ] 36 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 goma-recorder 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Runtime/MidiSignalReceiver.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using UnityEngine.Events; 4 | using UnityEngine.Playables; 5 | 6 | namespace Midity.Playable 7 | { 8 | // Receives MIDI signals (MIDI event notifications) from a timeline and 9 | // invokes assigned events. 10 | [ExecuteInEditMode] 11 | public sealed class MidiSignalReceiver : MonoBehaviour, INotificationReceiver 12 | { 13 | public MidiNoteFilter noteFilter = new MidiNoteFilter 14 | { 15 | noteNameFilter = NoteNameFilter.All, 16 | octaveFilter = OctaveFilter.All 17 | }; 18 | 19 | public UnityEvent noteOnEvent = new UnityEvent(); 20 | public UnityEvent noteOffEvent = new UnityEvent(); 21 | public Action onFireEvent = null; 22 | 23 | public void OnNotify 24 | (UnityEngine.Playables.Playable origin, INotification notification, object context) 25 | { 26 | var mtrkEvent = ((MidiSignal) notification).Event; 27 | onFireEvent?.Invoke(mtrkEvent); 28 | if (noteFilter.Check(mtrkEvent, out var noteEvent)) 29 | (noteEvent is OnNoteEvent ? noteOnEvent : noteOffEvent).Invoke(); 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # This .gitignore file should be placed at the root of your Unity project directory 2 | # 3 | # Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore 4 | # 5 | /[Ll]ibrary/ 6 | /[Tt]emp/ 7 | /[Oo]bj/ 8 | /[Bb]uild/ 9 | /[Bb]uilds/ 10 | /[Ll]ogs/ 11 | /[Mm]emoryCaptures/ 12 | 13 | # Asset meta data should only be ignored when the corresponding asset is also ignored 14 | !/[Aa]ssets/**/*.meta 15 | 16 | # Uncomment this line if you wish to ignore the asset store tools plugin 17 | # /[Aa]ssets/AssetStoreTools* 18 | 19 | # Autogenerated Jetbrains Rider plugin 20 | [Aa]ssets/Plugins/Editor/JetBrains* 21 | 22 | # Visual Studio cache directory 23 | .vs/ 24 | 25 | # Gradle cache directory 26 | .gradle/ 27 | 28 | # Autogenerated VS/MD/Consulo solution and project files 29 | ExportedObj/ 30 | .consulo/ 31 | *.csproj 32 | *.unityproj 33 | *.sln 34 | *.suo 35 | *.tmp 36 | *.user 37 | *.userprefs 38 | *.pidb 39 | *.booproj 40 | *.svd 41 | *.pdb 42 | *.mdb 43 | *.opendb 44 | *.VC.db 45 | 46 | # Unity3D generated meta files 47 | *.pidb.meta 48 | *.pdb.meta 49 | *.mdb.meta 50 | 51 | # Unity3D generated file on crash reports 52 | sysinfo.txt 53 | 54 | # Builds 55 | *.apk 56 | *.unitypackage 57 | 58 | # Crashlytics generated file 59 | crashlytics-build.properties 60 | 61 | /.idea/ 62 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Editor/CustomEditors/MidiSignalReceiverEditor.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | 4 | namespace Midity.Playable.Editor 5 | { 6 | // Custom inspector for MidiSignalReceiver 7 | [CustomEditor(typeof(MidiSignalReceiver))] 8 | internal sealed class MidiSignalReceiverEditor : UnityEditor.Editor 9 | { 10 | private static readonly GUIContent _labelNoteOctave = new GUIContent("Note/Octave"); 11 | private SerializedProperty _noteFilter; 12 | private SerializedProperty _noteOffEvent; 13 | private SerializedProperty _noteOnEvent; 14 | 15 | private void OnEnable() 16 | { 17 | _noteFilter = serializedObject.FindProperty("noteFilter"); 18 | _noteOnEvent = serializedObject.FindProperty("noteOnEvent"); 19 | _noteOffEvent = serializedObject.FindProperty("noteOffEvent"); 20 | } 21 | 22 | public override void OnInspectorGUI() 23 | { 24 | serializedObject.Update(); 25 | 26 | EditorGUILayout.PropertyField(_noteFilter, _labelNoteOctave); 27 | EditorGUILayout.PropertyField(_noteOnEvent); 28 | EditorGUILayout.PropertyField(_noteOffEvent); 29 | 30 | serializedObject.ApplyModifiedProperties(); 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 11 7 | m_SerializationMode: 2 8 | m_LineEndingsForNewScripts: 0 9 | m_DefaultBehaviorMode: 0 10 | m_PrefabRegularEnvironment: {fileID: 0} 11 | m_PrefabUIEnvironment: {fileID: 0} 12 | m_SpritePackerMode: 0 13 | m_SpritePackerPaddingPower: 1 14 | m_EtcTextureCompressorBehavior: 1 15 | m_EtcTextureFastCompressor: 1 16 | m_EtcTextureNormalCompressor: 2 17 | m_EtcTextureBestCompressor: 4 18 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp;asmref 19 | m_ProjectGenerationRootNamespace: 20 | m_EnableTextureStreamingInEditMode: 1 21 | m_EnableTextureStreamingInPlayMode: 1 22 | m_AsyncShaderCompilation: 1 23 | m_CachingShaderPreprocessor: 0 24 | m_EnterPlayModeOptionsEnabled: 0 25 | m_EnterPlayModeOptions: 3 26 | m_GameObjectNamingDigits: 1 27 | m_GameObjectNamingScheme: 0 28 | m_AssetNamingUsesSpace: 1 29 | m_UseLegacyProbeSampleCount: 0 30 | m_SerializeInlineMappingsOnOneLine: 1 31 | m_DisableCookiesInLightmapper: 0 32 | m_AssetPipelineMode: 1 33 | m_CacheServerMode: 0 34 | m_CacheServerEndpoint: 35 | m_CacheServerNamespacePrefix: default 36 | m_CacheServerEnableDownload: 1 37 | m_CacheServerEnableUpload: 1 38 | m_CacheServerEnableAuth: 0 39 | m_CacheServerEnableTls: 0 40 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Runtime/TimelineCustoms/MidiAnimationAsset.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using UnityEngine.Playables; 4 | using UnityEngine.Timeline; 5 | 6 | namespace Midity.Playable 7 | { 8 | // Playable asset class that contains a MIDI animation clip 9 | [Serializable] 10 | public sealed class MidiAnimationAsset : PlayableAsset, ITimelineClipAsset 11 | { 12 | [SerializeField] private MidiTrackAsset midiTrackAsset; 13 | 14 | private MidiAnimation _template; 15 | public MidiTrack MidiTrack => midiTrackAsset?.MidiTrack; 16 | 17 | public MidiAnimation Template 18 | { 19 | get 20 | { 21 | if (_template != null) 22 | return _template; 23 | _template = new MidiAnimation(this); 24 | return _template; 25 | } 26 | } 27 | 28 | public override double duration => MidiTrack?.TotalSeconds ?? 50; 29 | 30 | public ClipCaps clipCaps => 31 | ClipCaps.Blending | 32 | ClipCaps.Extrapolation | 33 | ClipCaps.Looping | 34 | ClipCaps.SpeedMultiplier; 35 | 36 | 37 | public override UnityEngine.Playables.Playable CreatePlayable(PlayableGraph graph, GameObject go) 38 | { 39 | return ScriptPlayable.Create(graph, Template); 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Editor/Shaders/MidiClipBackground.shader: -------------------------------------------------------------------------------- 1 | // Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' 2 | 3 | Shader "jp.goma_recorder.Midity.Playable/ClipBackground" 4 | { 5 | Properties 6 | { 7 | [NoScaleOffset] 8 | _MainTex("Texture", 2D) = "white" {} 9 | _OffsetX("OffsetX", Float) = 0.0 10 | _RepeatX("RepeatX", Float) = 0.0 11 | } 12 | SubShader 13 | { 14 | Tags { "RenderType" = "Opaque" } 15 | 16 | Pass 17 | { 18 | CGPROGRAM 19 | #pragma vertex vert 20 | #pragma fragment frag 21 | 22 | #include "UnityCG.cginc" 23 | 24 | struct appdata 25 | { 26 | float4 vertex : POSITION; 27 | float2 uv : TEXCOORD0; 28 | }; 29 | 30 | struct v2f 31 | { 32 | float2 uv : TEXCOORD0; 33 | float4 vertex : SV_POSITION; 34 | }; 35 | 36 | sampler2D _MainTex; 37 | float4 _MainTex_ST; 38 | float _OffsetX; 39 | float _RepeatX; 40 | 41 | v2f vert(appdata v) 42 | { 43 | v2f o; 44 | o.vertex = UnityObjectToClipPos(v.vertex); 45 | o.uv = TRANSFORM_TEX(v.uv, _MainTex); 46 | return o; 47 | } 48 | 49 | fixed4 frag(v2f i) : SV_Target 50 | { 51 | //オフセット + UV値を(0~1)でRepeat 52 | float2 uv = float2(abs(fmod(i.uv.x * _RepeatX + _OffsetX, 1.0)), i.uv.y); 53 | 54 | fixed4 col = tex2D(_MainTex, uv); 55 | return col; 56 | } 57 | ENDCG 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 13 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_DefaultMaxDepenetrationVelocity: 10 11 | m_SleepThreshold: 0.005 12 | m_DefaultContactOffset: 0.01 13 | m_DefaultSolverIterations: 6 14 | m_DefaultSolverVelocityIterations: 1 15 | m_QueriesHitBackfaces: 0 16 | m_QueriesHitTriggers: 1 17 | m_EnableAdaptiveForce: 0 18 | m_ClothInterCollisionDistance: 0 19 | m_ClothInterCollisionStiffness: 0 20 | m_ContactsGeneration: 1 21 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 22 | m_AutoSimulation: 1 23 | m_AutoSyncTransforms: 0 24 | m_ReuseCollisionCallbacks: 1 25 | m_ClothInterCollisionSettingsToggle: 0 26 | m_ClothGravity: {x: 0, y: -9.81, z: 0} 27 | m_ContactPairsMode: 0 28 | m_BroadphaseType: 0 29 | m_WorldBounds: 30 | m_Center: {x: 0, y: 0, z: 0} 31 | m_Extent: {x: 250, y: 250, z: 250} 32 | m_WorldSubdivisions: 8 33 | m_FrictionType: 0 34 | m_EnableEnhancedDeterminism: 0 35 | m_EnableUnifiedHeightmaps: 1 36 | m_SolverType: 0 37 | m_DefaultMaxAngularSpeed: 7 38 | -------------------------------------------------------------------------------- /ProjectSettings/PackageManagerSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_EnablePreviewPackages: 0 16 | m_EnablePackageDependencies: 0 17 | m_AdvancedSettingsExpanded: 1 18 | m_ScopedRegistriesSettingsExpanded: 1 19 | oneTimeWarningShown: 0 20 | m_Registries: 21 | - m_Id: main 22 | m_Name: 23 | m_Url: https://packages.unity.com 24 | m_Scopes: [] 25 | m_IsDefault: 1 26 | m_Capabilities: 7 27 | - m_Id: scoped:package.openupm.com 28 | m_Name: package.openupm.com 29 | m_Url: https://package.openupm.com 30 | m_Scopes: 31 | - com.openupm 32 | - jp.goma_recorder.midity 33 | m_IsDefault: 0 34 | m_Capabilities: 0 35 | m_UserSelectedRegistryName: 36 | m_UserAddingNewScopedRegistry: 0 37 | m_RegistryInfoDraft: 38 | m_ErrorMessage: 39 | m_Original: 40 | m_Id: scoped:package.openupm.com 41 | m_Name: package.openupm.com 42 | m_Url: https://package.openupm.com 43 | m_Scopes: 44 | - com.openupm 45 | - jp.goma_recorder.midity 46 | m_IsDefault: 0 47 | m_Capabilities: 0 48 | m_Modified: 0 49 | m_Name: package.openupm.com 50 | m_Url: https://package.openupm.com 51 | m_Scopes: 52 | - com.openupm 53 | - jp.goma_recorder.midity 54 | m_SelectedScopeIndex: 0 55 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | maxJobWorkers: 0 89 | preserveTilesOutsideBounds: 0 90 | debug: 91 | m_Flags: 0 92 | m_SettingNames: 93 | - Humanoid 94 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Runtime/TimelineCustoms/MidiAnimationTrack.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.Playables; 3 | using UnityEngine.Timeline; 4 | 5 | namespace Midity.Playable 6 | { 7 | // Track asset class that contains a MIDI animation track (clips and its 8 | // assigned controls) 9 | [TrackColor(0.4f, 0.4f, 0.4f)] 10 | [TrackClipType(typeof(MidiAnimationAsset))] 11 | [TrackBindingType(typeof(MidiSignalReceiver))] 12 | public sealed class MidiAnimationTrack : TrackAsset 13 | { 14 | #region Serialized object 15 | 16 | public MidiAnimationMixer template = new MidiAnimationMixer(); 17 | 18 | #endregion 19 | 20 | #region TrackAsset implementation 21 | 22 | public override UnityEngine.Playables.Playable CreateTrackMixer(PlayableGraph graph, GameObject go, 23 | int inputCount) 24 | { 25 | return ScriptPlayable.Create(graph, template, inputCount); 26 | } 27 | 28 | #endregion 29 | 30 | #region IPropertyPreview implementation 31 | 32 | public override void GatherProperties(PlayableDirector director, IPropertyCollector driver) 33 | { 34 | if (template.controls == null) return; 35 | 36 | foreach (var ctrl in template.controls) 37 | { 38 | if (!ctrl.enabled) continue; 39 | 40 | var component = ctrl.targetComponent.Resolve(director); 41 | if (component == null) continue; 42 | 43 | if (string.IsNullOrEmpty(ctrl.fieldName)) continue; 44 | 45 | // This extension method is implemented in IPropertyCollectorExtension.cs 46 | driver.AddFromName(component.GetType(), component.gameObject, ctrl.fieldName); 47 | } 48 | } 49 | 50 | #endregion 51 | } 52 | } -------------------------------------------------------------------------------- /.github/workflows/Release.yml: -------------------------------------------------------------------------------- 1 | name: Release 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | jobs: 8 | release: 9 | name: release 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v2 13 | with: 14 | fetch-depth: 0 15 | 16 | - name: Semantic release 17 | id: semantic 18 | uses: cycjimmy/semantic-release-action@v2 19 | with: 20 | extra_plugins: | 21 | @semantic-release/changelog 22 | @semantic-release/git 23 | branch: master 24 | env: 25 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 26 | 27 | - name: Create upm branch 28 | if: steps.semantic.outputs.new_release_published == 'true' 29 | run: | 30 | git branch -d upm &> /dev/null || echo upm branch not found 31 | git subtree split -P "$PKG_ROOT" -b upm 32 | git checkout upm 33 | git checkout master README.md || echo README.md not found 34 | mkdir Documentation~ 35 | git mv README.md Documentation~/"$PKG_NAME".md 36 | git checkout master CHANGELOG.md || echo CHANGELOG.md not found 37 | git checkout master LICENSE || echo LICENSE not found 38 | mv -f LICENSE LICENSE.md || echo Can not rename LICENSE 39 | if [[ -d "Samples" ]]; then 40 | git mv Samples Samples~ 41 | rm -f Samples.meta 42 | git config --global user.name 'github-bot' 43 | git config --global user.email 'github-bot@users.noreply.github.com' 44 | git commit -am "fix: Samples => Samples~" 45 | fi 46 | git push -f -u origin upm 47 | env: 48 | PKG_NAME: jp.goma_recorder.midity.playable 49 | PKG_ROOT: Assets/Plugins/jp.goma_recorder.midity.playable 50 | 51 | - name: Create upm git tag 52 | if: steps.semantic.outputs.new_release_published == 'true' 53 | run: | 54 | git tag $TAG upm 55 | git push origin --tags 56 | env: 57 | TAG: upm/v${{ steps.semantic.outputs.new_release_version }} 58 | -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.ide.rider": "1.2.1", 4 | "com.unity.ide.visualstudio": "2.0.5", 5 | "com.unity.ide.vscode": "1.2.3", 6 | "com.unity.test-framework": "1.1.22", 7 | "com.unity.timeline": "1.3.7", 8 | "com.unity.ugui": "1.0.0", 9 | "com.unity.modules.ai": "1.0.0", 10 | "com.unity.modules.androidjni": "1.0.0", 11 | "com.unity.modules.animation": "1.0.0", 12 | "com.unity.modules.assetbundle": "1.0.0", 13 | "com.unity.modules.audio": "1.0.0", 14 | "com.unity.modules.cloth": "1.0.0", 15 | "com.unity.modules.director": "1.0.0", 16 | "com.unity.modules.imageconversion": "1.0.0", 17 | "com.unity.modules.imgui": "1.0.0", 18 | "com.unity.modules.jsonserialize": "1.0.0", 19 | "com.unity.modules.particlesystem": "1.0.0", 20 | "com.unity.modules.physics": "1.0.0", 21 | "com.unity.modules.physics2d": "1.0.0", 22 | "com.unity.modules.screencapture": "1.0.0", 23 | "com.unity.modules.terrain": "1.0.0", 24 | "com.unity.modules.terrainphysics": "1.0.0", 25 | "com.unity.modules.tilemap": "1.0.0", 26 | "com.unity.modules.ui": "1.0.0", 27 | "com.unity.modules.uielements": "1.0.0", 28 | "com.unity.modules.umbra": "1.0.0", 29 | "com.unity.modules.unityanalytics": "1.0.0", 30 | "com.unity.modules.unitywebrequest": "1.0.0", 31 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 32 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 33 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 34 | "com.unity.modules.unitywebrequestwww": "1.0.0", 35 | "com.unity.modules.vehicles": "1.0.0", 36 | "com.unity.modules.video": "1.0.0", 37 | "com.unity.modules.vr": "1.0.0", 38 | "com.unity.modules.wind": "1.0.0", 39 | "com.unity.modules.xr": "1.0.0", 40 | "jp.goma_recorder.midity": "1.2.0" 41 | }, 42 | "scopedRegistries": [ 43 | { 44 | "name": "package.openupm.com", 45 | "url": "https://package.openupm.com", 46 | "scopes": [ 47 | "com.openupm", 48 | "jp.goma_recorder.midity" 49 | ] 50 | } 51 | ] 52 | } -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Runtime/TimelineCustoms/MidiAnimationMixer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using UnityEngine.Playables; 4 | 5 | namespace Midity.Playable 6 | { 7 | // Runtime playable class that manages a MIDI animation track (clips and 8 | // its assigned controls) 9 | [Serializable] 10 | public sealed class MidiAnimationMixer : PlayableBehaviour 11 | { 12 | #region Serialized variables 13 | 14 | public MidiControl[] controls = new MidiControl [0]; 15 | 16 | #endregion 17 | 18 | #region PlayableBehaviour overrides 19 | 20 | private ControlAction[] _actions; 21 | 22 | public override void OnPlayableCreate(UnityEngine.Playables.Playable playable) 23 | { 24 | var resolver = playable.GetGraph().GetResolver(); 25 | 26 | // Populate actions for the each controller. 27 | _actions = new ControlAction[controls.Length]; 28 | 29 | for (var i = 0; i < controls.Length; i++) 30 | _actions[i] = ControlAction.CreateAction( 31 | controls[i].targetComponent.Resolve(resolver), 32 | controls[i].propertyName 33 | ); 34 | } 35 | 36 | public override void ProcessFrame(UnityEngine.Playables.Playable playable, FrameData info, object playerData) 37 | { 38 | for (var ci = 0; ci < controls.Length; ci++) 39 | { 40 | var ctrl = controls[ci]; 41 | if (!ctrl.enabled) continue; 42 | 43 | // Controller value accumulation 44 | var acc = 0.0f; 45 | 46 | for (var i = 0; i < playable.GetInputCount(); i++) 47 | { 48 | var clip = (ScriptPlayable) playable.GetInput(i); 49 | acc += playable.GetInputWeight(i) * 50 | clip.GetBehaviour().GetValue(clip, ctrl); 51 | } 52 | 53 | // Controller action invocation 54 | _actions[ci]?.Invoke(Vector4.Lerp(ctrl.vector0, ctrl.vector1, acc)); 55 | } 56 | } 57 | 58 | #endregion 59 | } 60 | } -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Editor/Utils/MidiEditorUtility.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | 3 | namespace Midity.Playable.Editor 4 | { 5 | internal static class MidiEditorUtility 6 | { 7 | // 8 | // Guess a property name from a given field name. 9 | // 10 | // As far as we know, there are four types of naming conventions for 11 | // a serialized field name. 12 | // 13 | // - Simple camelCase: "fooBar" 14 | // - Simple PascalCase: "FooBar" 15 | // - Space separated: "foo bar" 16 | // - Hangarion fashioned: "m_fooBar", "_fooBar", "fooBar_" 17 | // 18 | // This function converts them into a simple camelCased name. 19 | // 20 | public static string GuessPropertyNameFromFieldName(string name) 21 | { 22 | // Remove Hangarian-fashioned pre/post-fixes. 23 | if (name.StartsWith("m_")) 24 | name = name.Substring(2); 25 | else if (name.StartsWith("_")) 26 | name = name.Substring(1); 27 | else if (name.EndsWith("_")) 28 | name = name.Substring(0, name.Length - 1); 29 | 30 | // Split the name into words and normalize the head characters. 31 | var words = name.Split(); 32 | for (var i = 0; i < words.Length; i++) 33 | { 34 | var w = words[i]; 35 | words[i] = (i == 0 ? char.ToLower(w[0]) : char.ToUpper(w[0])) + w.Substring(1); 36 | } 37 | 38 | name = string.Join("", words); 39 | 40 | // We know Unity has some spelling inconsistencies. Let us solve it. 41 | if (name == "backGroundColor") name = "backgroundColor"; // Camera.backgroundColor 42 | 43 | return name; 44 | } 45 | 46 | // Check if the property type is supported one. 47 | public static bool IsPropertyTypeSupported(SerializedPropertyType type) 48 | { 49 | return type == SerializedPropertyType.Float || 50 | type == SerializedPropertyType.Vector3 || 51 | type == SerializedPropertyType.Quaternion || 52 | type == SerializedPropertyType.Color; 53 | } 54 | } 55 | } -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_JobOptions: 23 | serializedVersion: 2 24 | useMultithreading: 0 25 | useConsistencySorting: 0 26 | m_InterpolationPosesPerJob: 100 27 | m_NewContactsPerJob: 30 28 | m_CollideContactsPerJob: 100 29 | m_ClearFlagsPerJob: 200 30 | m_ClearBodyForcesPerJob: 200 31 | m_SyncDiscreteFixturesPerJob: 50 32 | m_SyncContinuousFixturesPerJob: 50 33 | m_FindNearestContactsPerJob: 100 34 | m_UpdateTriggerContactsPerJob: 100 35 | m_IslandSolverCostThreshold: 100 36 | m_IslandSolverBodyCostScale: 1 37 | m_IslandSolverContactCostScale: 10 38 | m_IslandSolverJointCostScale: 10 39 | m_IslandSolverBodiesPerJob: 50 40 | m_IslandSolverContactsPerJob: 50 41 | m_SimulationMode: 0 42 | m_QueriesHitTriggers: 1 43 | m_QueriesStartInColliders: 1 44 | m_CallbacksOnDisable: 1 45 | m_ReuseCollisionCallbacks: 1 46 | m_AutoSyncTransforms: 0 47 | m_AlwaysShowColliders: 0 48 | m_ShowColliderSleep: 1 49 | m_ShowColliderContacts: 0 50 | m_ShowColliderAABB: 0 51 | m_ContactArrowScale: 0.2 52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 57 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Runtime/Internal/IPropertyCollectorExtension.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | using UnityEngine; 4 | using UnityEngine.Timeline; 5 | 6 | namespace Midity.Playable 7 | { 8 | // 9 | // Extension methods for IPropertyCollector 10 | // 11 | // This class is used to invoke a generic method AddFromName with a 12 | // dynamic type. 13 | // 14 | internal static class IPropertyCollectorExtension 15 | { 16 | private static (Type type, MethodInfo method) _genericAddFromName; 17 | private static (Type type, MethodInfo method) _specializedAddFromName; 18 | private static readonly object[] _args2 = new object [2]; 19 | 20 | internal static void AddFromName( 21 | this IPropertyCollector driver, 22 | Type componentType, GameObject go, string name 23 | ) 24 | { 25 | var driverType = driver.GetType(); 26 | 27 | if (_genericAddFromName.type != driverType) 28 | // Retrieve AddFromName(GameObject, string) 29 | foreach (var m in driverType.GetMethods()) 30 | { 31 | if (m.Name != "AddFromName") continue; 32 | if (!m.IsGenericMethod) continue; 33 | 34 | var args = m.GetParameters(); 35 | if (args.Length != 2) continue; 36 | if (args[0].ParameterType != typeof(GameObject)) continue; 37 | if (args[1].ParameterType != typeof(string)) continue; 38 | 39 | _genericAddFromName = (driverType, m); 40 | _specializedAddFromName = (null, null); 41 | break; 42 | } 43 | 44 | Debug.Assert(_genericAddFromName.method != null); 45 | 46 | if (_specializedAddFromName.type != componentType) 47 | // Construct AddFromName(GameObject, string) 48 | _specializedAddFromName = ( 49 | componentType, 50 | _genericAddFromName.method.MakeGenericMethod(componentType) 51 | ); 52 | 53 | // Invoke the specialized method. 54 | _args2[0] = go; 55 | _args2[1] = name; 56 | _specializedAddFromName.method.Invoke(driver, _args2); 57 | } 58 | } 59 | } -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 13 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_VideoShadersIncludeMode: 2 32 | m_AlwaysIncludedShaders: 33 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 38 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 39 | m_PreloadedShaders: [] 40 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 41 | m_CustomRenderPipeline: {fileID: 0} 42 | m_TransparencySortMode: 0 43 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 44 | m_DefaultRenderingPath: 1 45 | m_DefaultMobileRenderingPath: 1 46 | m_TierSettings: [] 47 | m_LightmapStripping: 0 48 | m_FogStripping: 0 49 | m_InstancingStripping: 0 50 | m_LightmapKeepPlain: 1 51 | m_LightmapKeepDirCombined: 1 52 | m_LightmapKeepDynamicPlain: 1 53 | m_LightmapKeepDynamicDirCombined: 1 54 | m_LightmapKeepShadowMask: 1 55 | m_LightmapKeepSubtractive: 1 56 | m_FogKeepLinear: 1 57 | m_FogKeepExp: 1 58 | m_FogKeepExp2: 1 59 | m_AlbedoSwatchInfos: [] 60 | m_LightsUseLinearIntensity: 0 61 | m_LightsUseColorTemperature: 0 62 | m_LogWhenShaderIsCompiled: 0 63 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Editor/CustomPropertyDrawer/MidiNoteFilterDrawer.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | 4 | namespace Midity.Playable.Editor 5 | { 6 | // Custom property drawer for MidiNoteFilter struct 7 | [CustomPropertyDrawer(typeof(MidiNoteFilter), true)] 8 | internal sealed class MidiNoteFilterDrawer : PropertyDrawer 9 | { 10 | private static readonly int[] _noteValues = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}; 11 | 12 | private static readonly GUIContent[] _noteLabels = 13 | { 14 | new GUIContent("All"), 15 | new GUIContent("C"), new GUIContent("C#"), new GUIContent("D"), 16 | new GUIContent("D#"), new GUIContent("E"), new GUIContent("F"), 17 | new GUIContent("F#"), new GUIContent("G"), new GUIContent("G#"), 18 | new GUIContent("A"), new GUIContent("A#"), new GUIContent("B") 19 | }; 20 | 21 | private static readonly int[] _octaveValues = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}; 22 | 23 | private static readonly GUIContent[] _octaveLabels = 24 | { 25 | new GUIContent("All"), 26 | new GUIContent("-2"), new GUIContent("-1"), new GUIContent("0"), 27 | new GUIContent("1"), new GUIContent("2"), new GUIContent("3"), 28 | new GUIContent("4"), new GUIContent("5"), new GUIContent("6"), 29 | new GUIContent("7"), new GUIContent("8") 30 | }; 31 | 32 | public override void OnGUI(Rect rect, SerializedProperty property, GUIContent label) 33 | { 34 | // Label (focusable but not functional) 35 | EditorGUI.PrefixLabel(rect, GUIUtility.GetControlID(FocusType.Keyboard), label); 36 | 37 | // Half width control rect 38 | rect.x += EditorGUIUtility.labelWidth; 39 | rect.width = (rect.width - EditorGUIUtility.labelWidth - 4) / 2; 40 | 41 | // Note name drop down 42 | var note = property.FindPropertyRelative("noteNameFilter"); 43 | EditorGUI.BeginChangeCheck(); 44 | var index = EditorGUI.IntPopup(rect, note.enumValueIndex, _noteLabels, _noteValues); 45 | if (EditorGUI.EndChangeCheck()) note.enumValueIndex = index; 46 | 47 | rect.x += rect.width + 4; 48 | 49 | // Octave drop down 50 | var octave = property.FindPropertyRelative("octaveFilter"); 51 | EditorGUI.BeginChangeCheck(); 52 | index = EditorGUI.IntPopup(rect, octave.enumValueIndex, _octaveLabels, _octaveValues); 53 | if (EditorGUI.EndChangeCheck()) octave.enumValueIndex = index; 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Editor/MidiClipEditor.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEditor.Timeline; 3 | using UnityEngine; 4 | using UnityEngine.Timeline; 5 | 6 | namespace Midity.Playable.Editor 7 | { 8 | [CustomTimelineEditor(typeof(MidiAnimationAsset))] 9 | public class MidiClipEditor : ClipEditor 10 | { 11 | private readonly Dictionary _materials = new Dictionary(); 12 | private readonly Dictionary _textures = new Dictionary(); 13 | 14 | public override void DrawBackground(TimelineClip clip, ClipBackgroundRegion region) 15 | { 16 | if (!(clip.asset is MidiAnimationAsset midiAnimationAsset)) 17 | return; 18 | 19 | var midiTrack = midiAnimationAsset.MidiTrack; 20 | 21 | if (midiTrack == null) 22 | return; 23 | 24 | Texture texture; 25 | if (_textures.ContainsKey(clip) && _textures[clip] is null) 26 | texture = _textures[clip]; 27 | else 28 | { 29 | const int topMargin = 2; 30 | const int bottomMargin = 1; 31 | texture = midiTrack.WriteNoteBarTexture2D((int) midiTrack.DeltaTime / 2, topMargin, bottomMargin); 32 | if (_textures.ContainsKey(clip)) 33 | _textures[clip] = texture; 34 | else 35 | _textures.Add(clip, texture); 36 | } 37 | 38 | Material material; 39 | if (_materials.ContainsKey(clip) && _materials[clip] is null) 40 | material = _materials[clip]; 41 | else 42 | { 43 | var shader = Shader.Find("jp.goma_recorder.Midity.Playable/ClipBackground"); 44 | material = new Material(shader) {mainTexture = texture}; 45 | 46 | if (_materials.ContainsKey(clip)) 47 | _materials[clip] = material; 48 | else 49 | _materials.Add(clip, material); 50 | } 51 | 52 | var loopCount = (region.endTime - region.startTime) / midiTrack.TotalSeconds; 53 | material.SetFloat("_RepeatX", (float) loopCount); 54 | material.SetFloat("_OffsetX", (float) (region.startTime / midiTrack.TotalSeconds)); 55 | var rect = region.position; 56 | var quantizedRect = new Rect(Mathf.Ceil(rect.x), Mathf.Ceil(rect.y), Mathf.Ceil(rect.width), 57 | Mathf.Ceil(rect.height)); 58 | 59 | Graphics.DrawTexture(quantizedRect, texture, material); 60 | } 61 | } 62 | } -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Runtime/Internal/ControlAction.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using UnityEngine.Events; 4 | 5 | namespace Midity.Playable 6 | { 7 | // 8 | // ControlAction class that invokes a property setter implemented in a 9 | // given target component. 10 | // 11 | internal abstract class ControlAction 12 | { 13 | public static ControlAction 14 | CreateAction(object target, string propertyName) 15 | { 16 | var type = target?.GetType().GetProperty(propertyName)?.PropertyType; 17 | 18 | if (type == typeof(float)) 19 | return new FloatAction(target, propertyName); 20 | 21 | if (type == typeof(Vector3)) 22 | return new Vector3Action(target, propertyName); 23 | 24 | if (type == typeof(Quaternion)) 25 | return new QuaternionAction(target, propertyName); 26 | 27 | if (type == typeof(Color)) 28 | return new ColorAction(target, propertyName); 29 | 30 | return null; 31 | } 32 | 33 | public abstract void Invoke(Vector4 param); 34 | 35 | protected static UnityAction 36 | GetPropertySetter(object target, string propertyName) 37 | { 38 | return (UnityAction) Delegate.CreateDelegate 39 | (typeof(UnityAction), target, "set_" + propertyName); 40 | } 41 | } 42 | 43 | internal class FloatAction : ControlAction 44 | { 45 | public UnityAction action; 46 | 47 | public FloatAction(object target, string propertyName) 48 | { 49 | action = GetPropertySetter(target, propertyName); 50 | } 51 | 52 | public override void Invoke(Vector4 param) 53 | { 54 | action(param.x); 55 | } 56 | } 57 | 58 | internal class Vector3Action : ControlAction 59 | { 60 | public UnityAction action; 61 | 62 | public Vector3Action(object target, string propertyName) 63 | { 64 | action = GetPropertySetter(target, propertyName); 65 | } 66 | 67 | public override void Invoke(Vector4 param) 68 | { 69 | action(param); 70 | } 71 | } 72 | 73 | internal class QuaternionAction : ControlAction 74 | { 75 | public UnityAction action; 76 | 77 | public QuaternionAction(object target, string propertyName) 78 | { 79 | action = GetPropertySetter(target, propertyName); 80 | } 81 | 82 | public override void Invoke(Vector4 param) 83 | { 84 | action(Quaternion.Euler(param)); 85 | } 86 | } 87 | 88 | internal class ColorAction : ControlAction 89 | { 90 | public UnityAction action; 91 | 92 | public ColorAction(object target, string propertyName) 93 | { 94 | action = GetPropertySetter(target, propertyName); 95 | } 96 | 97 | public override void Invoke(Vector4 param) 98 | { 99 | action(param); 100 | } 101 | } 102 | } -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Runtime/MidiControl.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace Midity.Playable 5 | { 6 | // MIDI control class and related structs and enums 7 | 8 | #region Control parameter types 9 | 10 | public enum NoteNameFilter 11 | { 12 | All, 13 | C, 14 | CSharp, 15 | D, 16 | DSharp, 17 | E, 18 | F, 19 | FSharp, 20 | G, 21 | GSharp, 22 | A, 23 | ASharp, 24 | B 25 | } 26 | 27 | public enum OctaveFilter 28 | { 29 | All, 30 | Minus2, 31 | Minus1, 32 | Zero, 33 | Plus1, 34 | Plus2, 35 | Plus3, 36 | Plus4, 37 | Plus5, 38 | Plus6, 39 | Plus7, 40 | Plus8 41 | } 42 | 43 | [Serializable] 44 | public struct MidiNoteFilter 45 | { 46 | public NoteNameFilter noteNameFilter; 47 | public OctaveFilter octaveFilter; 48 | 49 | public bool Check(MTrkEvent e) 50 | { 51 | if (e is NoteEvent midiEvent) 52 | return Check(midiEvent); 53 | return false; 54 | } 55 | 56 | public bool Check(MTrkEvent e, out NoteEvent noteEvent) 57 | { 58 | if (e is NoteEvent ne) 59 | { 60 | noteEvent = ne; 61 | return Check(ne); 62 | } 63 | 64 | noteEvent = null; 65 | return false; 66 | } 67 | 68 | public bool Check(NoteEvent e) 69 | { 70 | return (octaveFilter == OctaveFilter.All || (int) e.NoteOctave == (int) octaveFilter - 1) && 71 | (noteNameFilter == NoteNameFilter.All || (int) e.NoteName == (int) noteNameFilter - 1); 72 | } 73 | } 74 | 75 | [Serializable] 76 | public struct MidiEnvelope 77 | { 78 | // ADSR parameters 79 | public float attack; 80 | public float decay; 81 | public float sustain; 82 | public float release; 83 | 84 | // Times in seconds 85 | public float AttackTime => Mathf.Max(1e-5f, attack / 10); 86 | public float DecayTime => Mathf.Max(1e-5f, decay / 10); 87 | public float ReleaseTime => Mathf.Max(1e-5f, release / 10); 88 | 89 | // Normalized sustain level value 90 | public float SustainLevel => Mathf.Clamp01(sustain); 91 | } 92 | 93 | #endregion 94 | 95 | #region Serializable MIDI control class 96 | 97 | [Serializable] 98 | public sealed class MidiControl 99 | { 100 | // Control mode (Note/CC) 101 | public enum Mode 102 | { 103 | NoteEnvelope, 104 | NoteCurve, 105 | CC 106 | } 107 | 108 | // Is this control enabled? 109 | public bool enabled = true; 110 | public Mode mode = Mode.NoteEnvelope; 111 | 112 | // (Note mode) Note filter 113 | public MidiNoteFilter noteFilter = new MidiNoteFilter 114 | { 115 | noteNameFilter = NoteNameFilter.All, 116 | octaveFilter = OctaveFilter.All 117 | }; 118 | 119 | // (Note Envelope mode) Envelope parameters 120 | public MidiEnvelope envelope = new MidiEnvelope 121 | { 122 | attack = 0, 123 | decay = 1, 124 | sustain = 0.5f, 125 | release = 1 126 | }; 127 | 128 | // (Note Curve mode) Envelope curve 129 | public AnimationCurve curve = new AnimationCurve( 130 | new Keyframe(0, 0, 90, 90), 131 | new Keyframe(0.02f, 1), 132 | new Keyframe(0.5f, 0) 133 | ); 134 | 135 | // (CC mode) CC number 136 | public Controller ccController = Controller.ModulationWheelCourse; 137 | 138 | // Component/property options 139 | public ExposedReference targetComponent; 140 | public string propertyName; 141 | public string fieldName; 142 | 143 | // Value options 144 | public Vector4 vector0; 145 | public Vector4 vector1 = Vector3.one; 146 | } 147 | 148 | #endregion 149 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Playable Midi 2 | 3 | ![Ableton](https://i.imgur.com/yxJr18E.png) 4 | ![Unity](https://i.imgur.com/aTMgdnB.gif) 5 | 6 | **Playable Midi** is a custom timeline/playables package that provides 7 | functionality to control object properties based on sequence data contained 8 | in a standard MIDI file (`.mid` file). This allows you to create musically 9 | synchronized animation using a DAW (digital audio workstation) that is easy 10 | to manage accurately synchronized timings compared to other non-musical 11 | timeline editors like Unity's one. Playable Midi is an extension of the [MIDI Animation Track](https://github.com/keijiro/MidiAnimationTrack). 12 | 13 | 14 | ## System requirements 15 | 16 | - Unity 2020.1 or later 17 | 18 | ## Dependency 19 | - [Midity](https://github.com/goma-recorder/Midity) 20 | 21 | ## Installation 22 | 23 | ### A. OpenUPM-CLI 24 | ``` 25 | $ openupm add jp.goma_recorder.midity.playable 26 | ``` 27 | [OpenUpm](https://openupm.com/packages/jp.goma_recorder.midity.playable) 28 | 29 | ### B. Git url 30 | `Window -> Package Manager -> +▼ -> Add package from git url` 31 | - `https://github.com/goma-recorder/PlayableMidi.git?#upm` 32 | 33 | ### C. Release page 34 | [here](https://github.com/goma-recorder/PlayableMidi/releases) 35 | 36 | ## Importing .mid files 37 | 38 | You can import a `.mid` file as an asset file. Simply drag and drop it to the 39 | project view, or navigate to "Assets" - "Import New Asset...". 40 | 41 | An imported asset may contain multiple tracks that are shown as sub-assets 42 | under it. 43 | 44 | ![Sub-assets](https://i.imgur.com/tuBe3py.png) 45 | 46 | To create a MIDI animation track, drag and drop one of these clip assets to 47 | a timeline. 48 | 49 | ![Drag and drop](https://i.imgur.com/WVMaG6J.gif) 50 | 51 | ## Track controls 52 | 53 | You can animate object properties from a MIDI animation track using **track 54 | controls**. To create a new track control, select a MIDI animation track (not a 55 | clip) in the Timeline editor. Then track control editor will appear in the 56 | inspector. 57 | 58 | ![Track controls](https://i.imgur.com/uOwwWKR.gif) 59 | 60 | A track control only can animate a single property. You can add multiple 61 | controls to animate multiple different properties. 62 | 63 | At the moment, a track control only supports `float`, `Vector3`, `Quaternion` 64 | and `Color` properties. Please note that it requires a public *property* to 65 | be animated; Just providing a public *variable* is not enough. 66 | 67 | There are three modes in the track control: **Note Envelope**, **Note Curve** 68 | and **CC**. 69 | 70 | ### Note Envelope mode 71 | 72 | ![Inspector](https://i.imgur.com/7SFMCk9.png) 73 | 74 | **Note Envelope** is a mode where a property is animated by a classic [ADSR] 75 | style envelope. This mode is useful when you want to make animation react to 76 | key-off events. 77 | 78 | You can specify which **Note/Octave** the control reacts to. Please note that 79 | key velocity affects the envelope. It's simply multiplied to the envelope 80 | output. 81 | 82 | [ADSR]: https://en.wikipedia.org/wiki/Envelope_(music) 83 | 84 | ### Note Curve mode 85 | 86 | ![Inspector](https://i.imgur.com/YFATPN0.png) 87 | 88 | **Note Curve** is a mode where a property is animated by an animation curve. 89 | It starts playing animation on key-on events and keeps playing until it ends 90 | (key-off events will be ignored). 91 | 92 | You can specify which **Note/Octave** the control reacts to. Please note that 93 | key velocity affects the animation curve. It's simply multiplied to the curve 94 | value. 95 | 96 | ### CC mode 97 | 98 | ![Inspector](https://i.imgur.com/ERFtPKL.png) 99 | 100 | **CC** is a mode where a property is animated by CC (control change) events 101 | contained in a MIDI track. 102 | 103 | You can specify which **CC Number** the control reacts to. 104 | 105 | ## MIDI signals 106 | 107 | A MIDI animation track also supports sending [Timeline Signals] on key-on/off and some Meta 108 | events. To receive MIDI events from a track, you can use the **MIDI Signal 109 | Receiver** component. 110 | 111 | [Timeline Signals]: 112 | https://blogs.unity3d.com/2019/05/21/how-to-use-timeline-signals/ 113 | 114 | ![Inspector](https://i.imgur.com/LAwiWel.png) 115 | 116 | 1. Add the MIDI Signal Receiver component to a game object that receives MIDI 117 | signals. 118 | 2. Specify which **Note/Octave** the receiver reacts to. 119 | 3. Register methods to **Note On/Off Events**. 120 | 4. Set the receiver game object as the output destination of the track. 121 | 122 | ![Output destination](https://i.imgur.com/PqYi9cN.gif) 123 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Editor/Utils/CoreEditorUtils.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEditor; 3 | using UnityEngine; 4 | 5 | namespace Midity.Playable.Editor 6 | { 7 | // 8 | // These CoreEditor classes are simply copy-pasted from the core render 9 | // pipeline package (com.unity.render-pipelines.core). They are useful to 10 | // build a multi segment inspector, but it's not preferable to have a 11 | // dependency to the render pipelines package just for this purpose. 12 | // 13 | 14 | internal static class CoreEditorStyles 15 | { 16 | public static readonly GUIStyle smallTickbox; 17 | public static readonly GUIStyle miniLabelButton; 18 | 19 | private static readonly Texture2D paneOptionsIconDark; 20 | private static readonly Texture2D paneOptionsIconLight; 21 | 22 | static CoreEditorStyles() 23 | { 24 | smallTickbox = new GUIStyle("ShurikenToggle"); 25 | 26 | var transparentTexture = new Texture2D(1, 1, TextureFormat.ARGB32, false); 27 | transparentTexture.SetPixel(0, 0, Color.clear); 28 | transparentTexture.Apply(); 29 | 30 | miniLabelButton = new GUIStyle(EditorStyles.miniLabel); 31 | miniLabelButton.normal = new GUIStyleState 32 | { 33 | background = transparentTexture, 34 | scaledBackgrounds = null, 35 | textColor = Color.grey 36 | }; 37 | var activeState = new GUIStyleState 38 | { 39 | background = transparentTexture, 40 | scaledBackgrounds = null, 41 | textColor = Color.white 42 | }; 43 | miniLabelButton.active = activeState; 44 | miniLabelButton.onNormal = activeState; 45 | miniLabelButton.onActive = activeState; 46 | 47 | paneOptionsIconDark = (Texture2D) EditorGUIUtility.Load("Builtin Skins/DarkSkin/Images/pane options.png"); 48 | paneOptionsIconLight = (Texture2D) EditorGUIUtility.Load("Builtin Skins/LightSkin/Images/pane options.png"); 49 | } 50 | 51 | public static Texture2D paneOptionsIcon => 52 | EditorGUIUtility.isProSkin ? paneOptionsIconDark : paneOptionsIconLight; 53 | } 54 | 55 | internal static class CoreEditorUtils 56 | { 57 | public static void DrawSplitter(bool isBoxed = false) 58 | { 59 | var rect = GUILayoutUtility.GetRect(1f, 1f); 60 | 61 | // Splitter rect should be full-width 62 | rect.xMin = 0f; 63 | rect.width += 4f; 64 | 65 | if (isBoxed) 66 | { 67 | rect.xMin = EditorGUIUtility.singleLineHeight - 2; 68 | rect.width -= 1; 69 | } 70 | 71 | if (Event.current.type != EventType.Repaint) 72 | return; 73 | 74 | EditorGUI.DrawRect(rect, !EditorGUIUtility.isProSkin 75 | ? new Color(0.6f, 0.6f, 0.6f, 1.333f) 76 | : new Color(0.12f, 0.12f, 0.12f, 1.333f)); 77 | } 78 | 79 | public static bool DrawHeaderToggle(string title, SerializedProperty group, SerializedProperty activeField, 80 | Action contextAction = null) 81 | { 82 | return DrawHeaderToggle(EditorGUIUtility.TrTextContent(title), group, activeField, contextAction); 83 | } 84 | 85 | public static bool DrawHeaderToggle(GUIContent title, SerializedProperty group, SerializedProperty activeField, 86 | Action contextAction = null) 87 | { 88 | var backgroundRect = GUILayoutUtility.GetRect(1f, 17f); 89 | 90 | var labelRect = backgroundRect; 91 | labelRect.xMin += 32f; 92 | labelRect.xMax -= 20f; 93 | 94 | var foldoutRect = backgroundRect; 95 | foldoutRect.y += 1f; 96 | foldoutRect.width = 13f; 97 | foldoutRect.height = 13f; 98 | 99 | var toggleRect = backgroundRect; 100 | toggleRect.x += 16f; 101 | toggleRect.y += 2f; 102 | toggleRect.width = 13f; 103 | toggleRect.height = 13f; 104 | 105 | // Background rect should be full-width 106 | backgroundRect.xMin = 0f; 107 | backgroundRect.width += 4f; 108 | 109 | // Background 110 | var backgroundTint = EditorGUIUtility.isProSkin ? 0.1f : 1f; 111 | EditorGUI.DrawRect(backgroundRect, new Color(backgroundTint, backgroundTint, backgroundTint, 0.2f)); 112 | 113 | // Title 114 | using (new EditorGUI.DisabledScope(!activeField.boolValue)) 115 | { 116 | EditorGUI.LabelField(labelRect, title, EditorStyles.boldLabel); 117 | } 118 | 119 | // Foldout 120 | group.serializedObject.Update(); 121 | group.isExpanded = GUI.Toggle(foldoutRect, group.isExpanded, GUIContent.none, EditorStyles.foldout); 122 | group.serializedObject.ApplyModifiedProperties(); 123 | 124 | // Active checkbox 125 | activeField.serializedObject.Update(); 126 | activeField.boolValue = GUI.Toggle(toggleRect, activeField.boolValue, GUIContent.none, 127 | CoreEditorStyles.smallTickbox); 128 | activeField.serializedObject.ApplyModifiedProperties(); 129 | 130 | // Context menu 131 | var menuIcon = CoreEditorStyles.paneOptionsIcon; 132 | var menuRect = new Rect(labelRect.xMax + 4f, labelRect.y + 4f, menuIcon.width, menuIcon.height); 133 | 134 | if (contextAction != null) 135 | GUI.DrawTexture(menuRect, menuIcon); 136 | 137 | // Handle events 138 | var e = Event.current; 139 | 140 | if (e.type == EventType.MouseDown) 141 | { 142 | if (contextAction != null && menuRect.Contains(e.mousePosition)) 143 | { 144 | contextAction(new Vector2(menuRect.x, menuRect.yMax)); 145 | e.Use(); 146 | } 147 | else if (labelRect.Contains(e.mousePosition)) 148 | { 149 | if (e.button == 0) 150 | group.isExpanded = !group.isExpanded; 151 | else if (contextAction != null) 152 | contextAction(e.mousePosition); 153 | 154 | e.Use(); 155 | } 156 | } 157 | 158 | return group.isExpanded; 159 | } 160 | } 161 | } -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: 0.001 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: 0.001 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: 0.001 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Runtime/TimelineCustoms/MidiAnimation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using UnityEngine.Playables; 4 | 5 | namespace Midity.Playable 6 | { 7 | // Runtime playable class that calculates MIDI based animation 8 | public sealed class MidiAnimation : PlayableBehaviour 9 | { 10 | private readonly MidiTrackPlayer _trackPlayer; 11 | private readonly MidiAnimationAsset midiAnimationAsset; 12 | private FrameData _frameData; 13 | private UnityEngine.Playables.Playable _playable; 14 | 15 | private float _previousTime; 16 | 17 | private readonly MidiSignalPool _signalPool = new MidiSignalPool(); 18 | 19 | public MidiAnimation() 20 | { 21 | } 22 | 23 | internal MidiAnimation(MidiAnimationAsset midiAnimationAsset) 24 | { 25 | this.midiAnimationAsset = midiAnimationAsset; 26 | _trackPlayer = new MidiTrackPlayer(midiTrack, PushSignal, true); 27 | } 28 | 29 | private MidiTrack midiTrack => midiAnimationAsset.MidiTrack; 30 | 31 | public float GetValue(UnityEngine.Playables.Playable playable, MidiControl control) 32 | { 33 | var t = (float) (playable.GetTime() % midiTrack.TotalSeconds); 34 | switch (control.mode) 35 | { 36 | case MidiControl.Mode.NoteEnvelope: 37 | return GetNoteEnvelopeValue(control, t); 38 | case MidiControl.Mode.NoteCurve: 39 | return GetNoteCurveValue(control, t); 40 | case MidiControl.Mode.CC: 41 | return GetCCValue(control, t); 42 | default: 43 | return 0; 44 | } 45 | } 46 | 47 | public override object Clone() 48 | { 49 | return new MidiAnimation(midiAnimationAsset); 50 | } 51 | 52 | public override void OnGraphStart(UnityEngine.Playables.Playable playable) 53 | { 54 | _previousTime = (float) playable.GetTime(); 55 | _trackPlayer.ResetHead(_previousTime); 56 | } 57 | 58 | public override void OnBehaviourPause(UnityEngine.Playables.Playable playable, FrameData info) 59 | { 60 | // When the playable is being finished, signals laying in the rest 61 | // of the clip should be all triggered. 62 | if (!playable.IsDone()) return; 63 | _playable = playable; 64 | _frameData = info; 65 | var currentTime = (float) playable.GetDuration(); 66 | _trackPlayer.PlayByDeltaTime(_previousTime - currentTime); 67 | _previousTime = currentTime; 68 | } 69 | 70 | public override void PrepareFrame(UnityEngine.Playables.Playable playable, FrameData info) 71 | { 72 | _playable = playable; 73 | _frameData = info; 74 | var currentTime = (float) playable.GetTime(); 75 | if (info.evaluationType == FrameData.EvaluationType.Playback) 76 | _trackPlayer.PlayByDeltaTime(currentTime - _previousTime); 77 | _previousTime = currentTime; 78 | } 79 | 80 | private void PushSignal(MTrkEvent mTrkEvent) 81 | { 82 | _frameData.output.PushNotification(_playable, _signalPool.Allocate(mTrkEvent)); 83 | } 84 | 85 | private (ControlChangeEvent i0, ControlChangeEvent i1) GetCCEventIndexAroundTick(uint tick, 86 | Controller controller) 87 | { 88 | var time = 0u; 89 | ControlChangeEvent lastEvent = null; 90 | foreach (var mEvent in midiTrack.Events) 91 | { 92 | time += mEvent.Ticks; 93 | if (!(mEvent is ControlChangeEvent e)) continue; 94 | if (e.controller != controller) continue; 95 | if (time > tick) return (lastEvent, e); 96 | lastEvent = e; 97 | } 98 | 99 | return (lastEvent, lastEvent); 100 | } 101 | 102 | private NoteEventPair GetNoteEventsBeforeTick(uint tick, MidiNoteFilter note) 103 | { 104 | NoteEventPair pair = null; 105 | foreach (var noteEventPair in midiTrack.NoteEventPairs) 106 | { 107 | if (noteEventPair.OnTick > tick) break; 108 | if (!note.Check(noteEventPair.onNoteEvent)) continue; 109 | pair = noteEventPair; 110 | } 111 | 112 | return pair; 113 | } 114 | 115 | private float CalculateEnvelope(MidiEnvelope envelope, float onTime, float offTime) 116 | { 117 | var attackTime = envelope.AttackTime; 118 | var attackRate = 1 / attackTime; 119 | 120 | var decayTime = envelope.DecayTime; 121 | var decayRate = 1 / decayTime; 122 | 123 | var level = -offTime / envelope.ReleaseTime; 124 | 125 | if (onTime < attackTime) 126 | level += onTime * attackRate; 127 | else if (onTime < attackTime + decayTime) 128 | level += 1 - (onTime - attackTime) * decayRate * (1 - envelope.SustainLevel); 129 | else 130 | level += envelope.SustainLevel; 131 | 132 | return Mathf.Max(0, level); 133 | } 134 | 135 | private float GetNoteEnvelopeValue(MidiControl control, float time) 136 | { 137 | var tick = midiTrack.ConvertSecondToTicks(time); 138 | var pair = GetNoteEventsBeforeTick(tick, control.noteFilter); 139 | 140 | if (pair is null) return 0; 141 | 142 | // Note-off time 143 | var offTime = Math.Min(midiTrack.ConvertTicksToSecond(pair.OffTick), time); 144 | 145 | var envelope = CalculateEnvelope( 146 | control.envelope, 147 | Mathf.Max(0, offTime - midiTrack.ConvertTicksToSecond(pair.OnTick)), 148 | Mathf.Max(0, time - offTime) 149 | ); 150 | 151 | var velocity = pair.Velocity / 127.0f; 152 | 153 | return envelope * velocity; 154 | } 155 | 156 | private float GetNoteCurveValue(MidiControl control, float time) 157 | { 158 | var tick = midiTrack.ConvertSecondToTicks(time); 159 | var pair = GetNoteEventsBeforeTick(tick, control.noteFilter); 160 | 161 | if (pair is null) return 0; 162 | 163 | var curve = control.curve.Evaluate(Mathf.Max(0, time - midiTrack.ConvertTicksToSecond(pair.OnTick))); 164 | var velocity = pair.Velocity / 127.0f; 165 | 166 | return curve * velocity; 167 | } 168 | 169 | private float GetCCValue(MidiControl control, float time) 170 | { 171 | var tick = midiTrack.ConvertSecondToTicks(time); 172 | var (i0, i1) = GetCCEventIndexAroundTick(tick, control.ccController); 173 | 174 | if (i0 is null) return 0; 175 | if (i1 is null) return i0.data / 127.0f; 176 | 177 | var v0 = i0.data / 127.0f; 178 | var v1 = i1.data / 127.0f; 179 | 180 | var t0 = midiTrack.ConvertTicksToSecond(i0.Ticks); 181 | var t1 = midiTrack.ConvertTicksToSecond(i1.Ticks); 182 | return Mathf.Lerp(v0, v1, Mathf.Clamp01((time - t0) / (t1 - t0))); 183 | } 184 | } 185 | } -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 5 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Very Low 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | skinWeights: 1 22 | textureQuality: 1 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.3 31 | maximumLODLevel: 0 32 | streamingMipmapsActive: 0 33 | streamingMipmapsAddAllCameras: 1 34 | streamingMipmapsMemoryBudget: 512 35 | streamingMipmapsRenderersPerFrame: 512 36 | streamingMipmapsMaxLevelReduction: 2 37 | streamingMipmapsMaxFileIORequests: 1024 38 | particleRaycastBudget: 4 39 | asyncUploadTimeSlice: 2 40 | asyncUploadBufferSize: 16 41 | asyncUploadPersistentBuffer: 1 42 | resolutionScalingFixedDPIFactor: 1 43 | customRenderPipeline: {fileID: 0} 44 | excludedTargetPlatforms: [] 45 | - serializedVersion: 2 46 | name: Low 47 | pixelLightCount: 0 48 | shadows: 0 49 | shadowResolution: 0 50 | shadowProjection: 1 51 | shadowCascades: 1 52 | shadowDistance: 20 53 | shadowNearPlaneOffset: 3 54 | shadowCascade2Split: 0.33333334 55 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 56 | shadowmaskMode: 0 57 | skinWeights: 2 58 | textureQuality: 0 59 | anisotropicTextures: 0 60 | antiAliasing: 0 61 | softParticles: 0 62 | softVegetation: 0 63 | realtimeReflectionProbes: 0 64 | billboardsFaceCameraPosition: 0 65 | vSyncCount: 0 66 | lodBias: 0.4 67 | maximumLODLevel: 0 68 | streamingMipmapsActive: 0 69 | streamingMipmapsAddAllCameras: 1 70 | streamingMipmapsMemoryBudget: 512 71 | streamingMipmapsRenderersPerFrame: 512 72 | streamingMipmapsMaxLevelReduction: 2 73 | streamingMipmapsMaxFileIORequests: 1024 74 | particleRaycastBudget: 16 75 | asyncUploadTimeSlice: 2 76 | asyncUploadBufferSize: 16 77 | asyncUploadPersistentBuffer: 1 78 | resolutionScalingFixedDPIFactor: 1 79 | customRenderPipeline: {fileID: 0} 80 | excludedTargetPlatforms: [] 81 | - serializedVersion: 2 82 | name: Medium 83 | pixelLightCount: 1 84 | shadows: 1 85 | shadowResolution: 0 86 | shadowProjection: 1 87 | shadowCascades: 1 88 | shadowDistance: 20 89 | shadowNearPlaneOffset: 3 90 | shadowCascade2Split: 0.33333334 91 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 92 | shadowmaskMode: 0 93 | skinWeights: 2 94 | textureQuality: 0 95 | anisotropicTextures: 1 96 | antiAliasing: 0 97 | softParticles: 0 98 | softVegetation: 0 99 | realtimeReflectionProbes: 0 100 | billboardsFaceCameraPosition: 0 101 | vSyncCount: 1 102 | lodBias: 0.7 103 | maximumLODLevel: 0 104 | streamingMipmapsActive: 0 105 | streamingMipmapsAddAllCameras: 1 106 | streamingMipmapsMemoryBudget: 512 107 | streamingMipmapsRenderersPerFrame: 512 108 | streamingMipmapsMaxLevelReduction: 2 109 | streamingMipmapsMaxFileIORequests: 1024 110 | particleRaycastBudget: 64 111 | asyncUploadTimeSlice: 2 112 | asyncUploadBufferSize: 16 113 | asyncUploadPersistentBuffer: 1 114 | resolutionScalingFixedDPIFactor: 1 115 | customRenderPipeline: {fileID: 0} 116 | excludedTargetPlatforms: [] 117 | - serializedVersion: 2 118 | name: High 119 | pixelLightCount: 2 120 | shadows: 2 121 | shadowResolution: 1 122 | shadowProjection: 1 123 | shadowCascades: 2 124 | shadowDistance: 40 125 | shadowNearPlaneOffset: 3 126 | shadowCascade2Split: 0.33333334 127 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 128 | shadowmaskMode: 1 129 | skinWeights: 2 130 | textureQuality: 0 131 | anisotropicTextures: 1 132 | antiAliasing: 0 133 | softParticles: 0 134 | softVegetation: 1 135 | realtimeReflectionProbes: 1 136 | billboardsFaceCameraPosition: 1 137 | vSyncCount: 1 138 | lodBias: 1 139 | maximumLODLevel: 0 140 | streamingMipmapsActive: 0 141 | streamingMipmapsAddAllCameras: 1 142 | streamingMipmapsMemoryBudget: 512 143 | streamingMipmapsRenderersPerFrame: 512 144 | streamingMipmapsMaxLevelReduction: 2 145 | streamingMipmapsMaxFileIORequests: 1024 146 | particleRaycastBudget: 256 147 | asyncUploadTimeSlice: 2 148 | asyncUploadBufferSize: 16 149 | asyncUploadPersistentBuffer: 1 150 | resolutionScalingFixedDPIFactor: 1 151 | customRenderPipeline: {fileID: 0} 152 | excludedTargetPlatforms: [] 153 | - serializedVersion: 2 154 | name: Very High 155 | pixelLightCount: 3 156 | shadows: 2 157 | shadowResolution: 2 158 | shadowProjection: 1 159 | shadowCascades: 2 160 | shadowDistance: 70 161 | shadowNearPlaneOffset: 3 162 | shadowCascade2Split: 0.33333334 163 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 164 | shadowmaskMode: 1 165 | skinWeights: 4 166 | textureQuality: 0 167 | anisotropicTextures: 2 168 | antiAliasing: 2 169 | softParticles: 1 170 | softVegetation: 1 171 | realtimeReflectionProbes: 1 172 | billboardsFaceCameraPosition: 1 173 | vSyncCount: 1 174 | lodBias: 1.5 175 | maximumLODLevel: 0 176 | streamingMipmapsActive: 0 177 | streamingMipmapsAddAllCameras: 1 178 | streamingMipmapsMemoryBudget: 512 179 | streamingMipmapsRenderersPerFrame: 512 180 | streamingMipmapsMaxLevelReduction: 2 181 | streamingMipmapsMaxFileIORequests: 1024 182 | particleRaycastBudget: 1024 183 | asyncUploadTimeSlice: 2 184 | asyncUploadBufferSize: 16 185 | asyncUploadPersistentBuffer: 1 186 | resolutionScalingFixedDPIFactor: 1 187 | customRenderPipeline: {fileID: 0} 188 | excludedTargetPlatforms: [] 189 | - serializedVersion: 2 190 | name: Ultra 191 | pixelLightCount: 4 192 | shadows: 2 193 | shadowResolution: 2 194 | shadowProjection: 1 195 | shadowCascades: 4 196 | shadowDistance: 150 197 | shadowNearPlaneOffset: 3 198 | shadowCascade2Split: 0.33333334 199 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 200 | shadowmaskMode: 1 201 | skinWeights: 4 202 | textureQuality: 0 203 | anisotropicTextures: 2 204 | antiAliasing: 2 205 | softParticles: 1 206 | softVegetation: 1 207 | realtimeReflectionProbes: 1 208 | billboardsFaceCameraPosition: 1 209 | vSyncCount: 1 210 | lodBias: 2 211 | maximumLODLevel: 0 212 | streamingMipmapsActive: 0 213 | streamingMipmapsAddAllCameras: 1 214 | streamingMipmapsMemoryBudget: 512 215 | streamingMipmapsRenderersPerFrame: 512 216 | streamingMipmapsMaxLevelReduction: 2 217 | streamingMipmapsMaxFileIORequests: 1024 218 | particleRaycastBudget: 4096 219 | asyncUploadTimeSlice: 2 220 | asyncUploadBufferSize: 16 221 | asyncUploadPersistentBuffer: 1 222 | resolutionScalingFixedDPIFactor: 1 223 | customRenderPipeline: {fileID: 0} 224 | excludedTargetPlatforms: [] 225 | m_PerPlatformDefaultQuality: 226 | Android: 2 227 | Lumin: 5 228 | Nintendo 3DS: 5 229 | Nintendo Switch: 5 230 | PS4: 5 231 | PSP2: 2 232 | Stadia: 5 233 | Standalone: 5 234 | WebGL: 3 235 | Windows Store Apps: 5 236 | XboxOne: 5 237 | iPhone: 2 238 | tvOS: 2 239 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Editor/CustomEditors/MidiAnimationTrackEditor.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEditor.Timeline; 3 | using UnityEngine; 4 | 5 | namespace Midity.Playable.Editor 6 | { 7 | // Custom inspector for MIDI animation tracks 8 | // It provides a UI for editing track controls. 9 | [CustomEditor(typeof(MidiAnimationTrack))] 10 | internal class MidiAnimationTrackEditor : UnityEditor.Editor 11 | { 12 | #region Editor implementation 13 | 14 | private SerializedProperty _controls; 15 | 16 | private void OnEnable() 17 | { 18 | _controls = serializedObject.FindProperty("template.controls"); 19 | } 20 | 21 | public override void OnInspectorGUI() 22 | { 23 | serializedObject.Update(); 24 | 25 | EditorGUI.BeginChangeCheck(); 26 | 27 | // Draw all the controls using the "header with a toggle" style. 28 | for (var i = 0; i < _controls.arraySize; i++) 29 | { 30 | CoreEditorUtils.DrawSplitter(); 31 | 32 | var title = "Control Element " + (i + 1); 33 | var control = _controls.GetArrayElementAtIndex(i); 34 | var enabled = control.FindPropertyRelative("enabled"); 35 | 36 | var toggle = CoreEditorUtils.DrawHeaderToggle 37 | (title, control, enabled, pos => OnContextClick(pos, i)); 38 | 39 | if (!toggle) continue; 40 | 41 | using (new EditorGUI.DisabledScope(!enabled.boolValue)) 42 | { 43 | EditorGUILayout.Space(); 44 | EditorGUILayout.PropertyField(control); 45 | // All modifications should be applied at this moment 46 | // because DrawHeaderToggle implicitly discards them. 47 | serializedObject.ApplyModifiedProperties(); 48 | } 49 | } 50 | 51 | // We have to manually refresh the timeline. 52 | if (EditorGUI.EndChangeCheck()) 53 | TimelineEditor.Refresh(RefreshReason.ContentsModified); 54 | 55 | if (_controls.arraySize > 0) CoreEditorUtils.DrawSplitter(); 56 | EditorGUILayout.Space(); 57 | 58 | // "Add" button 59 | if (GUILayout.Button("Add Control Element")) AppendDefaultMidiControl(); 60 | } 61 | 62 | #endregion 63 | 64 | #region Editor helper methods 65 | 66 | private void AppendDefaultMidiControl() 67 | { 68 | // Expand the array via SerializedProperty. 69 | var index = _controls.arraySize; 70 | _controls.InsertArrayElementAtIndex(index); 71 | 72 | var prop = _controls.GetArrayElementAtIndex(index); 73 | prop.isExpanded = true; 74 | 75 | serializedObject.ApplyModifiedProperties(); 76 | 77 | // Set a new control instance. 78 | var track = (MidiAnimationTrack) target; 79 | var controls = track.template.controls; 80 | Undo.RecordObject(track, "Add MIDI Control"); 81 | controls[controls.Length - 1] = new MidiControl(); 82 | } 83 | 84 | private void CopyControl(MidiControl src, MidiControl dst, bool updateGuid) 85 | { 86 | // Copy MidiControl members. 87 | // Is there any smarter way to do this? 88 | dst.enabled = src.enabled; 89 | dst.mode = src.mode; 90 | dst.noteFilter = src.noteFilter; 91 | dst.envelope = src.envelope; 92 | dst.curve = new AnimationCurve(src.curve.keys); 93 | dst.propertyName = src.propertyName; 94 | dst.fieldName = src.fieldName; 95 | dst.ccController = src.ccController; 96 | dst.vector0 = src.vector0; 97 | dst.vector1 = src.vector1; 98 | 99 | if (updateGuid) 100 | { 101 | // Copy targetComponent as a new reference. 102 | var guid = GUID.Generate().ToString(); 103 | dst.targetComponent.exposedName = guid; 104 | var resolver = serializedObject.context as IExposedPropertyTable; 105 | resolver?.SetReferenceValue(guid, src.targetComponent.Resolve(resolver)); 106 | } 107 | else 108 | // Simply copy targetComponent. 109 | { 110 | dst.targetComponent = src.targetComponent; 111 | } 112 | } 113 | 114 | #endregion 115 | 116 | #region Context menu 117 | 118 | private static class Labels 119 | { 120 | public static readonly GUIContent MoveUp = new GUIContent("Move Up"); 121 | public static readonly GUIContent MoveDown = new GUIContent("Move Down"); 122 | public static readonly GUIContent Reset = new GUIContent("Reset"); 123 | public static readonly GUIContent Remove = new GUIContent("Remove"); 124 | public static readonly GUIContent Copy = new GUIContent("Copy"); 125 | public static readonly GUIContent Paste = new GUIContent("Paste"); 126 | } 127 | 128 | private static readonly MidiControl _clipboard = new MidiControl(); 129 | 130 | private void OnContextClick(Vector2 pos, int index) 131 | { 132 | var menu = new GenericMenu(); 133 | 134 | // "Move Up" 135 | if (index == 0) 136 | menu.AddDisabledItem(Labels.MoveUp); 137 | else 138 | menu.AddItem(Labels.MoveUp, false, () => OnMoveControl(index, index - 1)); 139 | 140 | // "Move Down" 141 | if (index == _controls.arraySize - 1) 142 | menu.AddDisabledItem(Labels.MoveDown); 143 | else 144 | menu.AddItem(Labels.MoveDown, false, () => OnMoveControl(index, index + 1)); 145 | 146 | // "Reset" / "Remove" 147 | menu.AddSeparator(string.Empty); 148 | menu.AddItem(Labels.Reset, false, () => OnResetControl(index)); 149 | menu.AddItem(Labels.Remove, false, () => OnRemoveControl(index)); 150 | 151 | // "Copy" / "Paste" 152 | menu.AddSeparator(string.Empty); 153 | menu.AddItem(Labels.Copy, false, () => OnCopyControl(index)); 154 | menu.AddItem(Labels.Paste, false, () => OnPasteControl(index)); 155 | 156 | // Show the drop down. 157 | menu.DropDown(new Rect(pos, Vector2.zero)); 158 | } 159 | 160 | private void OnMoveControl(int src, int dst) 161 | { 162 | serializedObject.Update(); 163 | _controls.MoveArrayElement(src, dst); 164 | serializedObject.ApplyModifiedProperties(); 165 | // We don't need to refresh the timeline in this case. 166 | // TimelineEditor.Refresh(RefreshReason.ContentsModified); 167 | } 168 | 169 | private void OnResetControl(int index) 170 | { 171 | var track = (MidiAnimationTrack) target; 172 | Undo.RecordObject(track, "Reset MIDI Control"); 173 | track.template.controls[index] = new MidiControl(); 174 | TimelineEditor.Refresh(RefreshReason.ContentsModified); 175 | } 176 | 177 | private void OnRemoveControl(int index) 178 | { 179 | serializedObject.Update(); 180 | _controls.DeleteArrayElementAtIndex(index); 181 | serializedObject.ApplyModifiedProperties(); 182 | TimelineEditor.Refresh(RefreshReason.ContentsModified); 183 | } 184 | 185 | private void OnCopyControl(int index) 186 | { 187 | var track = (MidiAnimationTrack) target; 188 | Undo.RecordObject(track, "Copy MIDI Control"); 189 | CopyControl(track.template.controls[index], _clipboard, false); 190 | } 191 | 192 | private void OnPasteControl(int index) 193 | { 194 | var track = (MidiAnimationTrack) target; 195 | Undo.RecordObject(track, "Paste MIDI Control"); 196 | CopyControl(_clipboard, track.template.controls[index], true); 197 | TimelineEditor.Refresh(RefreshReason.ContentsModified); 198 | } 199 | 200 | #endregion 201 | } 202 | } -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Editor/CustomPropertyDrawer/MidiEnvelopeDrawer.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | 4 | namespace Midity.Playable.Editor 5 | { 6 | // Custom property drawer for ADSR envelope parameters 7 | [CustomPropertyDrawer(typeof(MidiEnvelope), true)] 8 | internal sealed class MidiEnvelopeDrawer : PropertyDrawer 9 | { 10 | #region Public method 11 | 12 | public static float GetHeight() 13 | { 14 | var line = EditorGUIUtility.singleLineHeight; 15 | var space = EditorGUIUtility.standardVerticalSpacing; 16 | if (!EditorGUIUtility.wideMode) line *= 2; 17 | return line + GraphHeight + space * 3; 18 | } 19 | 20 | #endregion 21 | 22 | #region PropertyDrawer implementation 23 | 24 | public override void OnGUI(Rect rect, SerializedProperty prop, GUIContent label) 25 | { 26 | // Head control ID: Used to determine the control IDs. 27 | var id0 = GUIUtility.GetControlID(FocusType.Passive); 28 | 29 | // Envelope parameters (ADSR) 30 | rect = DrawEnvelopeParameterFields(rect, prop, label); 31 | 32 | // Envelope graph 33 | GUI.BeginGroup(rect); 34 | DrawGraph(RetrieveEnvelope(prop), rect.width, rect.height, id0 + 2); 35 | GUI.EndGroup(); 36 | } 37 | 38 | public override float GetPropertyHeight(SerializedProperty property, GUIContent label) 39 | { 40 | return GetHeight(); 41 | } 42 | 43 | #endregion 44 | 45 | #region Internal constants and variables 46 | 47 | private const float GraphHeight = 40; 48 | 49 | private static Color backgroundColor => 50 | EditorGUIUtility.isProSkin ? new Color(0.18f, 0.18f, 0.18f) : new Color(0.45f, 0.45f, 0.45f); 51 | 52 | private static Color highlightColor => 53 | EditorGUIUtility.isProSkin ? new Color(0.25f, 0.25f, 0.25f) : new Color(0.5f, 0.5f, 0.5f); 54 | 55 | private static Color guideColor => 56 | EditorGUIUtility.isProSkin ? new Color(0.3f, 0.3f, 0.3f) : new Color(0.56f, 0.56f, 0.56f); 57 | 58 | private static Color LineColor => 59 | EditorGUIUtility.isProSkin ? new Color(0.6f, 0.9f, 0.4f) : new Color(0.4f, 0.9f, 0.2f); 60 | 61 | private static readonly GUIContent[] _adsrLabels = 62 | { 63 | new GUIContent("A"), new GUIContent("D"), 64 | new GUIContent("S"), new GUIContent("R") 65 | }; 66 | 67 | private static readonly Vector3[] _lineVerts = new Vector3 [2]; 68 | private static readonly Vector3[] _graphVerts = new Vector3 [6]; 69 | 70 | private Rect DrawEnvelopeParameterFields(Rect rect, SerializedProperty prop, GUIContent label) 71 | { 72 | // Make a copy of the SerializedProperty to iterate fields. 73 | var itr = prop.Copy(); 74 | 75 | // Label (non clickable) 76 | rect.height = EditorGUIUtility.singleLineHeight; 77 | EditorGUI.LabelField(rect, label); 78 | 79 | if (EditorGUIUtility.wideMode) 80 | { 81 | // Wide mode: Add margin for the label. 82 | rect.x += EditorGUIUtility.labelWidth; 83 | rect.width -= EditorGUIUtility.labelWidth; 84 | } 85 | else 86 | { 87 | // Narrow mode: Move to the next line. 88 | rect.y += rect.height; 89 | 90 | // Indent the following controls. 91 | EditorGUI.indentLevel++; 92 | rect = EditorGUI.IndentedRect(rect); 93 | EditorGUI.indentLevel--; 94 | } 95 | 96 | // Field rect 97 | var r = rect; 98 | r.width = (r.width - 6) / 4; 99 | 100 | // Change the label width in the following fields. 101 | var originalLabelWidth = EditorGUIUtility.labelWidth; 102 | EditorGUIUtility.labelWidth = 12; 103 | 104 | for (var i = 0; i < 4; i++) 105 | { 106 | itr.Next(true); 107 | 108 | // Element field 109 | EditorGUI.BeginChangeCheck(); 110 | EditorGUI.PropertyField(r, itr, _adsrLabels[i]); 111 | 112 | // Apply the value constraint. 113 | if (EditorGUI.EndChangeCheck()) 114 | if (i == 2) 115 | itr.floatValue = Mathf.Clamp01(itr.floatValue); // S 116 | else 117 | itr.floatValue = Mathf.Max(0, itr.floatValue); // ADR 118 | 119 | // Move to the next field. 120 | r.x += r.width + 2; 121 | } 122 | 123 | // Recover the original label width. 124 | EditorGUIUtility.labelWidth = originalLabelWidth; 125 | 126 | // Calculate the graph position. 127 | rect.y += rect.height + EditorGUIUtility.standardVerticalSpacing; 128 | rect.height = GraphHeight; 129 | return rect; 130 | } 131 | 132 | // Retrieve serialized envelope parameters #not_very_efficient 133 | private MidiEnvelope RetrieveEnvelope(SerializedProperty prop) 134 | { 135 | return new MidiEnvelope 136 | { 137 | attack = prop.FindPropertyRelative("attack").floatValue, 138 | decay = prop.FindPropertyRelative("decay").floatValue, 139 | sustain = prop.FindPropertyRelative("sustain").floatValue, 140 | release = prop.FindPropertyRelative("release").floatValue 141 | }; 142 | } 143 | 144 | private void DrawAALine(float x0, float y0, float x1, float y1) 145 | { 146 | _lineVerts[0].x = x0; 147 | _lineVerts[0].y = y0; 148 | _lineVerts[1].x = x1; 149 | _lineVerts[1].y = y1; 150 | Handles.DrawAAPolyLine(_lineVerts); 151 | } 152 | 153 | private void DrawGraph(MidiEnvelope env, float width, float height, int controlID) 154 | { 155 | const float scale = 2; 156 | 157 | // Time parameters 158 | var t1 = scale * env.AttackTime; 159 | var t2 = t1 + scale * env.DecayTime; 160 | var t3 = t2 + scale * 0.2f; 161 | var t4 = t3 + scale * env.ReleaseTime; 162 | 163 | // Position parameters 164 | var x1 = 1 + width * t1; 165 | var x2 = 1 + width * t2; 166 | var x3 = 1 + width * t3; 167 | var x4 = 1 + width * t4; 168 | var sus_y = (1 - env.SustainLevel) * (height - 2) + 1; 169 | 170 | // ADSR graph vertices 171 | _graphVerts[0] = new Vector3(1, height); 172 | _graphVerts[1] = new Vector3(x1, 1); 173 | _graphVerts[2] = new Vector3(x2, sus_y); 174 | _graphVerts[3] = new Vector3(x3, sus_y); 175 | _graphVerts[4] = new Vector3(x4, height - 1); 176 | _graphVerts[5] = new Vector3(width, height - 1); 177 | 178 | // Background 179 | EditorGUI.DrawRect(new Rect(0, 0, width, height), backgroundColor); 180 | 181 | // Guide elements 182 | var focus = GUIUtility.keyboardControl; 183 | 184 | if (focus == controlID) 185 | EditorGUI.DrawRect(new Rect(0, 0, x1, height), highlightColor); 186 | else if (focus == controlID + 1) 187 | EditorGUI.DrawRect(new Rect(x1, 0, x2 - x1, height), highlightColor); 188 | else if (focus == controlID + 2) 189 | EditorGUI.DrawRect(new Rect(0, sus_y, width, height), highlightColor); 190 | else if (focus == controlID + 3) 191 | EditorGUI.DrawRect(new Rect(x3, 0, x4 - x3, height), highlightColor); 192 | 193 | Handles.color = guideColor; 194 | DrawAALine(x1, 0, x1, height); 195 | DrawAALine(x2, 0, x2, height); 196 | DrawAALine(x3, 0, x3, height); 197 | DrawAALine(x4, 0, x4, height); 198 | DrawAALine(0, sus_y, width, sus_y); 199 | 200 | // ADSR graph 201 | Handles.color = LineColor; 202 | Handles.DrawAAPolyLine(_graphVerts); 203 | } 204 | 205 | #endregion 206 | } 207 | } -------------------------------------------------------------------------------- /Packages/packages-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.ext.nunit": { 4 | "version": "1.0.6", 5 | "depth": 1, 6 | "source": "registry", 7 | "dependencies": {}, 8 | "url": "https://packages.unity.com" 9 | }, 10 | "com.unity.ide.rider": { 11 | "version": "1.2.1", 12 | "depth": 0, 13 | "source": "registry", 14 | "dependencies": { 15 | "com.unity.test-framework": "1.1.1" 16 | }, 17 | "url": "https://packages.unity.com" 18 | }, 19 | "com.unity.ide.visualstudio": { 20 | "version": "2.0.5", 21 | "depth": 0, 22 | "source": "registry", 23 | "dependencies": {}, 24 | "url": "https://packages.unity.com" 25 | }, 26 | "com.unity.ide.vscode": { 27 | "version": "1.2.3", 28 | "depth": 0, 29 | "source": "registry", 30 | "dependencies": {}, 31 | "url": "https://packages.unity.com" 32 | }, 33 | "com.unity.test-framework": { 34 | "version": "1.1.22", 35 | "depth": 0, 36 | "source": "registry", 37 | "dependencies": { 38 | "com.unity.ext.nunit": "1.0.6", 39 | "com.unity.modules.imgui": "1.0.0", 40 | "com.unity.modules.jsonserialize": "1.0.0" 41 | }, 42 | "url": "https://packages.unity.com" 43 | }, 44 | "com.unity.timeline": { 45 | "version": "1.3.7", 46 | "depth": 0, 47 | "source": "registry", 48 | "dependencies": { 49 | "com.unity.modules.director": "1.0.0", 50 | "com.unity.modules.animation": "1.0.0", 51 | "com.unity.modules.audio": "1.0.0", 52 | "com.unity.modules.particlesystem": "1.0.0" 53 | }, 54 | "url": "https://packages.unity.com" 55 | }, 56 | "com.unity.ugui": { 57 | "version": "1.0.0", 58 | "depth": 0, 59 | "source": "builtin", 60 | "dependencies": { 61 | "com.unity.modules.ui": "1.0.0", 62 | "com.unity.modules.imgui": "1.0.0" 63 | } 64 | }, 65 | "jp.goma_recorder.midity": { 66 | "version": "1.2.0", 67 | "depth": 0, 68 | "source": "registry", 69 | "dependencies": {}, 70 | "url": "https://package.openupm.com" 71 | }, 72 | "com.unity.modules.ai": { 73 | "version": "1.0.0", 74 | "depth": 0, 75 | "source": "builtin", 76 | "dependencies": {} 77 | }, 78 | "com.unity.modules.androidjni": { 79 | "version": "1.0.0", 80 | "depth": 0, 81 | "source": "builtin", 82 | "dependencies": {} 83 | }, 84 | "com.unity.modules.animation": { 85 | "version": "1.0.0", 86 | "depth": 0, 87 | "source": "builtin", 88 | "dependencies": {} 89 | }, 90 | "com.unity.modules.assetbundle": { 91 | "version": "1.0.0", 92 | "depth": 0, 93 | "source": "builtin", 94 | "dependencies": {} 95 | }, 96 | "com.unity.modules.audio": { 97 | "version": "1.0.0", 98 | "depth": 0, 99 | "source": "builtin", 100 | "dependencies": {} 101 | }, 102 | "com.unity.modules.cloth": { 103 | "version": "1.0.0", 104 | "depth": 0, 105 | "source": "builtin", 106 | "dependencies": { 107 | "com.unity.modules.physics": "1.0.0" 108 | } 109 | }, 110 | "com.unity.modules.director": { 111 | "version": "1.0.0", 112 | "depth": 0, 113 | "source": "builtin", 114 | "dependencies": { 115 | "com.unity.modules.audio": "1.0.0", 116 | "com.unity.modules.animation": "1.0.0" 117 | } 118 | }, 119 | "com.unity.modules.imageconversion": { 120 | "version": "1.0.0", 121 | "depth": 0, 122 | "source": "builtin", 123 | "dependencies": {} 124 | }, 125 | "com.unity.modules.imgui": { 126 | "version": "1.0.0", 127 | "depth": 0, 128 | "source": "builtin", 129 | "dependencies": {} 130 | }, 131 | "com.unity.modules.jsonserialize": { 132 | "version": "1.0.0", 133 | "depth": 0, 134 | "source": "builtin", 135 | "dependencies": {} 136 | }, 137 | "com.unity.modules.particlesystem": { 138 | "version": "1.0.0", 139 | "depth": 0, 140 | "source": "builtin", 141 | "dependencies": {} 142 | }, 143 | "com.unity.modules.physics": { 144 | "version": "1.0.0", 145 | "depth": 0, 146 | "source": "builtin", 147 | "dependencies": {} 148 | }, 149 | "com.unity.modules.physics2d": { 150 | "version": "1.0.0", 151 | "depth": 0, 152 | "source": "builtin", 153 | "dependencies": {} 154 | }, 155 | "com.unity.modules.screencapture": { 156 | "version": "1.0.0", 157 | "depth": 0, 158 | "source": "builtin", 159 | "dependencies": { 160 | "com.unity.modules.imageconversion": "1.0.0" 161 | } 162 | }, 163 | "com.unity.modules.subsystems": { 164 | "version": "1.0.0", 165 | "depth": 1, 166 | "source": "builtin", 167 | "dependencies": { 168 | "com.unity.modules.jsonserialize": "1.0.0" 169 | } 170 | }, 171 | "com.unity.modules.terrain": { 172 | "version": "1.0.0", 173 | "depth": 0, 174 | "source": "builtin", 175 | "dependencies": {} 176 | }, 177 | "com.unity.modules.terrainphysics": { 178 | "version": "1.0.0", 179 | "depth": 0, 180 | "source": "builtin", 181 | "dependencies": { 182 | "com.unity.modules.physics": "1.0.0", 183 | "com.unity.modules.terrain": "1.0.0" 184 | } 185 | }, 186 | "com.unity.modules.tilemap": { 187 | "version": "1.0.0", 188 | "depth": 0, 189 | "source": "builtin", 190 | "dependencies": { 191 | "com.unity.modules.physics2d": "1.0.0" 192 | } 193 | }, 194 | "com.unity.modules.ui": { 195 | "version": "1.0.0", 196 | "depth": 0, 197 | "source": "builtin", 198 | "dependencies": {} 199 | }, 200 | "com.unity.modules.uielements": { 201 | "version": "1.0.0", 202 | "depth": 0, 203 | "source": "builtin", 204 | "dependencies": { 205 | "com.unity.modules.ui": "1.0.0", 206 | "com.unity.modules.imgui": "1.0.0", 207 | "com.unity.modules.jsonserialize": "1.0.0", 208 | "com.unity.modules.uielementsnative": "1.0.0" 209 | } 210 | }, 211 | "com.unity.modules.uielementsnative": { 212 | "version": "1.0.0", 213 | "depth": 1, 214 | "source": "builtin", 215 | "dependencies": { 216 | "com.unity.modules.ui": "1.0.0", 217 | "com.unity.modules.imgui": "1.0.0", 218 | "com.unity.modules.jsonserialize": "1.0.0" 219 | } 220 | }, 221 | "com.unity.modules.umbra": { 222 | "version": "1.0.0", 223 | "depth": 0, 224 | "source": "builtin", 225 | "dependencies": {} 226 | }, 227 | "com.unity.modules.unityanalytics": { 228 | "version": "1.0.0", 229 | "depth": 0, 230 | "source": "builtin", 231 | "dependencies": { 232 | "com.unity.modules.unitywebrequest": "1.0.0", 233 | "com.unity.modules.jsonserialize": "1.0.0" 234 | } 235 | }, 236 | "com.unity.modules.unitywebrequest": { 237 | "version": "1.0.0", 238 | "depth": 0, 239 | "source": "builtin", 240 | "dependencies": {} 241 | }, 242 | "com.unity.modules.unitywebrequestassetbundle": { 243 | "version": "1.0.0", 244 | "depth": 0, 245 | "source": "builtin", 246 | "dependencies": { 247 | "com.unity.modules.assetbundle": "1.0.0", 248 | "com.unity.modules.unitywebrequest": "1.0.0" 249 | } 250 | }, 251 | "com.unity.modules.unitywebrequestaudio": { 252 | "version": "1.0.0", 253 | "depth": 0, 254 | "source": "builtin", 255 | "dependencies": { 256 | "com.unity.modules.unitywebrequest": "1.0.0", 257 | "com.unity.modules.audio": "1.0.0" 258 | } 259 | }, 260 | "com.unity.modules.unitywebrequesttexture": { 261 | "version": "1.0.0", 262 | "depth": 0, 263 | "source": "builtin", 264 | "dependencies": { 265 | "com.unity.modules.unitywebrequest": "1.0.0", 266 | "com.unity.modules.imageconversion": "1.0.0" 267 | } 268 | }, 269 | "com.unity.modules.unitywebrequestwww": { 270 | "version": "1.0.0", 271 | "depth": 0, 272 | "source": "builtin", 273 | "dependencies": { 274 | "com.unity.modules.unitywebrequest": "1.0.0", 275 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 276 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 277 | "com.unity.modules.audio": "1.0.0", 278 | "com.unity.modules.assetbundle": "1.0.0", 279 | "com.unity.modules.imageconversion": "1.0.0" 280 | } 281 | }, 282 | "com.unity.modules.vehicles": { 283 | "version": "1.0.0", 284 | "depth": 0, 285 | "source": "builtin", 286 | "dependencies": { 287 | "com.unity.modules.physics": "1.0.0" 288 | } 289 | }, 290 | "com.unity.modules.video": { 291 | "version": "1.0.0", 292 | "depth": 0, 293 | "source": "builtin", 294 | "dependencies": { 295 | "com.unity.modules.audio": "1.0.0", 296 | "com.unity.modules.ui": "1.0.0", 297 | "com.unity.modules.unitywebrequest": "1.0.0" 298 | } 299 | }, 300 | "com.unity.modules.vr": { 301 | "version": "1.0.0", 302 | "depth": 0, 303 | "source": "builtin", 304 | "dependencies": { 305 | "com.unity.modules.jsonserialize": "1.0.0", 306 | "com.unity.modules.physics": "1.0.0", 307 | "com.unity.modules.xr": "1.0.0" 308 | } 309 | }, 310 | "com.unity.modules.wind": { 311 | "version": "1.0.0", 312 | "depth": 0, 313 | "source": "builtin", 314 | "dependencies": {} 315 | }, 316 | "com.unity.modules.xr": { 317 | "version": "1.0.0", 318 | "depth": 0, 319 | "source": "builtin", 320 | "dependencies": { 321 | "com.unity.modules.physics": "1.0.0", 322 | "com.unity.modules.jsonserialize": "1.0.0", 323 | "com.unity.modules.subsystems": "1.0.0" 324 | } 325 | } 326 | } 327 | } 328 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Samples/Test.playable: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &-3802363643312003199 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 1 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: 69fd8133db33f2546993a421d269f5f6, type: 3} 13 | m_Name: Midi Animation Track 14 | m_EditorClassIdentifier: 15 | m_Version: 3 16 | m_AnimClip: {fileID: 0} 17 | m_Locked: 0 18 | m_Muted: 0 19 | m_CustomPlayableFullTypename: 20 | m_Curves: {fileID: 0} 21 | m_Parent: {fileID: 11400000} 22 | m_Children: [] 23 | m_Clips: 24 | - m_Version: 1 25 | m_Start: 0.8666666666666667 26 | m_ClipIn: 0 27 | m_Asset: {fileID: 7083267606593336682} 28 | m_Duration: 12 29 | m_TimeScale: 1 30 | m_ParentTrack: {fileID: -3802363643312003199} 31 | m_EaseInDuration: 0 32 | m_EaseOutDuration: 0 33 | m_BlendInDuration: -1 34 | m_BlendOutDuration: -1 35 | m_MixInCurve: 36 | serializedVersion: 2 37 | m_Curve: 38 | - serializedVersion: 3 39 | time: 0 40 | value: 0 41 | inSlope: 0 42 | outSlope: 0 43 | tangentMode: 0 44 | weightedMode: 0 45 | inWeight: 0 46 | outWeight: 0 47 | - serializedVersion: 3 48 | time: 1 49 | value: 1 50 | inSlope: 0 51 | outSlope: 0 52 | tangentMode: 0 53 | weightedMode: 0 54 | inWeight: 0 55 | outWeight: 0 56 | m_PreInfinity: 2 57 | m_PostInfinity: 2 58 | m_RotationOrder: 4 59 | m_MixOutCurve: 60 | serializedVersion: 2 61 | m_Curve: 62 | - serializedVersion: 3 63 | time: 0 64 | value: 1 65 | inSlope: 0 66 | outSlope: 0 67 | tangentMode: 0 68 | weightedMode: 0 69 | inWeight: 0 70 | outWeight: 0 71 | - serializedVersion: 3 72 | time: 1 73 | value: 0 74 | inSlope: 0 75 | outSlope: 0 76 | tangentMode: 0 77 | weightedMode: 0 78 | inWeight: 0 79 | outWeight: 0 80 | m_PreInfinity: 2 81 | m_PostInfinity: 2 82 | m_RotationOrder: 4 83 | m_BlendInCurveMode: 0 84 | m_BlendOutCurveMode: 0 85 | m_ExposedParameterNames: [] 86 | m_AnimationCurves: {fileID: 0} 87 | m_Recordable: 0 88 | m_PostExtrapolationMode: 0 89 | m_PreExtrapolationMode: 0 90 | m_PostExtrapolationTime: Infinity 91 | m_PreExtrapolationTime: 0.8666666666666667 92 | m_DisplayName: '0:' 93 | m_Markers: 94 | m_Objects: [] 95 | template: 96 | controls: 97 | - enabled: 1 98 | mode: 0 99 | noteFilter: 100 | noteNameFilter: 0 101 | octaveFilter: 0 102 | envelope: 103 | attack: 0 104 | decay: 1 105 | sustain: 0.5 106 | release: 1 107 | curve: 108 | serializedVersion: 2 109 | m_Curve: 110 | - serializedVersion: 3 111 | time: 0 112 | value: 0 113 | inSlope: 90 114 | outSlope: 90 115 | tangentMode: 0 116 | weightedMode: 0 117 | inWeight: 0 118 | outWeight: 0 119 | - serializedVersion: 3 120 | time: 0.02 121 | value: 1 122 | inSlope: 0 123 | outSlope: 0 124 | tangentMode: 0 125 | weightedMode: 0 126 | inWeight: 0 127 | outWeight: 0 128 | - serializedVersion: 3 129 | time: 0.5 130 | value: 0 131 | inSlope: 0 132 | outSlope: 0 133 | tangentMode: 0 134 | weightedMode: 0 135 | inWeight: 0 136 | outWeight: 0 137 | m_PreInfinity: 2 138 | m_PostInfinity: 2 139 | m_RotationOrder: 4 140 | ccController: 1 141 | targetComponent: 142 | exposedName: 9d0bda884b5b2ea428b1e552612a43dd 143 | defaultValue: {fileID: 0} 144 | propertyName: localScale 145 | fieldName: m_LocalScale 146 | vector0: {x: 0.5, y: 0.5, z: 0.5, w: 0} 147 | vector1: {x: 1.5, y: 1.5, z: 1.5, w: 0} 148 | --- !u!114 &-3040198309612938654 149 | MonoBehaviour: 150 | m_ObjectHideFlags: 1 151 | m_CorrespondingSourceObject: {fileID: 0} 152 | m_PrefabInstance: {fileID: 0} 153 | m_PrefabAsset: {fileID: 0} 154 | m_GameObject: {fileID: 0} 155 | m_Enabled: 1 156 | m_EditorHideFlags: 0 157 | m_Script: {fileID: 11500000, guid: 8b22792c3b570444eb18cb78c2af3a74, type: 3} 158 | m_Name: Audio Track 159 | m_EditorClassIdentifier: 160 | m_Version: 3 161 | m_AnimClip: {fileID: 0} 162 | m_Locked: 0 163 | m_Muted: 0 164 | m_CustomPlayableFullTypename: 165 | m_Curves: {fileID: 0} 166 | m_Parent: {fileID: 11400000} 167 | m_Children: [] 168 | m_Clips: 169 | - m_Version: 1 170 | m_Start: 0.8666666666666667 171 | m_ClipIn: 0 172 | m_Asset: {fileID: 8661159408310029804} 173 | m_Duration: 12 174 | m_TimeScale: 1 175 | m_ParentTrack: {fileID: -3040198309612938654} 176 | m_EaseInDuration: 0 177 | m_EaseOutDuration: 0 178 | m_BlendInDuration: -1 179 | m_BlendOutDuration: -1 180 | m_MixInCurve: 181 | serializedVersion: 2 182 | m_Curve: 183 | - serializedVersion: 3 184 | time: 0 185 | value: 0 186 | inSlope: 0 187 | outSlope: 0 188 | tangentMode: 0 189 | weightedMode: 0 190 | inWeight: 0 191 | outWeight: 0 192 | - serializedVersion: 3 193 | time: 1 194 | value: 1 195 | inSlope: 0 196 | outSlope: 0 197 | tangentMode: 0 198 | weightedMode: 0 199 | inWeight: 0 200 | outWeight: 0 201 | m_PreInfinity: 2 202 | m_PostInfinity: 2 203 | m_RotationOrder: 4 204 | m_MixOutCurve: 205 | serializedVersion: 2 206 | m_Curve: 207 | - serializedVersion: 3 208 | time: 0 209 | value: 1 210 | inSlope: 0 211 | outSlope: 0 212 | tangentMode: 0 213 | weightedMode: 0 214 | inWeight: 0 215 | outWeight: 0 216 | - serializedVersion: 3 217 | time: 1 218 | value: 0 219 | inSlope: 0 220 | outSlope: 0 221 | tangentMode: 0 222 | weightedMode: 0 223 | inWeight: 0 224 | outWeight: 0 225 | m_PreInfinity: 2 226 | m_PostInfinity: 2 227 | m_RotationOrder: 4 228 | m_BlendInCurveMode: 0 229 | m_BlendOutCurveMode: 0 230 | m_ExposedParameterNames: [] 231 | m_AnimationCurves: {fileID: 0} 232 | m_Recordable: 0 233 | m_PostExtrapolationMode: 0 234 | m_PreExtrapolationMode: 0 235 | m_PostExtrapolationTime: 0 236 | m_PreExtrapolationTime: 0 237 | m_DisplayName: Loop1 238 | m_Markers: 239 | m_Objects: [] 240 | m_TrackProperties: 241 | volume: 1 242 | stereoPan: 0 243 | spatialBlend: 0 244 | --- !u!114 &11400000 245 | MonoBehaviour: 246 | m_ObjectHideFlags: 0 247 | m_CorrespondingSourceObject: {fileID: 0} 248 | m_PrefabInstance: {fileID: 0} 249 | m_PrefabAsset: {fileID: 0} 250 | m_GameObject: {fileID: 0} 251 | m_Enabled: 1 252 | m_EditorHideFlags: 0 253 | m_Script: {fileID: 11500000, guid: bfda56da833e2384a9677cd3c976a436, type: 3} 254 | m_Name: Test 255 | m_EditorClassIdentifier: 256 | m_Version: 0 257 | m_Tracks: 258 | - {fileID: -3040198309612938654} 259 | - {fileID: -3802363643312003199} 260 | m_FixedDuration: 0 261 | m_EditorSettings: 262 | m_Framerate: 60 263 | m_DurationMode: 0 264 | m_MarkerTrack: {fileID: 6351916862804497071} 265 | --- !u!114 &2808447880415715199 266 | MonoBehaviour: 267 | m_ObjectHideFlags: 1 268 | m_CorrespondingSourceObject: {fileID: 0} 269 | m_PrefabInstance: {fileID: 0} 270 | m_PrefabAsset: {fileID: 0} 271 | m_GameObject: {fileID: 0} 272 | m_Enabled: 1 273 | m_EditorHideFlags: 0 274 | m_Script: {fileID: 11500000, guid: 69fd8133db33f2546993a421d269f5f6, type: 3} 275 | m_Name: Midi Animation Track (1) 276 | m_EditorClassIdentifier: 277 | m_Version: 3 278 | m_AnimClip: {fileID: 0} 279 | m_Locked: 0 280 | m_Muted: 0 281 | m_CustomPlayableFullTypename: 282 | m_Curves: {fileID: 0} 283 | m_Parent: {fileID: 11400000} 284 | m_Children: [] 285 | m_Clips: [] 286 | m_Markers: 287 | m_Objects: [] 288 | template: 289 | controls: [] 290 | --- !u!114 &6351916862804497071 291 | MonoBehaviour: 292 | m_ObjectHideFlags: 1 293 | m_CorrespondingSourceObject: {fileID: 0} 294 | m_PrefabInstance: {fileID: 0} 295 | m_PrefabAsset: {fileID: 0} 296 | m_GameObject: {fileID: 0} 297 | m_Enabled: 1 298 | m_EditorHideFlags: 0 299 | m_Script: {fileID: 11500000, guid: 2a16748d9461eae46a725db9776d5390, type: 3} 300 | m_Name: Markers 301 | m_EditorClassIdentifier: 302 | m_Version: 3 303 | m_AnimClip: {fileID: 0} 304 | m_Locked: 0 305 | m_Muted: 0 306 | m_CustomPlayableFullTypename: 307 | m_Curves: {fileID: 0} 308 | m_Parent: {fileID: 11400000} 309 | m_Children: [] 310 | m_Clips: [] 311 | m_Markers: 312 | m_Objects: [] 313 | --- !u!114 &7083267606593336682 314 | MonoBehaviour: 315 | m_ObjectHideFlags: 1 316 | m_CorrespondingSourceObject: {fileID: 0} 317 | m_PrefabInstance: {fileID: 0} 318 | m_PrefabAsset: {fileID: 0} 319 | m_GameObject: {fileID: 0} 320 | m_Enabled: 1 321 | m_EditorHideFlags: 0 322 | m_Script: {fileID: 11500000, guid: 5d6c12d8ad7901a4e8468f23ed0a2dc2, type: 3} 323 | m_Name: MidiAnimationAsset 324 | m_EditorClassIdentifier: 325 | midiTrackAsset: {fileID: 5071388398726816915, guid: 3cc0a4a04746ea74286e69f866b42930, type: 3} 326 | --- !u!114 &8661159408310029804 327 | MonoBehaviour: 328 | m_ObjectHideFlags: 1 329 | m_CorrespondingSourceObject: {fileID: 0} 330 | m_PrefabInstance: {fileID: 0} 331 | m_PrefabAsset: {fileID: 0} 332 | m_GameObject: {fileID: 0} 333 | m_Enabled: 1 334 | m_EditorHideFlags: 0 335 | m_Script: {fileID: 11500000, guid: 4f10dd60657c6004587f237a7e90f8e4, type: 3} 336 | m_Name: AudioPlayableAsset 337 | m_EditorClassIdentifier: 338 | m_Clip: {fileID: 8300000, guid: 9f2488d52fd30d3418f5ebf1c3d69e62, type: 3} 339 | m_Loop: 1 340 | m_bufferingTime: 0.1 341 | m_ClipProperties: 342 | volume: 1 343 | -------------------------------------------------------------------------------- /Assets/Plugins/jp.goma_recorder.midity.playable/Editor/MidiControlDrawer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using UnityEditor; 5 | using UnityEngine; 6 | 7 | namespace Midity.Playable.Editor 8 | { 9 | // Property drawer implementation for MidiControl 10 | internal sealed class MidiControlInternalDrawer 11 | { 12 | #region Simple UI methods for offline editing 13 | 14 | public void DrawCommonSettings() 15 | { 16 | EditorGUI.PropertyField(_rect, _mode, _labelControlMode); 17 | MoveRectToNextLine(); 18 | 19 | if (_mode.enumValueIndex == (int) MidiControl.Mode.NoteEnvelope) 20 | { 21 | EditorGUI.PropertyField(_rect, _noteFilter, _labelNoteOctave); 22 | MoveRectToNextLine(); 23 | 24 | var r = _rect; 25 | r.height = MidiEnvelopeDrawer.GetHeight(); 26 | EditorGUI.PropertyField(r, _envelope); 27 | _rect.y += r.height; 28 | } 29 | else if (_mode.enumValueIndex == (int) MidiControl.Mode.NoteCurve) 30 | { 31 | EditorGUI.PropertyField(_rect, _noteFilter, _labelNoteOctave); 32 | MoveRectToNextLine(); 33 | 34 | EditorGUI.PropertyField(_rect, _curve); 35 | MoveRectToNextLine(); 36 | } 37 | else // CC 38 | { 39 | EditorGUI.PropertyField(_rect, _ccNumber, _labelCCNumber); 40 | MoveRectToNextLine(); 41 | } 42 | 43 | EditorGUI.PropertyField(_rect, _targetComponent, _labelTarget); 44 | MoveRectToNextLine(); 45 | } 46 | 47 | #endregion 48 | 49 | #region Property option drawer 50 | 51 | public void DrawPropertyOptions() 52 | { 53 | var pidx = Array.IndexOf(_propertyNames, _propertyName.stringValue); 54 | var type = pidx < 0 ? null : (SerializedPropertyType?) _propertyTypes[pidx]; 55 | 56 | var v0 = _vector0.vector4Value; 57 | var v1 = _vector1.vector4Value; 58 | 59 | if (type == SerializedPropertyType.Float) 60 | { 61 | EditorGUI.BeginChangeCheck(); 62 | v0.x = EditorGUI.FloatField(_rect, "Value at 0", v0.x); 63 | if (EditorGUI.EndChangeCheck()) _vector0.vector4Value = v0; 64 | 65 | MoveRectToNextLine(); 66 | 67 | EditorGUI.BeginChangeCheck(); 68 | v1.x = EditorGUI.FloatField(_rect, "Value at 1", v1.x); 69 | if (EditorGUI.EndChangeCheck()) _vector1.vector4Value = v1; 70 | 71 | MoveRectToNextLine(); 72 | } 73 | else if (type == SerializedPropertyType.Vector3) 74 | { 75 | EditorGUI.BeginChangeCheck(); 76 | v0 = EditorGUI.Vector3Field(_rect, "Vector at 0", v0); 77 | if (EditorGUI.EndChangeCheck()) _vector0.vector4Value = v0; 78 | 79 | MoveRectToNextLine(); 80 | MoveRectToNextLineInNarrowMode(); 81 | 82 | EditorGUI.BeginChangeCheck(); 83 | v1 = EditorGUI.Vector3Field(_rect, "Vector at 1", v1); 84 | if (EditorGUI.EndChangeCheck()) _vector1.vector4Value = v1; 85 | 86 | MoveRectToNextLine(); 87 | MoveRectToNextLineInNarrowMode(); 88 | } 89 | else if (type == SerializedPropertyType.Quaternion) 90 | { 91 | EditorGUI.BeginChangeCheck(); 92 | v0 = EditorGUI.Vector3Field(_rect, "Rotation at 0", v0); 93 | if (EditorGUI.EndChangeCheck()) _vector0.vector4Value = v0; 94 | 95 | MoveRectToNextLine(); 96 | MoveRectToNextLineInNarrowMode(); 97 | 98 | EditorGUI.BeginChangeCheck(); 99 | v1 = EditorGUI.Vector3Field(_rect, "Rotation at 1", v1); 100 | if (EditorGUI.EndChangeCheck()) _vector1.vector4Value = v1; 101 | 102 | MoveRectToNextLine(); 103 | MoveRectToNextLineInNarrowMode(); 104 | } 105 | else if (type == SerializedPropertyType.Color) 106 | { 107 | EditorGUI.BeginChangeCheck(); 108 | v0 = EditorGUI.ColorField(_rect, "Color at 0", v0); 109 | if (EditorGUI.EndChangeCheck()) _vector0.vector4Value = v0; 110 | 111 | MoveRectToNextLine(); 112 | 113 | EditorGUI.BeginChangeCheck(); 114 | v1 = EditorGUI.ColorField(_rect, "Color at 1", v1); 115 | if (EditorGUI.EndChangeCheck()) _vector1.vector4Value = v1; 116 | 117 | MoveRectToNextLine(); 118 | } 119 | } 120 | 121 | #endregion 122 | 123 | #region Public properties and methods 124 | 125 | public MidiControlInternalDrawer(SerializedProperty property) 126 | { 127 | _mode = property.FindPropertyRelative("mode"); 128 | _noteFilter = property.FindPropertyRelative("noteFilter"); 129 | _envelope = property.FindPropertyRelative("envelope"); 130 | _curve = property.FindPropertyRelative("curve"); 131 | _ccNumber = property.FindPropertyRelative("ccNumber"); 132 | 133 | _targetComponent = property.FindPropertyRelative("targetComponent"); 134 | _propertyName = property.FindPropertyRelative("propertyName"); 135 | _fieldName = property.FindPropertyRelative("fieldName"); 136 | 137 | _vector0 = property.FindPropertyRelative("vector0"); 138 | _vector1 = property.FindPropertyRelative("vector1"); 139 | } 140 | 141 | public Component TargetComponent => (Component) _targetComponent.exposedReferenceValue; 142 | 143 | public void SetRect(Rect rect) 144 | { 145 | _baseRect = _rect = rect; 146 | 147 | // We only use single-line height controls. 148 | _rect.height = EditorGUIUtility.singleLineHeight; 149 | } 150 | 151 | public float GetTotalHeight() 152 | { 153 | return _rect.y - _baseRect.y; 154 | } 155 | 156 | #endregion 157 | 158 | #region Detailed UI methods for online editing 159 | 160 | public void DrawComponentSelector() 161 | { 162 | CacheSiblingComponents(); 163 | 164 | EditorGUI.indentLevel++; 165 | 166 | // Component selection drop-down 167 | EditorGUI.BeginChangeCheck(); 168 | 169 | var index = Array.IndexOf(_componentNames, TargetComponent.GetType().Name); 170 | index = EditorGUI.Popup(_rect, "Component", index, _componentNames); 171 | 172 | if (EditorGUI.EndChangeCheck()) 173 | _targetComponent.exposedReferenceValue = 174 | TargetComponent.gameObject.GetComponent(_componentNames[index]); 175 | 176 | MoveRectToNextLine(); 177 | EditorGUI.indentLevel--; 178 | } 179 | 180 | public void DrawPropertySelector() 181 | { 182 | CachePropertiesInTargetComponent(); 183 | 184 | if (_propertyNames.Length == 0) 185 | { 186 | // There is no supported property in the component. 187 | // Clear the property selection. 188 | _propertyName.stringValue = ""; 189 | _fieldName.stringValue = ""; 190 | } 191 | else 192 | { 193 | // Property selection drop-down 194 | EditorGUI.BeginChangeCheck(); 195 | 196 | var index = Array.IndexOf(_propertyNames, _propertyName.stringValue); 197 | index = EditorGUI.Popup(_rect, "Property", index, _propertyLabels); 198 | 199 | if (index < 0) 200 | { 201 | _propertyName.stringValue = ""; 202 | _fieldName.stringValue = ""; 203 | } 204 | else if (EditorGUI.EndChangeCheck()) 205 | { 206 | _propertyName.stringValue = _propertyNames[index]; 207 | _fieldName.stringValue = _fieldNames[index]; 208 | } 209 | 210 | MoveRectToNextLine(); 211 | } 212 | } 213 | 214 | #endregion 215 | 216 | #region UI resources 217 | 218 | private static readonly GUIContent _labelControlMode = new GUIContent("Control Mode"); 219 | private static readonly GUIContent _labelCCNumber = new GUIContent("CC Number"); 220 | private static readonly GUIContent _labelTarget = new GUIContent("Target"); 221 | private static readonly GUIContent _labelNoteOctave = new GUIContent("Note/Octave"); 222 | 223 | #endregion 224 | 225 | #region Private members 226 | 227 | private readonly SerializedProperty _mode; 228 | private readonly SerializedProperty _noteFilter; 229 | private readonly SerializedProperty _envelope; 230 | private readonly SerializedProperty _curve; 231 | private readonly SerializedProperty _ccNumber; 232 | 233 | private readonly SerializedProperty _targetComponent; 234 | private readonly SerializedProperty _propertyName; 235 | private readonly SerializedProperty _fieldName; 236 | 237 | private readonly SerializedProperty _vector0; 238 | private readonly SerializedProperty _vector1; 239 | 240 | // Used in component selection drop-down 241 | private string[] _componentNames; 242 | private GameObject _cachedGameObject; 243 | 244 | // Used in property selection drop-down 245 | private string[] _propertyNames = new string [0]; 246 | private string[] _propertyLabels; 247 | private string[] _fieldNames; 248 | private SerializedPropertyType[] _propertyTypes; 249 | private Type _cachedComponentType; 250 | 251 | private Rect _baseRect; 252 | private Rect _rect; 253 | 254 | private void MoveRectToNextLine() 255 | { 256 | _rect.y += EditorGUIUtility.singleLineHeight + 2; 257 | } 258 | 259 | private void MoveRectToNextLineInNarrowMode() 260 | { 261 | if (!EditorGUIUtility.wideMode) 262 | _rect.y += EditorGUIUtility.singleLineHeight; 263 | } 264 | 265 | // Enumerate components in the same game object that the target 266 | // component is attached to. 267 | private void CacheSiblingComponents() 268 | { 269 | var go = TargetComponent.gameObject; 270 | if (_cachedGameObject == go) return; 271 | 272 | _componentNames = go.GetComponents().Select(x => x.GetType().Name).ToArray(); 273 | 274 | _cachedGameObject = go; 275 | } 276 | 277 | // Enumerate properties in the target component. 278 | private void CachePropertiesInTargetComponent() 279 | { 280 | var componentType = TargetComponent.GetType(); 281 | if (_cachedComponentType == componentType) return; 282 | 283 | var itr = new SerializedObject(TargetComponent).GetIterator(); 284 | 285 | var pnames = new List(); 286 | var labels = new List(); 287 | var fnames = new List(); 288 | var types = new List(); 289 | 290 | if (itr.NextVisible(true)) 291 | { 292 | while (true) 293 | { 294 | var type = itr.propertyType; 295 | if (MidiEditorUtility.IsPropertyTypeSupported(type)) 296 | { 297 | // Check if the field has a corresponding property. 298 | var pname = MidiEditorUtility.GuessPropertyNameFromFieldName(itr.name); 299 | if (componentType.GetProperty(pname) != null) 300 | { 301 | // Append this field. 302 | pnames.Add(pname); 303 | labels.Add(ObjectNames.NicifyVariableName(pname)); 304 | fnames.Add(itr.name); 305 | types.Add(type); 306 | } 307 | } 308 | 309 | if (!itr.NextVisible(false)) break; 310 | } 311 | 312 | _propertyNames = pnames.ToArray(); 313 | _propertyLabels = labels.ToArray(); 314 | _fieldNames = fnames.ToArray(); 315 | _propertyTypes = types.ToArray(); 316 | } 317 | else 318 | { 319 | // Failed to retrieve properties. 320 | _propertyNames = _fieldNames = _propertyLabels = new string [0]; 321 | _propertyTypes = new SerializedPropertyType [0]; 322 | } 323 | 324 | _cachedComponentType = componentType; 325 | } 326 | 327 | #endregion 328 | } 329 | 330 | // Custom property drawer for MidiControl 331 | // Provides a cache for instances of the drawer implementation. 332 | [CustomPropertyDrawer(typeof(MidiControl), true)] 333 | internal sealed class MidiControlDrawer : PropertyDrawer 334 | { 335 | private readonly Dictionary 336 | _drawers = new Dictionary(); 337 | 338 | private MidiControlInternalDrawer GetCachedDrawer(SerializedProperty property) 339 | { 340 | MidiControlInternalDrawer drawer; 341 | 342 | var path = property.propertyPath; 343 | _drawers.TryGetValue(path, out drawer); 344 | 345 | if (drawer == null) 346 | { 347 | // No instance was found witht the given path, 348 | // so create a new instance for it. 349 | drawer = new MidiControlInternalDrawer(property); 350 | _drawers[path] = drawer; 351 | } 352 | 353 | return drawer; 354 | } 355 | 356 | public override void OnGUI(Rect rect, SerializedProperty property, GUIContent label) 357 | { 358 | var drawer = GetCachedDrawer(property); 359 | 360 | drawer.SetRect(rect); 361 | drawer.DrawCommonSettings(); 362 | 363 | if (drawer.TargetComponent != null) 364 | { 365 | drawer.DrawComponentSelector(); 366 | drawer.DrawPropertySelector(); 367 | drawer.DrawPropertyOptions(); 368 | } 369 | } 370 | 371 | public override float GetPropertyHeight(SerializedProperty property, GUIContent label) 372 | { 373 | return GetCachedDrawer(property).GetTotalHeight(); 374 | } 375 | } 376 | } -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!129 &1 4 | PlayerSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 20 7 | productGUID: 66173f2b1e702854fbf62b11a8506e44 8 | AndroidProfiler: 0 9 | AndroidFilterTouchesWhenObscured: 0 10 | AndroidEnableSustainedPerformanceMode: 0 11 | defaultScreenOrientation: 4 12 | targetDevice: 2 13 | useOnDemandResources: 0 14 | accelerometerFrequency: 60 15 | companyName: DefaultCompany 16 | productName: PlayableMidi 17 | defaultCursor: {fileID: 0} 18 | cursorHotspot: {x: 0, y: 0} 19 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} 20 | m_ShowUnitySplashScreen: 1 21 | m_ShowUnitySplashLogo: 1 22 | m_SplashScreenOverlayOpacity: 1 23 | m_SplashScreenAnimation: 1 24 | m_SplashScreenLogoStyle: 1 25 | m_SplashScreenDrawMode: 0 26 | m_SplashScreenBackgroundAnimationZoom: 1 27 | m_SplashScreenLogoAnimationZoom: 1 28 | m_SplashScreenBackgroundLandscapeAspect: 1 29 | m_SplashScreenBackgroundPortraitAspect: 1 30 | m_SplashScreenBackgroundLandscapeUvs: 31 | serializedVersion: 2 32 | x: 0 33 | y: 0 34 | width: 1 35 | height: 1 36 | m_SplashScreenBackgroundPortraitUvs: 37 | serializedVersion: 2 38 | x: 0 39 | y: 0 40 | width: 1 41 | height: 1 42 | m_SplashScreenLogos: [] 43 | m_VirtualRealitySplashScreen: {fileID: 0} 44 | m_HolographicTrackingLossScreen: {fileID: 0} 45 | defaultScreenWidth: 1024 46 | defaultScreenHeight: 768 47 | defaultScreenWidthWeb: 960 48 | defaultScreenHeightWeb: 600 49 | m_StereoRenderingPath: 0 50 | m_ActiveColorSpace: 0 51 | m_MTRendering: 1 52 | mipStripping: 0 53 | numberOfMipsStripped: 0 54 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 55 | iosShowActivityIndicatorOnLoading: -1 56 | androidShowActivityIndicatorOnLoading: -1 57 | iosUseCustomAppBackgroundBehavior: 0 58 | iosAllowHTTPDownload: 1 59 | allowedAutorotateToPortrait: 1 60 | allowedAutorotateToPortraitUpsideDown: 1 61 | allowedAutorotateToLandscapeRight: 1 62 | allowedAutorotateToLandscapeLeft: 1 63 | useOSAutorotation: 1 64 | use32BitDisplayBuffer: 1 65 | preserveFramebufferAlpha: 0 66 | disableDepthAndStencilBuffers: 0 67 | androidStartInFullscreen: 1 68 | androidRenderOutsideSafeArea: 1 69 | androidUseSwappy: 1 70 | androidBlitType: 0 71 | defaultIsNativeResolution: 1 72 | macRetinaSupport: 1 73 | runInBackground: 1 74 | captureSingleScreen: 0 75 | muteOtherAudioSources: 0 76 | Prepare IOS For Recording: 0 77 | Force IOS Speakers When Recording: 0 78 | deferSystemGesturesMode: 0 79 | hideHomeButton: 0 80 | submitAnalytics: 1 81 | usePlayerLog: 1 82 | bakeCollisionMeshes: 0 83 | forceSingleInstance: 0 84 | useFlipModelSwapchain: 1 85 | resizableWindow: 0 86 | useMacAppStoreValidation: 0 87 | macAppStoreCategory: public.app-category.games 88 | gpuSkinning: 1 89 | xboxPIXTextureCapture: 0 90 | xboxEnableAvatar: 0 91 | xboxEnableKinect: 0 92 | xboxEnableKinectAutoTracking: 0 93 | xboxEnableFitness: 0 94 | visibleInBackground: 1 95 | allowFullscreenSwitch: 1 96 | fullscreenMode: 1 97 | xboxSpeechDB: 0 98 | xboxEnableHeadOrientation: 0 99 | xboxEnableGuest: 0 100 | xboxEnablePIXSampling: 0 101 | metalFramebufferOnly: 0 102 | xboxOneResolution: 0 103 | xboxOneSResolution: 0 104 | xboxOneXResolution: 3 105 | xboxOneMonoLoggingLevel: 0 106 | xboxOneLoggingLevel: 1 107 | xboxOneDisableEsram: 0 108 | xboxOneEnableTypeOptimization: 0 109 | xboxOnePresentImmediateThreshold: 0 110 | switchQueueCommandMemory: 0 111 | switchQueueControlMemory: 16384 112 | switchQueueComputeMemory: 262144 113 | switchNVNShaderPoolsGranularity: 33554432 114 | switchNVNDefaultPoolsGranularity: 16777216 115 | switchNVNOtherPoolsGranularity: 16777216 116 | switchNVNMaxPublicTextureIDCount: 0 117 | switchNVNMaxPublicSamplerIDCount: 0 118 | stadiaPresentMode: 0 119 | stadiaTargetFramerate: 0 120 | vulkanNumSwapchainBuffers: 3 121 | vulkanEnableSetSRGBWrite: 0 122 | vulkanEnableLateAcquireNextImage: 0 123 | m_SupportedAspectRatios: 124 | 4:3: 1 125 | 5:4: 1 126 | 16:10: 1 127 | 16:9: 1 128 | Others: 1 129 | bundleVersion: 0.1 130 | preloadedAssets: [] 131 | metroInputSource: 0 132 | wsaTransparentSwapchain: 0 133 | m_HolographicPauseOnTrackingLoss: 1 134 | xboxOneDisableKinectGpuReservation: 1 135 | xboxOneEnable7thCore: 1 136 | vrSettings: 137 | cardboard: 138 | depthFormat: 0 139 | enableTransitionView: 0 140 | daydream: 141 | depthFormat: 0 142 | useSustainedPerformanceMode: 0 143 | enableVideoLayer: 0 144 | useProtectedVideoMemory: 0 145 | minimumSupportedHeadTracking: 0 146 | maximumSupportedHeadTracking: 1 147 | hololens: 148 | depthFormat: 1 149 | depthBufferSharingEnabled: 1 150 | lumin: 151 | depthFormat: 0 152 | frameTiming: 2 153 | enableGLCache: 0 154 | glCacheMaxBlobSize: 524288 155 | glCacheMaxFileSize: 8388608 156 | oculus: 157 | sharedDepthBuffer: 1 158 | dashSupport: 1 159 | lowOverheadMode: 0 160 | protectedContext: 0 161 | v2Signing: 1 162 | enable360StereoCapture: 0 163 | isWsaHolographicRemotingEnabled: 0 164 | enableFrameTimingStats: 0 165 | useHDRDisplay: 0 166 | D3DHDRBitDepth: 0 167 | m_ColorGamuts: 00000000 168 | targetPixelDensity: 30 169 | resolutionScalingMode: 0 170 | androidSupportedAspectRatio: 1 171 | androidMaxAspectRatio: 2.1 172 | applicationIdentifier: {} 173 | buildNumber: {} 174 | AndroidBundleVersionCode: 1 175 | AndroidMinSdkVersion: 19 176 | AndroidTargetSdkVersion: 0 177 | AndroidPreferredInstallLocation: 1 178 | aotOptions: 179 | stripEngineCode: 1 180 | iPhoneStrippingLevel: 0 181 | iPhoneScriptCallOptimization: 0 182 | ForceInternetPermission: 0 183 | ForceSDCardPermission: 0 184 | CreateWallpaper: 0 185 | APKExpansionFiles: 0 186 | keepLoadedShadersAlive: 0 187 | StripUnusedMeshComponents: 1 188 | VertexChannelCompressionMask: 4054 189 | iPhoneSdkVersion: 988 190 | iOSTargetOSVersionString: 11.0 191 | tvOSSdkVersion: 0 192 | tvOSRequireExtendedGameController: 0 193 | tvOSTargetOSVersionString: 11.0 194 | uIPrerenderedIcon: 0 195 | uIRequiresPersistentWiFi: 0 196 | uIRequiresFullScreen: 1 197 | uIStatusBarHidden: 1 198 | uIExitOnSuspend: 0 199 | uIStatusBarStyle: 0 200 | appleTVSplashScreen: {fileID: 0} 201 | appleTVSplashScreen2x: {fileID: 0} 202 | tvOSSmallIconLayers: [] 203 | tvOSSmallIconLayers2x: [] 204 | tvOSLargeIconLayers: [] 205 | tvOSLargeIconLayers2x: [] 206 | tvOSTopShelfImageLayers: [] 207 | tvOSTopShelfImageLayers2x: [] 208 | tvOSTopShelfImageWideLayers: [] 209 | tvOSTopShelfImageWideLayers2x: [] 210 | iOSLaunchScreenType: 0 211 | iOSLaunchScreenPortrait: {fileID: 0} 212 | iOSLaunchScreenLandscape: {fileID: 0} 213 | iOSLaunchScreenBackgroundColor: 214 | serializedVersion: 2 215 | rgba: 0 216 | iOSLaunchScreenFillPct: 100 217 | iOSLaunchScreenSize: 100 218 | iOSLaunchScreenCustomXibPath: 219 | iOSLaunchScreeniPadType: 0 220 | iOSLaunchScreeniPadImage: {fileID: 0} 221 | iOSLaunchScreeniPadBackgroundColor: 222 | serializedVersion: 2 223 | rgba: 0 224 | iOSLaunchScreeniPadFillPct: 100 225 | iOSLaunchScreeniPadSize: 100 226 | iOSLaunchScreeniPadCustomXibPath: 227 | iOSUseLaunchScreenStoryboard: 0 228 | iOSLaunchScreenCustomStoryboardPath: 229 | iOSDeviceRequirements: [] 230 | iOSURLSchemes: [] 231 | iOSBackgroundModes: 0 232 | iOSMetalForceHardShadows: 0 233 | metalEditorSupport: 1 234 | metalAPIValidation: 1 235 | iOSRenderExtraFrameOnPause: 0 236 | iosCopyPluginsCodeInsteadOfSymlink: 0 237 | appleDeveloperTeamID: 238 | iOSManualSigningProvisioningProfileID: 239 | tvOSManualSigningProvisioningProfileID: 240 | iOSManualSigningProvisioningProfileType: 0 241 | tvOSManualSigningProvisioningProfileType: 0 242 | appleEnableAutomaticSigning: 0 243 | iOSRequireARKit: 0 244 | iOSAutomaticallyDetectAndAddCapabilities: 1 245 | appleEnableProMotion: 0 246 | clonedFromGUID: c0afd0d1d80e3634a9dac47e8a0426ea 247 | templatePackageId: com.unity.template.3d@5.0.3 248 | templateDefaultScene: Assets/Scenes/SampleScene.unity 249 | AndroidTargetArchitectures: 1 250 | AndroidSplashScreenScale: 0 251 | androidSplashScreen: {fileID: 0} 252 | AndroidKeystoreName: 253 | AndroidKeyaliasName: 254 | AndroidBuildApkPerCpuArchitecture: 0 255 | AndroidTVCompatibility: 0 256 | AndroidIsGame: 1 257 | AndroidEnableTango: 0 258 | androidEnableBanner: 1 259 | androidUseLowAccuracyLocation: 0 260 | androidUseCustomKeystore: 0 261 | m_AndroidBanners: 262 | - width: 320 263 | height: 180 264 | banner: {fileID: 0} 265 | androidGamepadSupportLevel: 0 266 | AndroidMinifyWithR8: 0 267 | AndroidMinifyRelease: 0 268 | AndroidMinifyDebug: 0 269 | AndroidValidateAppBundleSize: 1 270 | AndroidAppBundleSizeToValidate: 150 271 | m_BuildTargetIcons: [] 272 | m_BuildTargetPlatformIcons: [] 273 | m_BuildTargetBatching: 274 | - m_BuildTarget: Standalone 275 | m_StaticBatching: 1 276 | m_DynamicBatching: 0 277 | - m_BuildTarget: tvOS 278 | m_StaticBatching: 1 279 | m_DynamicBatching: 0 280 | - m_BuildTarget: Android 281 | m_StaticBatching: 1 282 | m_DynamicBatching: 0 283 | - m_BuildTarget: iPhone 284 | m_StaticBatching: 1 285 | m_DynamicBatching: 0 286 | - m_BuildTarget: WebGL 287 | m_StaticBatching: 0 288 | m_DynamicBatching: 0 289 | m_BuildTargetGraphicsJobs: 290 | - m_BuildTarget: MacStandaloneSupport 291 | m_GraphicsJobs: 0 292 | - m_BuildTarget: Switch 293 | m_GraphicsJobs: 1 294 | - m_BuildTarget: MetroSupport 295 | m_GraphicsJobs: 1 296 | - m_BuildTarget: AppleTVSupport 297 | m_GraphicsJobs: 0 298 | - m_BuildTarget: BJMSupport 299 | m_GraphicsJobs: 1 300 | - m_BuildTarget: LinuxStandaloneSupport 301 | m_GraphicsJobs: 1 302 | - m_BuildTarget: PS4Player 303 | m_GraphicsJobs: 1 304 | - m_BuildTarget: iOSSupport 305 | m_GraphicsJobs: 0 306 | - m_BuildTarget: WindowsStandaloneSupport 307 | m_GraphicsJobs: 1 308 | - m_BuildTarget: XboxOnePlayer 309 | m_GraphicsJobs: 1 310 | - m_BuildTarget: LuminSupport 311 | m_GraphicsJobs: 0 312 | - m_BuildTarget: AndroidPlayer 313 | m_GraphicsJobs: 0 314 | - m_BuildTarget: WebGLSupport 315 | m_GraphicsJobs: 0 316 | m_BuildTargetGraphicsJobMode: 317 | - m_BuildTarget: PS4Player 318 | m_GraphicsJobMode: 0 319 | - m_BuildTarget: XboxOnePlayer 320 | m_GraphicsJobMode: 0 321 | m_BuildTargetGraphicsAPIs: 322 | - m_BuildTarget: AndroidPlayer 323 | m_APIs: 150000000b000000 324 | m_Automatic: 0 325 | - m_BuildTarget: iOSSupport 326 | m_APIs: 10000000 327 | m_Automatic: 1 328 | - m_BuildTarget: AppleTVSupport 329 | m_APIs: 10000000 330 | m_Automatic: 0 331 | - m_BuildTarget: WebGLSupport 332 | m_APIs: 0b000000 333 | m_Automatic: 1 334 | m_BuildTargetVRSettings: 335 | - m_BuildTarget: Standalone 336 | m_Enabled: 0 337 | m_Devices: 338 | - Oculus 339 | - OpenVR 340 | openGLRequireES31: 0 341 | openGLRequireES31AEP: 0 342 | openGLRequireES32: 0 343 | m_TemplateCustomTags: {} 344 | mobileMTRendering: 345 | Android: 1 346 | iPhone: 1 347 | tvOS: 1 348 | m_BuildTargetGroupLightmapEncodingQuality: [] 349 | m_BuildTargetGroupLightmapSettings: [] 350 | playModeTestRunnerEnabled: 0 351 | runPlayModeTestAsEditModeTest: 0 352 | actionOnDotNetUnhandledException: 1 353 | enableInternalProfiler: 0 354 | logObjCUncaughtExceptions: 1 355 | enableCrashReportAPI: 0 356 | cameraUsageDescription: 357 | locationUsageDescription: 358 | microphoneUsageDescription: 359 | switchNMETAOverride: 360 | switchNetLibKey: 361 | switchSocketMemoryPoolSize: 6144 362 | switchSocketAllocatorPoolSize: 128 363 | switchSocketConcurrencyLimit: 14 364 | switchScreenResolutionBehavior: 2 365 | switchUseCPUProfiler: 0 366 | switchUseGOLDLinker: 0 367 | switchApplicationID: 0x01004b9000490000 368 | switchNSODependencies: 369 | switchTitleNames_0: 370 | switchTitleNames_1: 371 | switchTitleNames_2: 372 | switchTitleNames_3: 373 | switchTitleNames_4: 374 | switchTitleNames_5: 375 | switchTitleNames_6: 376 | switchTitleNames_7: 377 | switchTitleNames_8: 378 | switchTitleNames_9: 379 | switchTitleNames_10: 380 | switchTitleNames_11: 381 | switchTitleNames_12: 382 | switchTitleNames_13: 383 | switchTitleNames_14: 384 | switchPublisherNames_0: 385 | switchPublisherNames_1: 386 | switchPublisherNames_2: 387 | switchPublisherNames_3: 388 | switchPublisherNames_4: 389 | switchPublisherNames_5: 390 | switchPublisherNames_6: 391 | switchPublisherNames_7: 392 | switchPublisherNames_8: 393 | switchPublisherNames_9: 394 | switchPublisherNames_10: 395 | switchPublisherNames_11: 396 | switchPublisherNames_12: 397 | switchPublisherNames_13: 398 | switchPublisherNames_14: 399 | switchIcons_0: {fileID: 0} 400 | switchIcons_1: {fileID: 0} 401 | switchIcons_2: {fileID: 0} 402 | switchIcons_3: {fileID: 0} 403 | switchIcons_4: {fileID: 0} 404 | switchIcons_5: {fileID: 0} 405 | switchIcons_6: {fileID: 0} 406 | switchIcons_7: {fileID: 0} 407 | switchIcons_8: {fileID: 0} 408 | switchIcons_9: {fileID: 0} 409 | switchIcons_10: {fileID: 0} 410 | switchIcons_11: {fileID: 0} 411 | switchIcons_12: {fileID: 0} 412 | switchIcons_13: {fileID: 0} 413 | switchIcons_14: {fileID: 0} 414 | switchSmallIcons_0: {fileID: 0} 415 | switchSmallIcons_1: {fileID: 0} 416 | switchSmallIcons_2: {fileID: 0} 417 | switchSmallIcons_3: {fileID: 0} 418 | switchSmallIcons_4: {fileID: 0} 419 | switchSmallIcons_5: {fileID: 0} 420 | switchSmallIcons_6: {fileID: 0} 421 | switchSmallIcons_7: {fileID: 0} 422 | switchSmallIcons_8: {fileID: 0} 423 | switchSmallIcons_9: {fileID: 0} 424 | switchSmallIcons_10: {fileID: 0} 425 | switchSmallIcons_11: {fileID: 0} 426 | switchSmallIcons_12: {fileID: 0} 427 | switchSmallIcons_13: {fileID: 0} 428 | switchSmallIcons_14: {fileID: 0} 429 | switchManualHTML: 430 | switchAccessibleURLs: 431 | switchLegalInformation: 432 | switchMainThreadStackSize: 1048576 433 | switchPresenceGroupId: 434 | switchLogoHandling: 0 435 | switchReleaseVersion: 0 436 | switchDisplayVersion: 1.0.0 437 | switchStartupUserAccount: 0 438 | switchTouchScreenUsage: 0 439 | switchSupportedLanguagesMask: 0 440 | switchLogoType: 0 441 | switchApplicationErrorCodeCategory: 442 | switchUserAccountSaveDataSize: 0 443 | switchUserAccountSaveDataJournalSize: 0 444 | switchApplicationAttribute: 0 445 | switchCardSpecSize: -1 446 | switchCardSpecClock: -1 447 | switchRatingsMask: 0 448 | switchRatingsInt_0: 0 449 | switchRatingsInt_1: 0 450 | switchRatingsInt_2: 0 451 | switchRatingsInt_3: 0 452 | switchRatingsInt_4: 0 453 | switchRatingsInt_5: 0 454 | switchRatingsInt_6: 0 455 | switchRatingsInt_7: 0 456 | switchRatingsInt_8: 0 457 | switchRatingsInt_9: 0 458 | switchRatingsInt_10: 0 459 | switchRatingsInt_11: 0 460 | switchRatingsInt_12: 0 461 | switchLocalCommunicationIds_0: 462 | switchLocalCommunicationIds_1: 463 | switchLocalCommunicationIds_2: 464 | switchLocalCommunicationIds_3: 465 | switchLocalCommunicationIds_4: 466 | switchLocalCommunicationIds_5: 467 | switchLocalCommunicationIds_6: 468 | switchLocalCommunicationIds_7: 469 | switchParentalControl: 0 470 | switchAllowsScreenshot: 1 471 | switchAllowsVideoCapturing: 1 472 | switchAllowsRuntimeAddOnContentInstall: 0 473 | switchDataLossConfirmation: 0 474 | switchUserAccountLockEnabled: 0 475 | switchSystemResourceMemory: 16777216 476 | switchSupportedNpadStyles: 22 477 | switchNativeFsCacheSize: 32 478 | switchIsHoldTypeHorizontal: 0 479 | switchSupportedNpadCount: 8 480 | switchSocketConfigEnabled: 0 481 | switchTcpInitialSendBufferSize: 32 482 | switchTcpInitialReceiveBufferSize: 64 483 | switchTcpAutoSendBufferSizeMax: 256 484 | switchTcpAutoReceiveBufferSizeMax: 256 485 | switchUdpSendBufferSize: 9 486 | switchUdpReceiveBufferSize: 42 487 | switchSocketBufferEfficiency: 4 488 | switchSocketInitializeEnabled: 1 489 | switchNetworkInterfaceManagerInitializeEnabled: 1 490 | switchPlayerConnectionEnabled: 1 491 | ps4NPAgeRating: 12 492 | ps4NPTitleSecret: 493 | ps4NPTrophyPackPath: 494 | ps4ParentalLevel: 11 495 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 496 | ps4Category: 0 497 | ps4MasterVersion: 01.00 498 | ps4AppVersion: 01.00 499 | ps4AppType: 0 500 | ps4ParamSfxPath: 501 | ps4VideoOutPixelFormat: 0 502 | ps4VideoOutInitialWidth: 1920 503 | ps4VideoOutBaseModeInitialWidth: 1920 504 | ps4VideoOutReprojectionRate: 60 505 | ps4PronunciationXMLPath: 506 | ps4PronunciationSIGPath: 507 | ps4BackgroundImagePath: 508 | ps4StartupImagePath: 509 | ps4StartupImagesFolder: 510 | ps4IconImagesFolder: 511 | ps4SaveDataImagePath: 512 | ps4SdkOverride: 513 | ps4BGMPath: 514 | ps4ShareFilePath: 515 | ps4ShareOverlayImagePath: 516 | ps4PrivacyGuardImagePath: 517 | ps4ExtraSceSysFile: 518 | ps4NPtitleDatPath: 519 | ps4RemotePlayKeyAssignment: -1 520 | ps4RemotePlayKeyMappingDir: 521 | ps4PlayTogetherPlayerCount: 0 522 | ps4EnterButtonAssignment: 1 523 | ps4ApplicationParam1: 0 524 | ps4ApplicationParam2: 0 525 | ps4ApplicationParam3: 0 526 | ps4ApplicationParam4: 0 527 | ps4DownloadDataSize: 0 528 | ps4GarlicHeapSize: 2048 529 | ps4ProGarlicHeapSize: 2560 530 | playerPrefsMaxSize: 32768 531 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 532 | ps4pnSessions: 1 533 | ps4pnPresence: 1 534 | ps4pnFriends: 1 535 | ps4pnGameCustomData: 1 536 | playerPrefsSupport: 0 537 | enableApplicationExit: 0 538 | resetTempFolder: 1 539 | restrictedAudioUsageRights: 0 540 | ps4UseResolutionFallback: 0 541 | ps4ReprojectionSupport: 0 542 | ps4UseAudio3dBackend: 0 543 | ps4UseLowGarlicFragmentationMode: 1 544 | ps4SocialScreenEnabled: 0 545 | ps4ScriptOptimizationLevel: 0 546 | ps4Audio3dVirtualSpeakerCount: 14 547 | ps4attribCpuUsage: 0 548 | ps4PatchPkgPath: 549 | ps4PatchLatestPkgPath: 550 | ps4PatchChangeinfoPath: 551 | ps4PatchDayOne: 0 552 | ps4attribUserManagement: 0 553 | ps4attribMoveSupport: 0 554 | ps4attrib3DSupport: 0 555 | ps4attribShareSupport: 0 556 | ps4attribExclusiveVR: 0 557 | ps4disableAutoHideSplash: 0 558 | ps4videoRecordingFeaturesUsed: 0 559 | ps4contentSearchFeaturesUsed: 0 560 | ps4CompatibilityPS5: 0 561 | ps4GPU800MHz: 1 562 | ps4attribEyeToEyeDistanceSettingVR: 0 563 | ps4IncludedModules: [] 564 | ps4attribVROutputEnabled: 0 565 | monoEnv: 566 | splashScreenBackgroundSourceLandscape: {fileID: 0} 567 | splashScreenBackgroundSourcePortrait: {fileID: 0} 568 | blurSplashScreenBackground: 1 569 | spritePackerPolicy: 570 | webGLMemorySize: 16 571 | webGLExceptionSupport: 1 572 | webGLNameFilesAsHashes: 0 573 | webGLDataCaching: 1 574 | webGLDebugSymbols: 0 575 | webGLEmscriptenArgs: 576 | webGLModulesDirectory: 577 | webGLTemplate: APPLICATION:Default 578 | webGLAnalyzeBuildSize: 0 579 | webGLUseEmbeddedResources: 0 580 | webGLCompressionFormat: 1 581 | webGLWasmArithmeticExceptions: 0 582 | webGLLinkerTarget: 1 583 | webGLThreadsSupport: 0 584 | webGLDecompressionFallback: 0 585 | scriptingDefineSymbols: {} 586 | platformArchitecture: {} 587 | scriptingBackend: {} 588 | il2cppCompilerConfiguration: {} 589 | managedStrippingLevel: {} 590 | incrementalIl2cppBuild: {} 591 | suppressCommonWarnings: 1 592 | allowUnsafeCode: 0 593 | useDeterministicCompilation: 1 594 | additionalIl2CppArgs: 595 | scriptingRuntimeVersion: 1 596 | gcIncremental: 1 597 | gcWBarrierValidation: 0 598 | apiCompatibilityLevelPerPlatform: {} 599 | m_RenderingPath: 1 600 | m_MobileRenderingPath: 1 601 | metroPackageName: Template_3D 602 | metroPackageVersion: 603 | metroCertificatePath: 604 | metroCertificatePassword: 605 | metroCertificateSubject: 606 | metroCertificateIssuer: 607 | metroCertificateNotAfter: 0000000000000000 608 | metroApplicationDescription: Template_3D 609 | wsaImages: {} 610 | metroTileShortName: 611 | metroTileShowName: 0 612 | metroMediumTileShowName: 0 613 | metroLargeTileShowName: 0 614 | metroWideTileShowName: 0 615 | metroSupportStreamingInstall: 0 616 | metroLastRequiredScene: 0 617 | metroDefaultTileSize: 1 618 | metroTileForegroundText: 2 619 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 620 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, a: 1} 621 | metroSplashScreenUseBackgroundColor: 0 622 | platformCapabilities: {} 623 | metroTargetDeviceFamilies: {} 624 | metroFTAName: 625 | metroFTAFileTypes: [] 626 | metroProtocolName: 627 | XboxOneProductId: 628 | XboxOneUpdateKey: 629 | XboxOneSandboxId: 630 | XboxOneContentId: 631 | XboxOneTitleId: 632 | XboxOneSCId: 633 | XboxOneGameOsOverridePath: 634 | XboxOnePackagingOverridePath: 635 | XboxOneAppManifestOverridePath: 636 | XboxOneVersion: 1.0.0.0 637 | XboxOnePackageEncryption: 0 638 | XboxOnePackageUpdateGranularity: 2 639 | XboxOneDescription: 640 | XboxOneLanguage: 641 | - enus 642 | XboxOneCapability: [] 643 | XboxOneGameRating: {} 644 | XboxOneIsContentPackage: 0 645 | XboxOneEnableGPUVariability: 1 646 | XboxOneSockets: {} 647 | XboxOneSplashScreen: {fileID: 0} 648 | XboxOneAllowedProductIds: [] 649 | XboxOnePersistentLocalStorageSize: 0 650 | XboxOneXTitleMemory: 8 651 | XboxOneOverrideIdentityName: 652 | XboxOneOverrideIdentityPublisher: 653 | vrEditorSettings: 654 | daydream: 655 | daydreamIconForeground: {fileID: 0} 656 | daydreamIconBackground: {fileID: 0} 657 | cloudServicesEnabled: 658 | UNet: 1 659 | luminIcon: 660 | m_Name: 661 | m_ModelFolderPath: 662 | m_PortalFolderPath: 663 | luminCert: 664 | m_CertPath: 665 | m_SignPackage: 1 666 | luminIsChannelApp: 0 667 | luminVersion: 668 | m_VersionCode: 1 669 | m_VersionName: 670 | apiCompatibilityLevel: 6 671 | cloudProjectId: 672 | framebufferDepthMemorylessMode: 0 673 | projectName: 674 | organizationId: 675 | cloudEnabled: 0 676 | enableNativePlatformBackendsForNewInputSystem: 0 677 | disableOldInputManagerSupport: 0 678 | legacyClampBlendShapeWeights: 0 679 | virtualTexturingSupportEnabled: 0 680 | --------------------------------------------------------------------------------