---
title: "AppleMidi for Arduino"
url: "https://maker.wiznet.io/irina/projects/applemidi-for-arduino/"
markdown_url: "https://maker.wiznet.io/irina/projects/applemidi-for-arduino/md"
type: "UCC: User Created Content"
author: "ftrias"
author_url: "https://github.com/ftrias/Arduino-AppleMidi-Library"
editor: "WIZnet"
editor_url: "https://maker.wiznet.io/"
original_author: "ftrias"
original_url: "https://github.com/ftrias/Arduino-AppleMidi-Library"
published: "2023-04-17"
language: "en"
likes: 1
views: 196
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# AppleMidi for Arduino

> AppleMidi for Arduino

Original author: ftrias (source: https://github.com/ftrias/Arduino-AppleMidi-Library)

## Article

## AppleMidi for Arduino

The goal of this library is to enable an Arduino (with an Ethernet shield) or ESP8266 to particpate in an AppleMIDI session.

## Features

- Tested with AppleMIDI on Mac OS and using rtpMIDI from Tobias Erichsen on Windows

- Send and receive MIDI commands

- Uses callbacks to receive MIDI commands (no need for polling)

- Automatic instantiation of AppleMIDI object (see at the end of 'AppleMidi.h')

## Basic Usage

```plaintext
#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 and Arduino Ethernet don't have enough memory)

- ESP8266 (Adafruit HUZZAH ESP8266, Sparkfun ESP8266 Thing Dev)

- Teensy 3.2

- Adafruit Feather M0 WiFi - ATSAMD21 + ATWINC1500

## Network Shields

- Arduino Ethernet shield (arduino.cc, Wiznet W5100)

- Arduino Wifi R3 shield (arduino.cc)

- Teensy WIZ820io W5200

## Arduino IDE (arduino.cc)

- 1.8.0

## 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.

---

Source: https://maker.wiznet.io/irina/projects/applemidi-for-arduino/
