lathoub / Arduino-AppleMIDI-Library

Send and receive MIDI messages over Ethernet (rtpMIDI or AppleMIDI)
Other
306 stars 66 forks source link

unusual error. Trying to get my esp32 connected through Mac's Audio Midi Setup App #77

Closed rockomatthews closed 4 years ago

rockomatthews commented 4 years ago

When I try this example code after installing the library, I get the error message that follows. I used to be able to do this. I am concerned I have too many libraries or that the libraries are not in the proper place.... at the bottom is a picture of my library. I have tried uninstalling the IDE and reinstalling several times... just ones of my things when I'm learning something new. And I have no idea if I am freshly installing or not or what to delete (and where) beforehand.

#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.sendNoteOn(40, 55, 1);
}

WiFiClientBasic:3:35: error: macro "APPLEMIDI_CREATE_DEFAULT_INSTANCE" requires 3 arguments, but only 1 given APPLEMIDI_CREATE_DEFAULT_INSTANCE(); ^ exit status 1 macro "APPLEMIDI_CREATE_DEFAULT_INSTANCE" requires 3 arguments, but only 1 given

1
rockomatthews commented 4 years ago

Fixed it. I was saving the example sketch in a place that didn't recognize where AppleMIDI was. Also deleted anything in the Library within the arduino app