expecting TRIPLE_DOT, found 'char'

edited March 2017 in Arduino

Hello. I am a processing noob and wanted to try out the Serial to MIDI processing sketch to work with my Arduino Uno. On running the code below, a TRIPLE_DOT error is generated at this line :

void MIDI_TX(unsigned char MESSAGE, unsigned char PITCH, unsigned char VELOCITY)

I've looked up all similar TRIPLE_DOT errors online but cannot seem to figure out what exactly might be going wrong with the code. Any advice would be much appreciated!

// BY: MARK DEMERS | May 2009
// DESCRIPTION: Demo sketch to play notes from middle C in the 4th octave up to B in the 5th octave and then back down.
// HOOK-UP:
// 1. Plug USB cable from Arduino into your computer.
// USAGE:
// 1. Install and Set-up Serial MIDI Converter from SpikenzieLabs
// 2. Open, compile, and upload this sketch into your Arduino.
// 3. Run Serial MIDI Converter in the background.
// 4. Launch your music software such as Garage Band or Ableton Live, choose a software instrument and listen to the music.

int note = 0;     

void setup() 
{
  Serial.begin(57600);                                       // Default speed of the Serial to MIDI Converter serial port
}

void loop() 
{

  for(int note=60; note<=83; note++)                        // Going Up
  {
    MIDI_TX(144,note,127);                                  // NOTE ON
    delay(100);

    MIDI_TX(128,note,127);                                  // NOTE OFF
    delay(100);
  }

  for(int note=82; note>=61; note--)                       // Coming Down
  {
    MIDI_TX(144,note,127);                                  // NOTE ON
    delay(250);

    MIDI_TX(128,note,127);                                  // NOTE OFF
    delay(250);
  }

}


void MIDI_TX(unsigned char MESSAGE, unsigned char PITCH, unsigned char VELOCITY) 
{
  Serial.print(MESSAGE);
  Serial.print(PITCH);
  Serial.print(VELOCITY);
}
Tagged:

Answers

  • Answer ✓

    Please edit your post, select your code and hit ctrl+o to format your code. Make sure there is an empty line above and below your code

    Also, this is Arduino code since you are using setup/loop functions. Processing uses setup/draw. Please refer to the porcessing.org website under reference, keyword draw().

    Kf

  • edited March 2017

    @NazC
    "tripple dot" is used in vararg functions, nothing you need to worry about

    I don't know about arduino but you don't use unsigned in java mode..
    Are you running it on arduino and getting this error?

  • Thank you for replying. Turns out i pasted arduino code in processor. Thanks to kfrajer for pointing that out. Works perfectly on arduino IDE. Many thanks!

Sign In or Register to comment.