Once I learned sed/awk/grep/sh I stopped writing C
code for
manipulating text files.
I just wrote something that kind of goes the other way - splits a binary
file into nybbles, with a checksum.
In this case, though, it's converting a sample into a sysex dump, so I
used libsndfile which takes care of endianness and bit depth - I only want
8-bit unsigned anyway, so I can load the sample as an array of floats,
apply crunching if necessary, and spit it back out as an unsigned char
with all the zeros stomped to 1 to get round a hardware weirdness.
Then all I need to do is tack a sysex header on the start and end, and
fire it out as pairs of nybbles with a 7-bit checksum at the end.
Bonus prize of a brand new LA36 ribbon if you can tell me, based on the
above description, what the program is used with.
Gordon.