Noob fail...

Hiyas!

I promise, I've tried digging into the online reference but just cannot seem to decipher this compile error.

/Users/robert/Documents/Arduino/libraries/ardumidi/ardumidi.cpp: In function 'void midi_command(byte, byte, byte, byte)':
/Users/robert/Documents/Arduino/libraries/ardumidi/ardumidi.cpp:59:47: error: expected primary-expression before ')' token
  Serial.print(command | (channel & 0x0F), byte);
                                               ^
/Users/robert/Documents/Arduino/libraries/ardumidi/ardumidi.cpp:60:34: error: expected primary-expression before ')' token
  Serial.print(param1 & 0x7F, byte);

The line being refereced in the error message is:

void midi_command(byte command, byte channel, byte param1, byte param2)
{
	Serial.print(command | (channel & 0x0F), byte);
	Serial.print(param1 & 0x7F, byte);
	Serial.print(param2 & 0x7F, byte);
}

Thanks in advance, for any help....

What does this print? What are you expecting?

void midi_command(byte command, byte channel, byte param1, byte param2)
{
	Serial.print(command | (channel & 0x0F));
	Serial.print(param1 & 0x7F);
	Serial.print(param2 & 0x7F);
}

Hello outsider

In :
Serial.print(command | (channel & 0x0F), byte);

what is the format "byte" ?

Regards,
bidouilleelec

There is no "byte" format, if you want to see the binary bits, try:

void midi_command(byte command, byte channel, byte param1, byte param2)
{
 Serial.print(command | (channel & 0x0F), BIN);
 Serial.print(param1 & 0x7F, BIN);
 Serial.print(param2 & 0x7F, BIN);
}

But that doesn't show leading zeros.

Hello outsider

outsider:
There is no "byte" format, if you want to see the binary bits, try:

In fact I wanted to answer to roblphlipps not to you.

Regards,
bidouilleelec

OOPS!, You CAN put a number after the comma for number of decimal places to print, but that's for floating point numbers.

Here is one of many ways to solve this, a more full featured printf library for the Serial object:

Note that this library requires a modern IDE (1.5.8 or later)

It is my understanding that the

Serial.print(aNumber, byte);

syntax was replaced some time ago by

Serial.write(aNumber);