Hi, Mark--
What you're saying is logical, so maybe double digits are just for
ease of reading in the book? I'll send the raw bits first, and if that
doesn't work, then I guess I'll know the answer to my question. Thanks!
--
Philip Regan
pregan at mac dot com
On 31 Jan 2005, at 08:41, Mark Nutter wrote:
--- Philip Regan <pregan at mac dot com> wrote:
Hi, Mark--
I put your methods into a simple app that displays
the values on
screen. it works great with no changes to the code.
My only question
is that I have to write these as hex values. The
requires double
digits for all hex values, and your method leaves
bytes less than 10
as only single digits. For example "0" is "0" and
not "00 as is shown
in the spec.
Can I just add an if..then statement to it to place
a leading digit to
any value less than 10 in the same way I would do
if it were a string?
That will make it display as double digits, but are
you sure that's what you want to do? Adding a zero is
only something you need to do when converting binary
data into a string (i.e. to display to the end user).
To write to a standard MIDI file or send to a MIDI
device, you should be sending the raw bytes, not
converted to a string. I may just be misunderstanding
what you are saying, but I thought I'd throw that out
as a caveat.
Mark
__________________________________
Do you Yahoo!?
Yahoo! Mail - Easier than ever with enhanced search. Learn more.
http://info.mail.yahoo.com/mail_250
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|