Example Code

Communicating with MIDI Device in LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

    Operating System

  • Windows

    Other

  • DryWetMIDI .net library

Code and Documents

Attachment

Description

This example shows how to use the DryWetMIDI  library to communicate with a MIDI device use .net.

There are examples:
- get list of active MIDI InputDevice and OutputDevice (Count.vi);
- get MIDI device properties (Property.vi);
- sending NoteEvent to MIDI OutputDevice (NoteOutputDevice (Write).vi and NoteOutputDevice (Write On-Off).vi);
- handling NoteEvent from MIDI InputDevice (NoteInputDevice (Read).vi) using callback function (EventReceived Callback Function.vi).

Source code in LabVIEW 2015.
The archive contains the necessary libraries.

In case of problems, create copy of the Melanchall_DryWetMidi_Native32.dll (or 64) libraries in the folder C:\Windows\System32\ or (C:\Windows\System\).

Related Links

DryWetMIDI on GitHub: https://github.com/melanchall/drywetmidi

Demo Video: https://youtu.be/o-EXSJ_Ltac or https://rutube.ru/video/a4abd5eccd67d5c9835a8c5775dfcb90/

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
whodat_gavel
Member
Member
on

@IvanLis - THANK YOU for sharing this!!  I have been able to READ and PLAY with the separate VI's, and have a few questions if you could please message me? 

IvanLis
Member
Member
on

Hello!
What questions do you have?

Contributors