From: Silvan <dmm...@us...> - 2003-06-28 02:28:34
|
Quick question... I don't actually have any files with pitch bend events to play with, and my pitch wheel is broken, so I have to go on blind faith here. Looks like a Rosegarden::PitchBend::EventType would be encoded with tags for MSB and LSB and that I have to get() each of those, then put them together in order to get my number. How does that work? I know LSB/MSB is basically base 127 math, so I suppose LSB = 0x0A MSB = 0x7F Put them together and do I get 0x0A7F or do I get 0x7F0A? I can't remember what the bitwise shift operators are ( << is LSH ?), but I'm thinking the way to do this would be to declare an int, set it equal to MSB, left shift it over seven bits and add LSB to it. Or the other way around, depending on which of them is supposed to be where. (Yeah, I guess that kind of matters, doesn't it? :) Am I on the right track? Is there some handy dandy method I can use that I haven't found? It has been many, many years since I shifted any bits. Brings back memories of simpler days when men were men and ints were words, when you didn't use EAX and the other wide registers because most people wouldn't be able to run your programs, when you didn't spend two weeks working on making a goddamn dialog box look pretty.... -- Michael McIntyre USDA zone 6b in SW VA, USA Silvan <dmm...@us...> Linux Druid ----------[ registered Linux user #243621 ]--------- http://www.geocities.com/Paris/Rue/5407/index.html |