Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MIDI OUT feature (Win x64) #46

Open
wants to merge 41 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
e09e768
Unity Editor 5.6.1f1 update
Nagitch Jun 11, 2017
3b3aba5
Added MIDI send code skeleton
Nagitch Jun 11, 2017
bc755fc
Open MIDI OUT devices and list in MIDIJack window
Nagitch Jun 12, 2017
a936870
DLL supports send Note & CC
Nagitch Jun 17, 2017
96cc68f
Added some API and example scene
Nagitch Jun 21, 2017
342bef0
Added MIDI send example scenes
Nagitch Jul 6, 2017
e2ea8a8
fixed wrong semaphore control
Nagitch Jul 9, 2017
ae85f33
fixed wrong semaphore control
Nagitch Jul 9, 2017
42b3582
migrating project for Unity Editor 2017.1.0f3
Nagitch Jul 30, 2017
c6e7850
cosmetic changes
Nagitch Jul 30, 2017
0457ba7
repack unitypackage
Nagitch Jul 30, 2017
9e2d54d
fixed value byte is going wrong and refactoring code.
Nagitch Jul 30, 2017
99d29eb
Ready for Release
Nagitch Jul 30, 2017
80776d1
Merge pull request #2 from Nagitch/SendMIDI
Nagitch Jul 30, 2017
d7ba9c1
Update README
Nagitch Jul 31, 2017
362e0f3
update project for VisualStudio2017
Nagitch Aug 2, 2017
7ab1a8f
DLL implement queue for send MIDI OUT message.
Nagitch Aug 2, 2017
beda6b3
MIDI Jack Window supports shows MIDI OUT recent message.
Nagitch Aug 2, 2017
4fd6e98
fixed issue and API spec for feature improvement
Nagitch Aug 6, 2017
58f9d46
delete unused scripts
Nagitch Aug 6, 2017
a2d6476
Merge branch 'issue#3'
Nagitch Aug 6, 2017
90f79d0
update README.md
Nagitch Aug 6, 2017
f4dde2c
repack unitypackage
Nagitch Aug 6, 2017
8f1b1e8
Merge remote-tracking branch 'upstream/master'
Nagitch Mar 10, 2019
ccf9395
migrate to Unity Editor 2018.3.6f1
Nagitch Mar 2, 2019
a77c0e1
fixed dropdown showing issue
Nagitch Mar 2, 2019
221f34d
Update send examples
Nagitch Mar 5, 2019
37c287e
added packages manifest.json
Nagitch Mar 5, 2019
6783eed
Added keyboard to send examples
Nagitch Mar 5, 2019
0838fdf
remove unused logic
Nagitch Mar 10, 2019
5a082e5
update README
Nagitch Mar 10, 2019
a5218fe
Merge pull request #4 from Nagitch/example-send
Nagitch Mar 10, 2019
2e804e3
restore .gitignore
Nagitch Mar 10, 2019
12f3926
fixed send message dequeue timing issue
Nagitch May 9, 2019
21ca802
code only support x86
Nagitch May 9, 2019
f7f7ad7
repackage .unitypackage and .dll
Nagitch May 9, 2019
cb7a635
Merge pull request #5 from Nagitch/issue/dequeue-timing
Nagitch May 9, 2019
e9b6a60
Merged https://github.com/keijiro/MidiJack/issues/37 and modified for…
Nagitch May 11, 2019
a8a28ef
refresh devices at CountEndpoints/CountSendEndpoints, and update send…
Nagitch May 12, 2019
a73010a
repackage MidiJack.unitypackage
Nagitch May 12, 2019
a186f09
Merge pull request #8 from Nagitch/issue#6
Nagitch May 12, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Assets/Example Send.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 48 additions & 0 deletions Assets/Example Send/DelegateSendTester.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
using UnityEngine;
using MidiJack;
using UnityEngine.UI;

public class DelegateSendTester : MonoBehaviour
{
public SendTestMIDIManager midiManager;
public Dropdown midiOutSelector;

void NoteOn(MidiChannel channel, int note, float velocity)
{
Debug.Log("NoteOn: " + channel + "," + note + "," + velocity);

uint id = midiManager.MidiOutDevices[ midiOutSelector.value ].Id;
MidiMaster.SendNoteOn(id, channel, note, velocity);
}

void NoteOff(MidiChannel channel, int note)
{
Debug.Log("NoteOff: " + channel + "," + note);

uint id = midiManager.MidiOutDevices[ midiOutSelector.value ].Id;
MidiMaster.SendNoteOff(id, channel, note, 0.0f);
}

void Knob(MidiChannel channel, int knobNumber, float knobValue)
{
Debug.Log("Knob: " + knobNumber + "," + knobValue);

uint id = midiManager.MidiOutDevices[ midiOutSelector.value ].Id;
MidiMaster.SendCC(id, channel, knobNumber, knobValue);

}

void OnEnable()
{
MidiMaster.noteOnDelegate += NoteOn;
MidiMaster.noteOffDelegate += NoteOff;
MidiMaster.knobDelegate += Knob;
}

void OnDisable()
{
MidiMaster.noteOnDelegate -= NoteOn;
MidiMaster.noteOffDelegate -= NoteOff;
MidiMaster.knobDelegate -= Knob;
}
}
12 changes: 12 additions & 0 deletions Assets/Example Send/DelegateSendTester.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 39 additions & 0 deletions Assets/Example Send/DropdownMIDIDevice.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class DropdownMIDIDevice : MonoBehaviour {
public SendTestMIDIManager midiManager;
private int midiOutDeviceCount = 0;

// Use this for initialization
void Start () {

}

// Update is called once per frame
void Update () {
RefreshMIDIOutList();
}


public void RefreshMIDIOutList() {
var deviceCount = midiManager.midiOutDeviceCount;
if(deviceCount == midiOutDeviceCount) {
return;
}

Dropdown dd = GetComponent<Dropdown>();
dd.ClearOptions();

for (var i = 0; i < deviceCount; i++)
{
dd.options.Add(new Dropdown.OptionData(midiManager.MidiOutDevices[i].ToString()) );
}

this.midiOutDeviceCount = deviceCount;

dd.RefreshShownValue();
}
}
12 changes: 12 additions & 0 deletions Assets/Example Send/DropdownMIDIDevice.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading