diff --git a/ProjectObsidian/Components/Devices/MIDI_CC_Value.cs b/ProjectObsidian/Components/Devices/MIDI/MIDI_CC_Value.cs similarity index 96% rename from ProjectObsidian/Components/Devices/MIDI_CC_Value.cs rename to ProjectObsidian/Components/Devices/MIDI/MIDI_CC_Value.cs index 8bbf2c5..4630543 100644 --- a/ProjectObsidian/Components/Devices/MIDI_CC_Value.cs +++ b/ProjectObsidian/Components/Devices/MIDI/MIDI_CC_Value.cs @@ -9,9 +9,9 @@ using Commons.Music.Midi; using Obsidian.Elements; -namespace Obsidian; +namespace Components.Devices.MIDI; -[Category(new string[] { "Obsidian/Devices" })] +[Category(new string[] { "Obsidian/Devices/MIDI" })] public class MIDI_CC_Value : Component { public readonly SyncRef InputDevice; @@ -53,7 +53,7 @@ protected override void OnDispose() private void OnControl(MIDI_InputDevice device, MIDI_CC_EventData eventData) { - RunSynchronously(() => + RunSynchronously(() => { if (AutoMap.Value) { diff --git a/ProjectObsidian/Components/Devices/MIDI_InputDevice.cs b/ProjectObsidian/Components/Devices/MIDI/MIDI_InputDevice.cs similarity index 98% rename from ProjectObsidian/Components/Devices/MIDI_InputDevice.cs rename to ProjectObsidian/Components/Devices/MIDI/MIDI_InputDevice.cs index 5bd246d..7716827 100644 --- a/ProjectObsidian/Components/Devices/MIDI_InputDevice.cs +++ b/ProjectObsidian/Components/Devices/MIDI/MIDI_InputDevice.cs @@ -8,10 +8,11 @@ using CoreMidi; using Commons.Music.Midi; using Obsidian.Elements; +using Obsidian; -namespace Obsidian; +namespace Components.Devices.MIDI; -[Category(new string[] { "Obsidian/Devices" })] +[Category(new string[] { "Obsidian/Devices/MIDI" })] public class MIDI_InputDevice : Component { [NoContinuousParsing] @@ -145,9 +146,9 @@ private void Update() return; } - if (_inputDevice != null - && (_inputDevice.Connection == MidiPortConnectionState.Open || _inputDevice.Connection == MidiPortConnectionState.Pending) - && _inputDevice.Details.Name == DeviceName.Value) + if (_inputDevice != null + && (_inputDevice.Connection == MidiPortConnectionState.Open || _inputDevice.Connection == MidiPortConnectionState.Pending) + && _inputDevice.Details.Name == DeviceName.Value) { UniLog.Log("Already connected."); return; diff --git a/ProjectObsidian/Components/Devices/MIDI_PitchWheel_Value.cs b/ProjectObsidian/Components/Devices/MIDI/MIDI_PitchWheel_Value.cs similarity index 95% rename from ProjectObsidian/Components/Devices/MIDI_PitchWheel_Value.cs rename to ProjectObsidian/Components/Devices/MIDI/MIDI_PitchWheel_Value.cs index 3280950..f76146b 100644 --- a/ProjectObsidian/Components/Devices/MIDI_PitchWheel_Value.cs +++ b/ProjectObsidian/Components/Devices/MIDI/MIDI_PitchWheel_Value.cs @@ -10,9 +10,9 @@ using Obsidian.Elements; using System.Runtime.Remoting.Contexts; -namespace Obsidian; +namespace Components.Devices.MIDI; -[Category(new string[] { "Obsidian/Devices" })] +[Category(new string[] { "Obsidian/Devices/MIDI" })] public class MIDI_PitchWheel_Value : Component { public readonly SyncRef InputDevice; diff --git a/ProjectObsidian/Elements/MIDI.cs b/ProjectObsidian/Elements/MIDI.cs index f73f45e..4bd161d 100644 --- a/ProjectObsidian/Elements/MIDI.cs +++ b/ProjectObsidian/Elements/MIDI.cs @@ -3,6 +3,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; +using Components.Devices.MIDI; using Elements.Core; namespace Obsidian.Elements; diff --git a/ProjectObsidian/ProtoFlux/Devices/MIDI_AftertouchEvent.cs b/ProjectObsidian/ProtoFlux/Devices/MIDI/MIDI_AftertouchEvent.cs similarity index 97% rename from ProjectObsidian/ProtoFlux/Devices/MIDI_AftertouchEvent.cs rename to ProjectObsidian/ProtoFlux/Devices/MIDI/MIDI_AftertouchEvent.cs index 93f7955..971854a 100644 --- a/ProjectObsidian/ProtoFlux/Devices/MIDI_AftertouchEvent.cs +++ b/ProjectObsidian/ProtoFlux/Devices/MIDI/MIDI_AftertouchEvent.cs @@ -7,12 +7,12 @@ using FrooxEngine; using FrooxEngine.ProtoFlux; using Obsidian.Elements; -using Obsidian; +using Components.Devices.MIDI; namespace ProtoFlux.Runtimes.Execution.Nodes.Obsidian.Devices; [NodeName("MIDI Polyphonic Aftertouch Event")] -[NodeCategory("Obsidian/Devices")] +[NodeCategory("Obsidian/Devices/MIDI")] public class MIDI_AftertouchEvent : VoidNode { public readonly GlobalRef Device; diff --git a/ProjectObsidian/ProtoFlux/Devices/MIDI_CC_Event.cs b/ProjectObsidian/ProtoFlux/Devices/MIDI/MIDI_CC_Event.cs similarity index 97% rename from ProjectObsidian/ProtoFlux/Devices/MIDI_CC_Event.cs rename to ProjectObsidian/ProtoFlux/Devices/MIDI/MIDI_CC_Event.cs index 747be92..ab9afb6 100644 --- a/ProjectObsidian/ProtoFlux/Devices/MIDI_CC_Event.cs +++ b/ProjectObsidian/ProtoFlux/Devices/MIDI/MIDI_CC_Event.cs @@ -7,12 +7,12 @@ using FrooxEngine; using FrooxEngine.ProtoFlux; using Obsidian.Elements; -using Obsidian; +using Components.Devices.MIDI; namespace ProtoFlux.Runtimes.Execution.Nodes.Obsidian.Devices; [NodeName("MIDI CC Event")] -[NodeCategory("Obsidian/Devices")] +[NodeCategory("Obsidian/Devices/MIDI")] public class MIDI_CC_Event : VoidNode { public readonly GlobalRef Device; diff --git a/ProjectObsidian/ProtoFlux/Devices/MIDI_ChannelPressureEvent.cs b/ProjectObsidian/ProtoFlux/Devices/MIDI/MIDI_ChannelPressureEvent.cs similarity index 97% rename from ProjectObsidian/ProtoFlux/Devices/MIDI_ChannelPressureEvent.cs rename to ProjectObsidian/ProtoFlux/Devices/MIDI/MIDI_ChannelPressureEvent.cs index f98bcc3..7c0560c 100644 --- a/ProjectObsidian/ProtoFlux/Devices/MIDI_ChannelPressureEvent.cs +++ b/ProjectObsidian/ProtoFlux/Devices/MIDI/MIDI_ChannelPressureEvent.cs @@ -7,12 +7,12 @@ using FrooxEngine; using FrooxEngine.ProtoFlux; using Obsidian.Elements; -using Obsidian; +using Components.Devices.MIDI; namespace ProtoFlux.Runtimes.Execution.Nodes.Obsidian.Devices; [NodeName("MIDI Channel Pressure Event")] -[NodeCategory("Obsidian/Devices")] +[NodeCategory("Obsidian/Devices/MIDI")] public class MIDI_ChannelPressureEvent : VoidNode { public readonly GlobalRef Device; diff --git a/ProjectObsidian/ProtoFlux/Devices/MIDI_NoteEvents.cs b/ProjectObsidian/ProtoFlux/Devices/MIDI/MIDI_NoteEvents.cs similarity index 97% rename from ProjectObsidian/ProtoFlux/Devices/MIDI_NoteEvents.cs rename to ProjectObsidian/ProtoFlux/Devices/MIDI/MIDI_NoteEvents.cs index e105e87..d3356f8 100644 --- a/ProjectObsidian/ProtoFlux/Devices/MIDI_NoteEvents.cs +++ b/ProjectObsidian/ProtoFlux/Devices/MIDI/MIDI_NoteEvents.cs @@ -7,12 +7,12 @@ using FrooxEngine; using FrooxEngine.ProtoFlux; using Obsidian.Elements; -using Obsidian; +using Components.Devices.MIDI; namespace ProtoFlux.Runtimes.Execution.Nodes.Obsidian.Devices; [NodeName("MIDI Note Events")] -[NodeCategory("Obsidian/Devices")] +[NodeCategory("Obsidian/Devices/MIDI")] public class MIDI_NoteEvents : VoidNode { public readonly GlobalRef Device; diff --git a/ProjectObsidian/ProtoFlux/Devices/MIDI_PitchWheelEvent.cs b/ProjectObsidian/ProtoFlux/Devices/MIDI/MIDI_PitchWheelEvent.cs similarity index 97% rename from ProjectObsidian/ProtoFlux/Devices/MIDI_PitchWheelEvent.cs rename to ProjectObsidian/ProtoFlux/Devices/MIDI/MIDI_PitchWheelEvent.cs index 40400ea..4a1c54c 100644 --- a/ProjectObsidian/ProtoFlux/Devices/MIDI_PitchWheelEvent.cs +++ b/ProjectObsidian/ProtoFlux/Devices/MIDI/MIDI_PitchWheelEvent.cs @@ -7,12 +7,12 @@ using FrooxEngine; using FrooxEngine.ProtoFlux; using Obsidian.Elements; -using Obsidian; +using Components.Devices.MIDI; namespace ProtoFlux.Runtimes.Execution.Nodes.Obsidian.Devices; [NodeName("MIDI Pitch Wheel Event")] -[NodeCategory("Obsidian/Devices")] +[NodeCategory("Obsidian/Devices/MIDI")] public class MIDI_PitchWheelEvent : VoidNode { public readonly GlobalRef Device;