Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /storage/content/49/145849/famitracker.com/public_html/forum/classes/dbHandler.php on line 29
It's nice that we can manually input our envelopes and press enter instead of drawing them. It would be even nicer if we could input spaced byte values in hex and FamiTracker converts them to decimal. And if the value is greater than bitwise operations permit, it maxes out.
Currently non-"numeric"/decimal values are treated as "0" when input.
Reason?
Copy/paste of code-based envelopes from other engines and platforms or to accommodate coder minds.
$0F, $0f, $F and $f all represent 15 in MML (so do x0F, x0f, xF and xf).
_______________________
Follow me on [url=https://twitter.com/jrlepage2a03]Twitter.
I record (some) NSFs on hardware. Feel free to [url=http://www.famitracker.com/forum/posts.php?id=3633]request a hardware render.
"$" should process but spaced values with "0" in front would be nice as well. (If jrlepage says "x" is used, then that probably should parse/process as well.) What I'd really like to see is a string of bytes copy/pasted from a hex editor or a look-up table with assembler notation process from code. As long as the set doesn't have any carriage breaks I guess even "%" binary string lookups should be able to process into decimal as well. I believe this would add even more flexibility of use and smiles to your constituency.
Thank you for moving the thread. I didn't mean to make you spend the extra effort.
I don't think converting spaced values with 0 in front would be a good idea. I've used decimal values with a leading 0 in many of my MMLs (purely for the sake of avoiding misaligned volume envelopes in the MMLs), and I know of a couple graph-to-envelope conversion programs which add leading 0s to single-digit decimal values, too. At least with a prefix like '$' or 'x', you can be certain that the number that follows will be a hexadecimal value, something a leading 0 cannot guarantee.
_______________________
Follow me on [url=https://twitter.com/jrlepage2a03]Twitter.
I record (some) NSFs on hardware. Feel free to [url=http://www.famitracker.com/forum/posts.php?id=3633]request a hardware render.
Spaced values with x or 0x in front of them could certainly work, as 0x(...) is a common way of representing hexadecimal anyway.
_______________________
Where to find me:
YouTube: [url=http://youtube.com/user/stratelier]http://youtube.com/user/stratelier
DeviantArt: [url=http://stratadrake.deviantart.com/]http://stratadrake.deviantart.com/
0x<number> would work, yes. A leading 0 alone would introduce more problems than it would solve, though.
_______________________
Follow me on [url=https://twitter.com/jrlepage2a03]Twitter.
I record (some) NSFs on hardware. Feel free to [url=http://www.famitracker.com/forum/posts.php?id=3633]request a hardware render.
I guess what to keep in mind is how to keep copy/pasting simple without any or much editing or scripted conversion necessary. Most code already has the proper notation but as long as it's all parsed properly I don't see how all suggested forms of notation wouldn't be possible.
For instance, even if the values were hex alone and not even spaced -- directly copy/pasted from a binary -- as long as the array is an even number of nybbles, it could parse the whole array byte by byte without signs.
[quote=jrlepage]0x<number> would work, yes. A leading 0 alone would introduce more problems than it would solve, though.[/quote]
IIRC that's how VB.net treated Octal numbers, and yes it was confusing.
_______________________
Where to find me:
YouTube: [url=http://youtube.com/user/stratelier]http://youtube.com/user/stratelier
DeviantArt: [url=http://stratadrake.deviantart.com/]http://stratadrake.deviantart.com/
I've added '$' and 'x' for hex numbers. There are several other ways, 0x00 used by C/C++ or 00h for example, but I think MML compatibility would be sufficient here.
Nice. It would also be easy to do non-spaced hex values with just a single leading $ or x. That way even if the hex values do not contain numbers A-F Famitracker will still know to parse the array as hexadecimal. Also this leads to practically universal copy/paste of code and binary data.
Also, changing 0x00-formatted hex values to Famitracker-compatible hex values merely becomes a matter of running the envelope through search-and-replace in your text editor of choice at that point.
_______________________
Follow me on [url=https://twitter.com/jrlepage2a03]Twitter.
I record (some) NSFs on hardware. Feel free to [url=http://www.famitracker.com/forum/posts.php?id=3633]request a hardware render.