diff --git a/UnityProject/Assembly-CSharp-Editor.csproj b/UnityProject/Assembly-CSharp-Editor.csproj index 9d05ce8..f643a14 100644 --- a/UnityProject/Assembly-CSharp-Editor.csproj +++ b/UnityProject/Assembly-CSharp-Editor.csproj @@ -361,6 +361,24 @@ C:/Users/chikashi/Development/Soundvision/UnityProject/Assets/Plugins/System.Threading.Tasks.Extensions.dll + + C:/Users/chikashi/Development/Soundvision/UnityProject/Assets/ThridParty/AzureKinectExamples/SDK/Kinect4AzureSDK/Plugins/Microsoft.Azure.Kinect.Sensor.dll + + + C:/Users/chikashi/Development/Soundvision/UnityProject/Assets/ThridParty/AzureKinectExamples/SDK/Kinect4AzureSDK/Plugins/System.Buffers.dll + + + C:/Users/chikashi/Development/Soundvision/UnityProject/Assets/ThridParty/AzureKinectExamples/SDK/Kinect4AzureSDK/Plugins/System.Memory.dll + + + C:/Users/chikashi/Development/Soundvision/UnityProject/Assets/ThridParty/AzureKinectExamples/SDK/Kinect4AzureSDK/Plugins/System.Runtime.CompilerServices.Unsafe.dll + + + C:/Users/chikashi/Development/Soundvision/UnityProject/Assets/ThridParty/AzureKinectExamples/SDK/KinectSDK2.0/Plugins/Kinect2UnityWrapper.dll + + + C:/Users/chikashi/Development/Soundvision/UnityProject/Assets/ThridParty/AzureKinectExamples/SDK/RealSenseSDK2.0/Plugins/Intel.RealSense.dll + C:/Users/chikashi/Development/Soundvision/UnityProject/Library/PackageCache/com.unity.ads@2.0.8/Editor/UnityEditor.Advertisements.dll @@ -379,24 +397,6 @@ C:/Users/chikashi/Development/Soundvision/UnityProject/Library/PackageCache/com.unity.render-pipelines.high-definition@6.9.1-preview/Editor/Core/ShaderGenerator/ICSharpCode.NRefactory.dll - - C:/Users/chikashi/Development/Soundvision/UnityProject/Assets/ThridParty/AzureKinectExamples/SDK/Kinect4AzureSDK/Plugins/System.Memory.dll - - - C:/Users/chikashi/Development/Soundvision/UnityProject/Assets/ThridParty/AzureKinectExamples/SDK/Kinect4AzureSDK/Plugins/System.Runtime.CompilerServices.Unsafe.dll - - - C:/Users/chikashi/Development/Soundvision/UnityProject/Assets/ThridParty/AzureKinectExamples/SDK/Kinect4AzureSDK/Plugins/Microsoft.Azure.Kinect.Sensor.dll - - - C:/Users/chikashi/Development/Soundvision/UnityProject/Assets/ThridParty/AzureKinectExamples/SDK/RealSenseSDK2.0/Plugins/Intel.RealSense.dll - - - C:/Users/chikashi/Development/Soundvision/UnityProject/Assets/ThridParty/AzureKinectExamples/SDK/Kinect4AzureSDK/Plugins/System.Buffers.dll - - - C:/Users/chikashi/Development/Soundvision/UnityProject/Assets/ThridParty/AzureKinectExamples/SDK/KinectSDK2.0/Plugins/Kinect2UnityWrapper.dll - C:/Users/chikashi/Development/Soundvision/UnityProject/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom/nunit.framework.dll diff --git a/UnityProject/Assembly-CSharp.csproj b/UnityProject/Assembly-CSharp.csproj index ced6be8..9c53671 100644 --- a/UnityProject/Assembly-CSharp.csproj +++ b/UnityProject/Assembly-CSharp.csproj @@ -61,6 +61,7 @@ + @@ -577,6 +578,24 @@ C:/Users/chikashi/Development/Soundvision/UnityProject/Assets/Plugins/System.Threading.Tasks.Extensions.dll + + C:/Users/chikashi/Development/Soundvision/UnityProject/Assets/ThridParty/AzureKinectExamples/SDK/Kinect4AzureSDK/Plugins/Microsoft.Azure.Kinect.Sensor.dll + + + C:/Users/chikashi/Development/Soundvision/UnityProject/Assets/ThridParty/AzureKinectExamples/SDK/Kinect4AzureSDK/Plugins/System.Buffers.dll + + + C:/Users/chikashi/Development/Soundvision/UnityProject/Assets/ThridParty/AzureKinectExamples/SDK/Kinect4AzureSDK/Plugins/System.Memory.dll + + + C:/Users/chikashi/Development/Soundvision/UnityProject/Assets/ThridParty/AzureKinectExamples/SDK/Kinect4AzureSDK/Plugins/System.Runtime.CompilerServices.Unsafe.dll + + + C:/Users/chikashi/Development/Soundvision/UnityProject/Assets/ThridParty/AzureKinectExamples/SDK/KinectSDK2.0/Plugins/Kinect2UnityWrapper.dll + + + C:/Users/chikashi/Development/Soundvision/UnityProject/Assets/ThridParty/AzureKinectExamples/SDK/RealSenseSDK2.0/Plugins/Intel.RealSense.dll + C:/Users/chikashi/Development/Soundvision/UnityProject/Library/PackageCache/com.unity.analytics@3.3.2/Unity.Analytics.Editor.dll @@ -586,24 +605,6 @@ C:/Users/chikashi/Development/Soundvision/UnityProject/Library/PackageCache/com.unity.analytics@3.3.2/Unity.Analytics.Tracker.dll - - C:/Users/chikashi/Development/Soundvision/UnityProject/Assets/ThridParty/AzureKinectExamples/SDK/Kinect4AzureSDK/Plugins/System.Memory.dll - - - C:/Users/chikashi/Development/Soundvision/UnityProject/Assets/ThridParty/AzureKinectExamples/SDK/Kinect4AzureSDK/Plugins/System.Runtime.CompilerServices.Unsafe.dll - - - C:/Users/chikashi/Development/Soundvision/UnityProject/Assets/ThridParty/AzureKinectExamples/SDK/Kinect4AzureSDK/Plugins/Microsoft.Azure.Kinect.Sensor.dll - - - C:/Users/chikashi/Development/Soundvision/UnityProject/Assets/ThridParty/AzureKinectExamples/SDK/RealSenseSDK2.0/Plugins/Intel.RealSense.dll - - - C:/Users/chikashi/Development/Soundvision/UnityProject/Assets/ThridParty/AzureKinectExamples/SDK/Kinect4AzureSDK/Plugins/System.Buffers.dll - - - C:/Users/chikashi/Development/Soundvision/UnityProject/Assets/ThridParty/AzureKinectExamples/SDK/KinectSDK2.0/Plugins/Kinect2UnityWrapper.dll - C:/Program Files/Unity_2019.2.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/mscorlib.dll diff --git a/UnityProject/Assets/Scenes/Examples/MIDI/script/CubeSync.cs b/UnityProject/Assets/Scenes/Examples/MIDI/script/CubeSync.cs new file mode 100644 index 0000000..83fbf9f --- /dev/null +++ b/UnityProject/Assets/Scenes/Examples/MIDI/script/CubeSync.cs @@ -0,0 +1,31 @@ +using UnityEngine; + +public class CubeSync : MonoBehaviour +{ + private int counter_ = 0; + private float currentX_; + private float targetX_; + private float lastCallBack_; + private float callbackInterval_ = 0.05f; + + public void onClockReceived() + { + var now = Time.realtimeSinceStartup; + callbackInterval_ = now - lastCallBack_; + lastCallBack_ = now; + currentX_ = (counter_ - 12) * 0.2f; + counter_++; + targetX_ = (counter_ - 12) * 0.2f; + counter_ %= 24; + + } + + public void Update() + { + var timeSinceLastCallback = Time.realtimeSinceStartup - lastCallBack_; + var elapsedRatio = timeSinceLastCallback / callbackInterval_; + var animationX = Mathf.Lerp(currentX_, targetX_, elapsedRatio); + Debug.Log(elapsedRatio); + transform.position = new Vector3(animationX, 0f, 0f); + } +} diff --git a/UnityProject/Assets/Scenes/Examples/MIDI/script/CubeSync.cs.meta b/UnityProject/Assets/Scenes/Examples/MIDI/script/CubeSync.cs.meta new file mode 100644 index 0000000..9028c73 --- /dev/null +++ b/UnityProject/Assets/Scenes/Examples/MIDI/script/CubeSync.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 68dd60d6601a3ca4491fc454f866bc36 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: