Giter VIP home page Giter VIP logo

arduino-applemidi-library's Introduction

AppleMIDI (rtpMIDI) for Arduino

Build StatusLicense: CC BY-SA 4.0 GitHub version

Enables an Arduino with IP/UDP capabilities (Ethernet shield, ESP8266, ESP32, ...) to particpate in an AppleMIDI session.

Features

  • Tested with AppleMIDI on Mac OS (High Sierra) and using rtpMIDI from Tobias Erichsen on Windows 10
  • Send and receive all MIDI messages
  • Uses callbacks to receive MIDI commands (no need for polling)
  • Automatic instantiation of AppleMIDI object (see at the end of 'AppleMidi.h')

Installation

From the Arduino IDE Library Manager, search for AppleMIDI

Basic Usage

#include "AppleMidi.h"

APPLEMIDI_CREATE_DEFAULT_INSTANCE(); 

void setup()
{
  // ...setup ethernet connection
  AppleMIDI.begin("test"); // 'test' will show up as the session name
}

void loop()
{
  AppleMIDI.run();
  // ...
  
  // Send MIDI note 40 on, velocity 55 on channel 1
  AppleMIDI.noteOn(40, 55, 1);
}

More usages in the examples folder

Hardware

  • Arduino/Genuino (Mega, Uno, Arduino Ethernet, ...)
  • ESP8266 (Adafruit HUZZAH ESP8266, Sparkfun ESP8266 Thing Dev)
  • ESP32 (Adafruit HUZZAH32 โ€“ ESP32 Feather Board)
  • Teensy 3.2
  • Adafruit Feather M0 WiFi - ATSAMD21 + ATWINC1500

Memory usage

The code has been pseudo optimized to minimize the memory footprint. Internal buffers also use valuable memory space. The biggest buffer PACKET_MAX_SIZE is set to 350 by default in AppleMidi_Settings.h. Albeit this number is somewhat arbitratry (large enough to receive full SysEx messages), it can be reduced significantly if you do not have to receive large messages.

On an Arduino, 2 sessions be active at once (W5100 can have max 4 sockets open at the same time). Setting MAX_SESSIONS to 1 saves 228 bytes (each session takes 228 bytes).

Network Shields

  • Arduino Ethernet shield (arduino.cc, Wiznet W5100)
  • Arduino Wifi R3 shield (arduino.cc)
  • Teensy WIZ820io W5200

Arduino IDE (arduino.cc)

  • 1.8.5

Contributing

I would love to include your enhancements or bug fixes! In lieu of a formal styleguide, please take care to maintain the existing coding style. Please test your code before sending a pull request. It would be very helpful if you include a detailed explanation of your changes in the pull request.

arduino-applemidi-library's People

Contributors

lathoub avatar bluebie avatar chris-zen avatar jorensix avatar massimofasciano avatar per1234 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.