<div dir="ltr"><br><div class="gmail_extra">On Sat, Feb 10, 2018 at 7:48 PM, Martin Peach <span dir="ltr"><<a href="mailto:chakekatzil@gmail.com" target="_blank">chakekatzil@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span class="">On Sat, Feb 10, 2018 at 1:49 PM, tim vets <span dir="ltr"><<a href="mailto:timvets@gmail.com" target="_blank">timvets@gmail.com</a>></span> wrote:<br></span><div class="gmail_extra"><div class="gmail_quote"><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div>I seem to be getting closer<br></div>[255 81 3 $1 $2 $3( seems to do the trick, (the 3 was necessary to designate the 3 following bytes...)<br></div>still not sure why [255 81 3 7 161 32( does not result in 120bpm but "120qpm" and 80bpm...<br></div></div></div></blockquote><div><br></div></span><div>Probably because numbers greater than 127 must be formatted in 'variable-length quantity' form, where the number is broken up into 7-bit pieces and all the pieces except the last have the high bit set, so decimal 500000 in hex is 7A120, or in binary 1111010000100100000, becomes 
10011110 11000010 00100000, or

158 194 32 (if I didn't make any mistakes along the way). Using calculator in programmer mode is useful here.<br></div></div></div></div></blockquote><div><br></div><div>But for meta events, numbers are stored as is, in big-endian order, not as variable-length,, so [
<span class="gmail-">255 81 3 7 161 32</span> ( should work properly.<br><br>Martin<br><br></div></div></div></div>