Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Xlinka committed Jul 20, 2024
1 parent 01f10a3 commit ba48b7e
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<MIDI_InputDevice> InputDevice;
Expand Down Expand Up @@ -53,7 +53,7 @@ protected override void OnDispose()

private void OnControl(MIDI_InputDevice device, MIDI_CC_EventData eventData)
{
RunSynchronously(() =>
RunSynchronously(() =>
{
if (AutoMap.Value)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<MIDI_InputDevice> InputDevice;
Expand Down
1 change: 1 addition & 0 deletions ProjectObsidian/Elements/MIDI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Components.Devices.MIDI;
using Elements.Core;

namespace Obsidian.Elements;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<FrooxEngineContext>
{
public readonly GlobalRef<MIDI_InputDevice> Device;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<FrooxEngineContext>
{
public readonly GlobalRef<MIDI_InputDevice> Device;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<FrooxEngineContext>
{
public readonly GlobalRef<MIDI_InputDevice> Device;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<FrooxEngineContext>
{
public readonly GlobalRef<MIDI_InputDevice> Device;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<FrooxEngineContext>
{
public readonly GlobalRef<MIDI_InputDevice> Device;
Expand Down

0 comments on commit ba48b7e

Please sign in to comment.