How to send MIDI SysEx messages using MIDI library?

I would like to send a MIDI SysEx message like this to my Roland JX8P Synth.

F0 41 36 06 21 20 01 22 1B F7

This message would alter the VCF cutoff frequency of the synth. 1B is a variable hexadecimal value, swinging from 00 to 7F, relative to cutoff frequency.

In the MIDI library I've found the documentation for sending a SysEx message.

sendSysEx (int length, const byte *const array, bool ArrayContainsBoundaries=false)

From what I can tell bool ArrayContainsBoundaries specifies whether or not you want the library to include the F0 and F7 message start/stop tags (I don't so I'll set it to true). Int length denotes the message length in bytes(my message is 10 bytes, so this will be 10).

What I'm confused about is the array. Instead of storing all the values in the array can I just specify them like this?

MIDI.sendSysEx(10,0xF0 0x41 0x36 0x06 0x21 0x20 0x01 0x22 0x1B 0xF7,true);

Also, is adding the prefix 0x the correct way to specify the bytes here?

You can't construct an array "on the fly" like that, especially without any commas.

You want something like:

byte myArray [] = { 0xF0, 0x41, 0x36, 0x06, 0x21, 0x20, 0x01, 0x22, 0x1B, 0xF7 };

However I'm not sure how it knows how long the array is.

The 0x part is OK, if the bytes are in hex, rather than decimal.