(Link to AcmlmWiki) Offline: thank ||bass
Register | Login
Views: 13,040,846
Main | Memberlist | Active users | Calendar | Chat | Online users
Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album
06-02-24 12:30 AM
0 users currently in Programming.
Acmlm's Board - I3 Archive - Programming - Sappy - exporting to .MID files
  
User name:
Password:
Reply:
 
Options: - -
Quik-Attach:
Preview for more options

Max size 1.00 MB, types: png, gif, jpg, txt, zip, rar, tar, gz, 7z, ace, mp3, ogg, mid, ips, bz2, lzh, psd

UserPost
Kyoufu Kawa
Posts: 901/1353
Too late

I found some VB code for this. Now I have other problems.
labmaster
Posts: 32/51

void putvar(val)
unsigned long val;
{
char subs[6];
int i;

i = 0;
while( val > 127 ) {
subs[i++] = 0x80 | ( val & 127 );
val >>= 7;
}
subs[i++] = 0x80 | ( val & 127 );
subs[0] &= 0x7f;
}


I haven't used a BASIC language for years, but surely you could magick that into VB? Which bit is causing you problems? (pun fully intentional :p). Instead of >> 7 you can always just divide by 2^7.
Kyoufu Kawa
Posts: 899/1353
I have downloaded several docs on the MIDI file format, and have tried this before, but there's one thing that prevents me from adding MIDI export functionality to Sappy 1.2.

Variable Length Values.

All the code I've seen is in C and too complex for me to convert to VB Classic. Any assistance would be cool.

Note: I intend to keep sequential buffers for each used track, two values per element. One value would be the raw, non-VLV delta time, the other would be the actual MIDI code. When saving, plonk down the header and iterate through each track buffer, converting the delta to VLV format, save that, and save the command.

My major concern is how to convert to VLV format in VB.
Acmlm's Board - I3 Archive - Programming - Sappy - exporting to .MID files


ABII

Acmlmboard 1.92.999, 9/17/2006
©2000-2006 Acmlm, Emuz, Blades, Xkeeper

Page rendered in 0.011 seconds; used 348.23 kB (max 382.07 kB)