realbasic-nug
[Top] [All Lists]

Re: Porting MIDI variable-length quantity C code to REALbasic

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Porting MIDI variable-length quantity C code to REALbasic
From: Philip Regan <pregan at mac dot com>
Date: Mon, 31 Jan 2005 12:47:18 -0500
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <20050131134101 dot 70830 dot qmail at web54108 dot mail dot yahoo dot com> <010fedd20330d6cf281b1c224c3b9cc4 at mac dot com>
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>

<Prev in Thread] Current Thread [Next in Thread>