• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

FortySevenEffects/arduino_midi_library: MIDI for Arduino

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

FortySevenEffects/arduino_midi_library

开源软件地址(OpenSource Url):

https://github.com/FortySevenEffects/arduino_midi_library

开源编程语言(OpenSource Language):

C++ 85.2%

开源软件介绍(OpenSource Introduction):

Arduino MIDI Library

GitHub release License Build Examples Coveralls

This library adds MIDI I/O communications to an Arduino board.

Features

  • New : MIDI over USB, Bluetooth, IP & AppleMIDI (see Transports).
  • New : Active Sensing support
  • Compatible with all Arduino boards (and clones with an AVR processor).
  • Simple and fast way to send and receive every kind of MIDI message (including all System messages, SysEx, Clock, etc..).
  • OMNI input reading (read all channels).
  • Software Thru, with message filtering.
  • Callbacks to handle input messages more easily.
  • Last received message is saved until a new one arrives.
  • Configurable: overridable template-based settings.
  • Create more than one MIDI interface for mergers/splitters applications.
  • Use any serial port, hardware or software.

Getting Started

  1. Use the Arduino Library Manager to install the library. Type "MIDI I/Os for Arduino" in the Arduino IDE Library Manager

  2. Start coding:

#include <MIDI.h>

// Create and bind the MIDI interface to the default hardware Serial port
MIDI_CREATE_DEFAULT_INSTANCE();

void setup()
{
    MIDI.begin(MIDI_CHANNEL_OMNI);  // Listen to all incoming messages
}

void loop()
{
    // Send note 42 with velocity 127 on channel 1
    MIDI.sendNoteOn(42, 127, 1);

    // Read incoming messages
    MIDI.read();
}
  1. Read the documentation or watch the awesome video tutorials from Notes & Volts.

Documentation

USB Migration (4.x to 5.x)

All USB related code has been moved into a separate repository Arduino-USB-MIDI, USB MIDI Device support with MIDIUSB, still using this library to do all the MIDI heavy-lifting.

Migration has been made as easy as possible: only the declaration of the MIDI object has been modified, the rest of your code remains identical.

4.3.1 code:

#include <MIDI.h>
#include <midi_UsbTransport.h>

static const unsigned sUsbTransportBufferSize = 16;
typedef midi::UsbTransport<sUsbTransportBufferSize> UsbTransport;

UsbTransport sUsbTransport;

MIDI_CREATE_INSTANCE(UsbTransport, sUsbTransport, MIDI);

// ...

now becomes in 5.x:

#include <USB-MIDI.h>
USBMIDI_CREATE_DEFAULT_INSTANCE();

// ...

Start with the NoteOnOffEverySec example that is based on the original MidiUSB sketch. Note the only difference is in the declaration.

The USB-MIDI Arduino library depends on this library and the MIDIUSB library.

USB-MIDI uses the latest Arduino IDE depends feature in the library.properties file installing all the dependencies automatically when installing from the IDE.

Other Transport mechanisms

Version 5 of this library, allows for other Transport layers than the original MIDI 1.0 Electrical Specification (hardware serial).

All these Transport layers use this library for all the underlying MIDI work, making it easy to switch transport protocols or making transport protocol bridges.

Differences between Serial & other transports

  • Software Thru is enabled by default on Serial, but not on other transports.

Contact & Contribution

To report a bug, contribute, discuss on usage, or request support, please discuss it here.

You can also contact me on Twitter: @fortysevenfx.

Contributors

Special thanks to all who have contributed to this open-source project !

You want to help ? Check out the contribution guidelines.

License

MIT © 2009 - present Francois Best




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap