💾 Archived View for mirrors.apple2.org.za › archive › ground.icaen.uiowa.edu › Faqs › R011SNDFMTS.ht… captured on 2023-04-26 at 17:29:07.
⬅️ Previous capture (2023-01-29)
-=-=-=-=-=-=-
<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="Author" content="Rubywand"> <meta name="GENERATOR" content="Mozilla/4.75 [en] (Win95; U) [Netscape]"> <title>R011SNDFMTS Csa2 html</title> </head> <body> <address> <a NAME="top"></a><font color="#FFFFFF">.</font><font color="#666666"><font size=-1>The official Csa2 (comp.sys.apple2) Usenet newsgroup Apple II FAQs originate</font></font></address> <address> <font size=-1><font color="#666666"> from the</font> <b><font color="#009900">Gr</font><font color="#FF9900">o</font><font color="#FF0000">u</font><font color="#CC33CC">n</font><font color="#3366FF">d </font></b><font color="#666666">Apple II site. Ground Apple II administrator: Steve Nelson</font></font></address> <br><b><tt><font color="#FFFFFF"><font size=-2>.</font></font><font color="#666666">Csa2 FAQs-on-Ground Resource file: R011SNDFMTS.htm</font></tt></b> <br><b><font color="#FFFFFF"><font size=+2>. .<a href="A2FAQs1START.html"><img SRC="entrance.jpg" BORDER=0 height=14 width=69></a>..<a href="A2FAQs2CONTENT.html"><img SRC="contents.jpg" BORDER=0 height=14 width=67></a>.</font></font></b> <br> <br> <p><font face="Comic Sans MS"><font size=+1> AUDIO FILE FORMAT RESOURCE GUIDE (Version 1.1)</font></font> <p><tt> </tt><font face="Comic Sans MS"><font size=+1> by Dave Huizing</font></font> <br> <br> <p><tt>1 TABLE OF CONTENTS</tt> <p><tt>2 GENERAL INFORMATION</tt> <br><tt>2.1 Foreword</tt> <br><tt>2.2 Printed Version</tt> <br><tt>2.3 Copyrights</tt> <br><tt>2.4 Disclaimer</tt> <br><tt>2.5 Contributrors</tt> <br><tt>3 TX WAVE FORMAT</tt> <br><tt>4 YAMAHA TYPHOON WAVE FILE FORMAT</tt> <br><tt>4.1 DWVW v1.2 compression</tt> <br><tt>4.2 DWVW sample delta bit frame</tt> <br><tt>5 D009</tt> <br><tt>5.1 The D00 header</tt> <br><tt>5.2 The Instrument data</tt> <br><tt>5.3 The SpFX data</tt> <br><tt>5.4 The Arrangement data</tt> <br><tt>5.5 The Sequence data</tt> <br><tt>6 MIDI SAMPLE DUMP STANDARD</tt> <br><tt>6.1 INTRODUCTION</tt> <br><tt>6.2 SPEC: SAMPLE DUMP FORMATS</tt> <br><tt>6.3 SPEC: SAMPLE DUMP MESSAGES</tt> <br><tt>6.4 HANDSHAKING MESSAGES:</tt> <br><tt>6.5 DUMP PROCEDURE: MASTER (DUMP SOURCE)</tt> <br><tt>6.6 DUMP PROCEDURE: SLAVE (DUMP DESTINATION)</tt> <br><tt>6.7 SDS OVERVIEW</tt> <br><tt>7 ROL</tt> <br><tt>7.1 Structure of .ROL files</tt> <br><tt>7.2 Notes</tt> <br><tt>8 8SVX</tt> <br><tt>8.1 FORMblock [VHDR]</tt> <br><tt>8.2 FORMblock [BODY]</tt> <br><tt>9 AIFF</tt> <br><tt>10 AU</tt> <br><tt>11 FSM</tt> <br><tt>12 GF1 PATCH</tt> <br><tt>13 S3I</tt> <br><tt>14 UWF</tt> <br><tt>15 WAVE</tt> <br><tt>15.1 RiffBLOCK [data]</tt> <br><tt>15.2 RiffBLOCK [fmt ]</tt> <br><tt>15.3 RiffBLOCK [loop]</tt> <br><tt>16 ZYXEL</tt> <br><tt>17 CREATIVE LABS FILE FORMATS</tt> <br><tt>17.1 Sound Blaster Instrument File Format (SBI)</tt> <br><tt>17.2 Creative Music File Format (CMF)</tt> <br><tt>17.3 The CMF Instrument Block</tt> <br><tt>17.4 The CMF Music Block</tt> <br><tt>17.5 Sound Blaster Instrument Bank File Format (IBK)</tt> <br><tt>18 CREATIVE VOICE (VOC) FILE FORMAT</tt> <br><tt>19 REVISION HISTORY</tt> <br> <p><tt>2 General information</tt> <p><tt>2.1 Foreword</tt> <p><tt>I started to compile this document after I thought there was a need for</tt> <br><tt>it. By surfing all around the web I collected these descriptions and</tt> <br><tt>brought them to this document.I have planed to keep this document updated</tt> <br><tt>so if theres any file format description thats not in this document, or</tt> <br><tt>you have any comments on this document please send me an email message at:</tt> <br><tt>stallion@worldonline.nl.</tt> <p><tt>Happy developping,</tt> <p><tt>Dave Huizing</tt> <br> <br> <p><tt>2.2 Printed Version</tt> <p><tt>If you need a printed version send an email.</tt> <br> <p><tt>2.3 Copyrights</tt> <p><tt>Only the title and the compilation is copyrighted by Dave Huizing. As far</tt> <br><tt>as I know all this information is free for use. See the disclaimer part</tt> <br><tt>for more details. All trademarks, technical information and file</tt> <br><tt>extensions belong to their respectfull owners.</tt> <br> <p><tt>2.4 Disclaimer</tt> <p><tt>This document is provided on a as is base. The information has been</tt> <br><tt>verified as far as possible, but I cannot be held responsible for any</tt> <br><tt>problems caused by use or misuse of the information. All due I think I</tt> <br><tt>wont happen I am also not responseble for any damage to any knid of</tt> <br><tt>computer system after or while</tt> <br><tt>using parts form this documentation. Use this document on your own risk.</tt> <br> <p><tt>2.5 Contributrors</tt> <p><tt>Dave Huizing, stallion@worldonline.nl</tt> <br><tt>DJ, Producer, DTP designer, etc</tt> <p><tt>muki pakesch, mpakesch@t0.or.at</tt> <br><tt>Maintainer of the TX16W mailinglist</tt> <p><tt>Markus - Jvnsson , f93-maj@nada.kth.se</tt> <br><tt>Author of the Awave sample convertor</tt> <br> <p><tt>3 TX Wave Format</tt> <p><tt>The file consists of a 32 byte header followed by the actual waveform (the</tt> <br><tt>first 16 bytes only identifies the file type). In C syntax the header</tt> <br><tt>would look like this:</tt> <p><tt>char filetype[6] = "LM8953"</tt> <br> <p><tt>char nulls[10]</tt> <br> <p><tt>char dummy_aeg[6]</tt> <br><tt>space for the AEG (never mind this</tt> <p><tt>char format</tt> <br><tt>0x49 = looped, 0xC9 = non-looped</tt> <p><tt>char sample_rate</tt> <br><tt>1 = 33 kHz, 2 = 50 kHz, 3 = 16 kHz</tt> <p><tt>char atc_length[3]</tt> <br><tt>I'll get to this...</tt> <p><tt>char rpt_length[3]</tt> <br> <p><tt>char unused[2]</tt> <br><tt>set these to null, to be on the safe side</tt> <br> <p><tt>The "atc_length" and "rpt_length" fields are quite complex. First of all</tt> <br><tt>you should know that there is no such thing as a looping point in a TX</tt> <br><tt>wave. Instead a wave is split into two parts, the attack part and the</tt> <br><tt>repeat part (of course the actual wave data isn't split, this is just a</tt> <br><tt>logical definition). As you might guess, the attack part is played first</tt> <br><tt>and the repeat part is looped until the key is released. Each of these</tt> <br><tt>parts are limited to a maximum of 128k words in length. That is the reason</tt> <br><tt>why waves can't be longer than 256k words (4096 blocks).</tt> <p><tt>The length of a part is stored LSB first (Intel). And only the least</tt> <br><tt>significant _bit_ of the third byte (bit 0) is used (representing the most</tt> <br><tt>significant bit of the length). Are you confused yet? Then hold your</tt> <br><tt>breath. It seems that Yamaha has chosen to squeeze in the sample rate(!)</tt> <br><tt>of the wave in the unused _bits_ of these last bytes. Although they</tt> <br><tt>already have a separate byte for the sample rate, this isn't enough. I</tt> <br><tt>won't go into details on this now (or you would be even more confused).</tt> <br><tt>You only need to know that the possible values are:</tt> <p><tt> 0x06, 0x52 = 33 kHz</tt> <br><tt> 0x10, 0x00 = 50 kHz</tt> <br><tt> 0xF6, 0x52 = 16 kHz</tt> <p><tt>(The first value is located in byte three of "atc_length" and the second</tt> <br><tt>value is located in byte three of "rpt_length".) To wrap it up, this is</tt> <br><tt>the format of the two length fields on a bit level:</tt> <p><tt>[0]</tt> <br><tt>[1]</tt> <br><tt>[2]</tt> <p><tt>atc_length</tt> <br><tt>AAAAAAAA</tt> <br><tt>BBBBBBBB</tt> <br><tt>DDDDDDDC</tt> <p><tt>rpt_length</tt> <br><tt>EEEEEEEE</tt> <br><tt>FFFFFFFF</tt> <br><tt>HHHHHHHG</tt> <br> <p><tt>A</tt> <br><tt> LSB of the attack length</tt> <p><tt>B</tt> <br><tt> MSB of the attack length (except for one bit)</tt> <p><tt>C</tt> <br><tt> the utterly most significant _bit_ of the attack length</tt> <p><tt>D</tt> <br><tt> the first value of the magic sample rate constant (0x06, 0x10 or 0xF6)</tt> <p><tt>E</tt> <br><tt> LSB of the repeat length</tt> <p><tt>F</tt> <br><tt> MSB of the repeat length (except for one bit)</tt> <p><tt>G</tt> <br><tt> the utterly most significant _bit_ of the repeat length</tt> <p><tt>H</tt> <br><tt> the second value of the magic sample rate constant (0x52, 0x00)</tt> <br> <p><tt>Now for the most important (and probably most interesting) part. The</tt> <br><tt>waveform data. As you certainly know the TX uses 12-bit sampling</tt> <br><tt>resolution, and this requires some kind of encoding if we are not willing</tt> <br><tt>to waste one fourth of our disk space. Yamaha has chosen to group the</tt> <br><tt>samples two by two, making three bytes of data in the file for each pair.</tt> <br><tt>I'll illustrate this on a bit level (as with the lengths above):</tt> <br> <p><tt>AA CD BB</tt> <p><tt>A</tt> <br><tt> MSB of the first sample</tt> <p><tt>B</tt> <br><tt> MSB of the second sample</tt> <p><tt>C</tt> <br><tt> least significant nybble (oh, is that the correct spelling?) of the first</tt> <br><tt>sample</tt> <p><tt>D</tt> <br><tt> least signiticant nybble of the second sample</tt> <br> <p><tt>4 Yamaha Typhoon wave file format</tt> <p><tt>This specification describes the compression algorithm for Typhoon format</tt> <br><tt>waves. It does not cover the file format, which is AIFF-C. The</tt> <br><tt>documentation for AIFF-C is available at the site ftp.sgi.com in the</tt> <br><tt>directory /sgi/aiff-c.9.26.91.ps.Z (compressed Postscript file).</tt> <p><tt>4.1 DWVW v1.2 compression</tt> <p><tt>DWVW was invented 1991 by Magnus Lidstrom and is copyright 1993 by NuEdge</tt> <br><tt>Development. You have the right to use the algorithm freely as long as you</tt> <br><tt>make no false claims on its origin. DWVW is a lossless (or bit faithful)</tt> <br><tt>compression method for digital audio data. Lossless means that the exact</tt> <br><tt>original data will be preserved when compressing and decompressing.</tt> <p><tt>The compression utilize the fact that the delta between the sample points</tt> <br><tt>is generally less than the full dynamic width. Each sample point is</tt> <br><tt>subtracted from the previous one and the difference is enthropy encoded in</tt> <br><tt>a special format. Therefore the compression works best on low frequency</tt> <br><tt>sounds with low noise ratio, where the difference between each sample is</tt> <br><tt>small.</tt> <p><tt>DWVW can be applied on samples of any bit resolution and with any number</tt> <br><tt>of channels. As opposed to AIFF standard, sample bits are not "left</tt> <br><tt>justified". Instead the necessary translation should be done when</tt> <br><tt>decompressing. Also, while AIFF interleaves multichannel sounds, DWVW</tt> <br><tt>doesn't as this complicates compression and decompression.</tt> <p><tt>Each channel follows one another with only a slight break in the bit run.</tt> <br><tt>The first delta for each channel should be put at an even 16-bit word</tt> <br><tt>position. The encoding stores the delta points with only as many bits as</tt> <br><tt>is required (hence the name "variable word width").</tt> <p><tt>Thus, the number of bits used by each delta has to be stored as well.</tt> <br><tt>Since this count varies very little we apply a (simpler) delta encoding on</tt> <br><tt>this information.</tt> <p><tt>To wrap it up, each compressed sample point consists of two values: the</tt> <br><tt>delta from the last sample and the difference in word width of this delta</tt> <br><tt>from the last delta (hereby referred to as "the WWM" - the word width</tt> <br><tt>modifier).</tt> <p><tt>Even though the word width modifier is stored first in each delta frame we</tt> <br><tt>will describe the delta information first. The delta is always stored as</tt> <br><tt>an absolute difference (i.e. unsigned) in a varible number of bits. An</tt> <br><tt>extra bit follows that tells the sign (if the delta isn't zero). The</tt> <br><tt>number of bits required for the delta (i.e. the word width) is decided by</tt> <br><tt>the position of the most significant high bit in the absolut value. One</tt> <br><tt>bit less than this is actually stored since the first bit is always high.</tt> <p><tt>For instance, the delta 11 (binary 1011) has a required word width of four</tt> <br><tt>bits ,but only the least significant three bits are stored. A zero delta</tt> <br><tt>will have a zero word width and consequently requires neither delta bits</tt> <br><tt>nor sign bit. A delta of one will require only a sign bit.</tt> <p><tt>One special case requires attention. A normal two's complement number's</tt> <br><tt>lowest negative number is one less than the highest positive number.</tt> <br><tt>Treating zero as a positive value this gives exactly as many negative as</tt> <br><tt>positive numbers. The delta encoding on the other hand does not consider</tt> <br><tt>zero to be of any sign and does therefore not include the one extra</tt> <br><tt>negative value. If this value is encountered in the delta stream it is</tt> <br><tt>encoded as one greater than it actually is (putting it within the</tt> <br><tt>expressable range of values).</tt> <p><tt>To distinguish it from the next lowest value one extra bit is inserted</tt> <br><tt>after the sign bit. The bit is high for the lowest value and low for the</tt> <br><tt>next lowest value.</tt> <p><tt>For example, a 16-bit two's complement number can be -32768. It would be</tt> <br><tt>encoded as negative 32767 with an extra high bit. The value - 32767 would</tt> <br><tt>also be encoded as negative 32767 but with the extra bit low. Of course,</tt> <br><tt>only these two values require the extra bit.</tt> <p><tt>The WWM preceeds the delta bits. It is encoded as a series of low bits (0)</tt> <br><tt>terminated by a high bit (1) (in most cases). The count of low bits tells</tt> <br><tt>the modifier amount. If the modifier isn't zero an extra bit follows that</tt> <br><tt>tells the modifier sign. A high bit means negative modifier. Word width</tt> <br><tt>"wraps" at the used bit resolution (new-width =3D (original-width +</tt> <br><tt>modifier) modula bit- resolution).</tt> <p><tt>This enables us to go from a small width to a large width by using a</tt> <br><tt>negative modifier. Because of this fact a WWM will never need to be larger</tt> <br><tt>than the sound bit resolution divided by two (rounded downwards). If the</tt> <br><tt>modifier is the maximum the terminating high bit would be superfluous, so</tt> <br><tt>in this case it isn't inserted. (However; the sign bit is always included,</tt> <br><tt>even if the bit resolution is even.)</tt> <p><tt>For encoding the current word width and sample value should be initially</tt> <br><tt>reset to zero for each channel (the first delta will thus be the sample</tt> <br><tt>value). A compressed channel always starts on an even 16-bit word</tt> <br><tt>boundary. Notice that the highest possible compression ratio is eight</tt> <br><tt>times, i.e. one bit per sample. This occurs when the source is continous</tt> <br><tt>series of zero samples.</tt> <br> <p><tt>4.2 DWVW sample delta bit frame:</tt> <p><tt>0...</tt> <br><tt>WWM is the count of low bits (can be none)</tt> <p><tt>1</tt> <br><tt>terminating high bit (if not max W=WM)</tt> <p><tt>ms</tt> <br><tt>WWM sign, high is negative (only on non-zero WWM)</tt> <p><tt>delta</tt> <br><tt>(word width - 1) sample delta bits (if delta 1)</tt> <p><tt>sb</tt> <br><tt>delta sign bit (only on non-zero delta)</tt> <p><tt>xb</tt> <br><tt>extra bit (only on lowest and next lowest possible delta value)</tt> <br> <p><tt>Some encoding examples (the examples all represent extreme situations with</tt> <br><tt>unusually poor</tt> <br><tt>compression):</tt> <br><tt>Bit resolution</tt> <br><tt> 16</tt> <p><tt>Delta</tt> <br><tt> 923 (bin 00000011 10011011=)</tt> <p><tt>Current width</tt> <br><tt> 1</tt> <p><tt>New width</tt> <br><tt> 10</tt> <p><tt>Modifier</tt> <br><tt> -7 (mod 16 =3D 10)</tt> <p><tt>Yields</tt> <br><tt> 0000000 1 1 110011011 0</tt> <br> <p><tt>Bit resolution</tt> <br><tt> 12</tt> <p><tt>Delta</tt> <br><tt> -2048 (bin 1000 00000000)</tt> <p><tt>Current width</tt> <br><tt> 0</tt> <p><tt>New width</tt> <br><tt> 11</tt> <p><tt>Modifier</tt> <br><tt> -1 (mod 12 =3D 11)</tt> <p><tt>Yields</tt> <br><tt> 0 1 1 1111111111 1 1</tt> <br><tt>(-2048 is encoded as 2047 with extra bit and negative high)</tt> <br> <p><tt>Bit resolution</tt> <br><tt> 8</tt> <p><tt>Delta</tt> <br><tt> -12 (bin 11110100, negated 00001100)</tt> <p><tt>Current width</tt> <br><tt> 0</tt> <p><tt>New width</tt> <br><tt> 4</tt> <p><tt>Modifier</tt> <br><tt> +4</tt> <p><tt>Yields</tt> <br><tt> 0000 0 100 1 (no terminating bit for WWM)</tt> <br> <p><tt>5 D00</tt> <p><tt>This part describes the D00 music format (used by the AdLib player v4.01</tt> <br><tt>coded by JCH/Vibrants) in more detail than the docs of EdLib (the</tt> <br><tt>respective tracker, also coded by JCH) do. This document assumes that you</tt> <br><tt>already own EdLib and have some experience with it. Also, the availability</tt> <br><tt>of the EdLib docs as well as of the docs for the player included with</tt> <br><tt>EdLib is assumed. You should know some basics about AdLib programming and</tt> <br><tt>data formats (byte, word etc.) as well as the EdLib structures</tt> <br><tt>(Instruments, SpFX etc.) and with hexadecimal notation.</tt> <br> <p><tt>5.1 The D00 header</tt> <p><tt>A description of the D00 header can be found in the player's docs. So I</tt> <br><tt>won't show it again here. But JCH gives very cryptic names to the other</tt> <br><tt>file structures, so I'll call them differently:</tt> <p><tt>JCH's names</tt> <br><tt> My names</tt> <p><tt>TPoin tables</tt> <br><tt> Arrangment data</tt> <p><tt>SeqPointer tables</tt> <br><tt> Sequence data</tt> <p><tt>Instrument data</tt> <br><tt> Instrument data</tt> <p><tt>DataInfo text</tt> <br><tt> Song description</tt> <p><tt>Special tables</tt> <br><tt> SpFX data</tt> <br> <p><tt>Also, I should mention that all the pointers to these tables are meant</tt> <br><tt>relative to the beginning of the D00 file.</tt> <br> <p><tt>5.2 The Instrument data</tt> <p><tt>The instrument data simply consists of all instruments used in the song.</tt> <br><tt>Since the number of instruments is stored nowhere inside the file, loaders</tt> <br><tt>should the start offset of the next structure for determining if they have</tt> <br><tt>read enough data. The data for each instrument consists of 16 bytes, which</tt> <br><tt>occur in the same order as the corresponding bytes in the EdLib Instrument</tt> <br><tt>table:</tt> <p><tt> xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx</tt> <br><tt> +------------+ +------------+ & & & & & &</tt> <br><tt> Carrier data Modulator data & & & & +---Unused</tt> <br><tt> & & & +Hard restart SR value</tt> <br><tt> & & +Hard restart timer</tt> <br><tt> & +Fine-tune</tt> <br><tt> +AM/FM + Feedback</tt> <p><tt>For the exact meaning of these bytes, read the EdLib manual. Note that in</tt> <br><tt>the Carrier and Modulator data the ADSR parts are not stored</tt> <br><tt>word-oriented, but byte-oriented. That means, they aren't stored as a word</tt> <br><tt>whose High byte is the AD part and whose Low byte is the SR part (although</tt> <br><tt>the display in EdLib creates that assumption).</tt> <p><tt>Instead they're simply stored as two bytes of which the first one's the AD</tt> <br><tt>part and the second one's the SR part. 5.3 The SpFX data The SpFX data ist</tt> <br><tt>stored more or less like the Instrument data, but one single table entry</tt> <br><tt>consists of only 8 bytes arranged like this:</tt> <p><tt> xxxx xx xx xx xx xxxx (note xx's are BYTES and xxxx's are WORDS!)</tt> <br><tt> & & & & & &</tt> <br><tt> & & & & & +Pointer to next SpFX entry</tt> <br><tt> & & & & +Duration of SpFX entry in Frames</tt> <br><tt> & & & +Modulator Level add</tt> <br><tt> & & +New Modulator level</tt> <br><tt> & +Note add value</tt> <br><tt> +Instrument to use</tt> <p><tt>Again, to really understand the meaning of these parts, you should read</tt> <br><tt>the EdLib docs.</tt> <br> <p><tt>5.4 The Arrangement data</tt> <p><tt>The arrangement data determines which sequence is to be played on which</tt> <br><tt>channel at which moment and in which way, if you understand what I mean :)</tt> <br><tt>It consists of two parts: The Pointer part and the Data part (I simply</tt> <br><tt>call them that way now :). The Pointer part consists of 16 word pointers</tt> <br><tt>and one endmark (all endmarks are FFFFh, by the way). Only the first nine</tt> <br><tt>pointers are used at the moment: one for each one of the nine AdLib</tt> <br><tt>channels. Each one of these nine pointers points to the part of the Data</tt> <br><tt>part which belongs to its channel. The Data part consists, as you'd have</tt> <br><tt>guessed before, of nine independent arrangement streams. Each one of tese</tt> <br><tt>streams has the following format:</tt> <p><tt>First comes a word telling the speed of that stream. Since this</tt> <br><tt>information is stored at the beginning of EVERY stream, I assume that</tt> <br><tt>every channel may have its own unique speed, and EdLib simply doesn't</tt> <br><tt>support this.</tt> <p><tt>After that, the real arrangement data is stored. This data is organized</tt> <br><tt>like this: If a word below 8000h is read, it's the number of a sequence to</tt> <br><tt>be played. In that case, the saved transpose data is used.</tt> <p><tt>But if a word 8XYYh is read, with X and YY being any value, the transpose</tt> <br><tt>data is updated to X and YY (see the EdLib docs for information on the</tt> <br><tt>meaning of X and YY).</tt> <p><tt>I have found out that the first arrangement entry for an arrangement</tt> <br><tt>stream that contains at least one sequence is always such a command to set</tt> <br><tt>the</tt> <br><tt>internal transpose data. So no default value is required to be loaded into</tt> <br><tt>the transpose data before playing. And looping the arrangement stream</tt> <br><tt>becomes easier.</tt> <p><tt>If the word FFFFh is read, the arrangement stream has arrived at its</tt> <br><tt>looping point. The word following the FFFFh is an offset into the</tt> <br><tt>arrangement stream telling at which position the stream should be</tt> <br><tt>restarted. If the word FFFEh is read, the arrangement stream has reached</tt> <br><tt>its end. Unlike the Loop command (FFFFh), the stream mustn't get restarted</tt> <br><tt>but halted. Also, there is no word following the FFFEh command.</tt> <br> <p><tt>5.5 The Sequence data</tt> <p><tt>The Sequence data again consists of a pointer part and a data part. But</tt> <br><tt>this time these two parts aren't stored in different parts of the file,</tt> <br><tt>the data part is stored directly after the pointer part. Therefore, a</tt> <br><tt>reference to a specific pattern should be seen as a reference to a word</tt> <br><tt>counted from the beginning of the Sequence data.</tt> <p><tt>This word (e.g. the first word for Pattern 0000h) then points to the</tt> <br><tt>offset of the actual sequence data inside the file. I hope you got my</tt> <br><tt>point... Then, each sequence is stored as follows: Read a word. If it's</tt> <br><tt>high byte is below 20h, then it's a note. Note that RESTs and HOLDs are</tt> <br><tt>also counted as notes. In this case, the low byte can contain the</tt> <br><tt>following values:</tt> <p><tt>00h = REST</tt> <br><tt>The high byte tells the number of rests to insert minus one! e.g. a REST</tt> <br><tt>with a high byte of 01h means "Two RESTs"</tt> <p><tt>01h - 7Dh = Note</tt> <br><tt>The value of this note byte tells the amount of halfnotes to add to C-0</tt> <br><tt>(e.g. 01h would mean C#0). In this case, the high byte tells the number of</tt> <br><tt>HOLDs to insert after the note.</tt> <p><tt>7Fh = HOLD</tt> <br><tt>The high byte tells the number of HOLDs minus one again!</tt> <p><tt>If the high byte is 20h or above, but below 40h, it's a note again, but</tt> <br><tt>this time with Tienote switched on. The high word is used as repetition</tt> <br><tt>count again, but don't forget to substract 20h before evaluating it!!</tt> <br><tt>If the high bzte is 40h or above, it's an effect. In this case, the</tt> <br><tt>complete word can simply be interpreted like any EdLib effect (set</tt> <br><tt>instrument, set volume etc.). See the EdLib docs for a list of them.</tt> <p><tt>The note word this effect refers to follows directly after the ceffect</tt> <br><tt>word.</tt> <br><tt>If the read word is FFFFh, it indicates the end of that sequence. In that</tt> <br><tt>case, the next sequence to be played should be determined and loaded and</tt> <br><tt>the first effect/note of it should be played.</tt> <br> <p><tt>6 MIDI SAMPLE DUMP STANDARD</tt> <p><tt>6.1 INTRODUCTION</tt> <p><tt>The MIDI SDS was adopted in January 1986 by the MIDI</tt> <br><tt>Manufacturers Association and the Japanese MIDI Standards Committee. The</tt> <br><tt>SDS defines the standard method for transfer of sound sample data</tt> <br><tt>between MIDI-equipped devices. Sample dumps may be accomplished with</tt> <br><tt>either an 'open loop' or 'closed loop' system.</tt> <p><tt>The open loop method simply involves the straight dump of all sample data</tt> <br><tt>from its source to the destination, with no timeouts, packet</tt> <br><tt>acknowledgements, or any other form of handshaking, much as in the manner</tt> <br><tt>of a sysex bulk dump, usually intiated at the source.</tt> <p><tt>The closed loop method allows the use of handshaking messages between the</tt> <br><tt>dump source and destination, and usually places the dump process</tt> <br><tt>under the control of the slave, to allow it time to process the incoming</tt> <br><tt>data as necessary. As with any standard, it can not be assumed that a</tt> <br><tt>device adheres to it unless the accompanying documentation specifically</tt> <br><tt>indicates it. Even then, it is best to check its conformity with</tt> <br><tt>non-critical data.</tt> <br> <p><tt>6.2 SPEC: SAMPLE DUMP FORMATS</tt> <p><tt>DUMP HEADER: F0 7E cc 01 ss ss ee ff ff ff gg gg gg hh hh hh ii ii ii jj</tt> <br><tt>F7</tt> <p><tt>cc</tt> <br><tt>channel number</tt> <p><tt>ss ss</tt> <br><tt>sample number (LSB first)</tt> <p><tt>ee</tt> <br><tt>sample format (number of significant bits; 8->28)</tt> <p><tt>ff ff ff</tt> <br><tt>sample period (1/sample rate) in nanoseconds (LSB first)</tt> <p><tt>gg gg gg</tt> <br><tt>sample length, in words</tt> <p><tt>hh hh hh</tt> <br><tt>sustain loop start point (word number) (LSB first)</tt> <p><tt>ii ii ii</tt> <br><tt>sustain loop end point (word number) (LSB first)</tt> <p><tt>jj</tt> <br><tt>loop type (00:forwards only; 01:alternating)</tt> <br> <br> <p><tt>DATA PACKET: F0 7E cc 02 kk <120 bytes> mm F7</tt> <p><tt>cc</tt> <br><tt>channel number</tt> <p><tt>kk</tt> <br><tt>running packet count (00->7F)</tt> <p><tt>mm</tt> <br><tt>checksum (XOR of 7E, cc, 02, kk <120 bytes>)</tt> <br> <p><tt>The total size of a data packet is 127 bytes. This is to avoid overflow</tt> <br><tt>of the MIDI input buffer of a device that may want to receive an entire</tt> <br><tt>packet before processing it. A data packet consists of its own header, a</tt> <br><tt>packet number, 120 bytes of data, a checksum, and an EOX. The packet</tt> <br><tt>number begins at 00 and increments with each new packet. It resets to 00</tt> <br><tt>after it reaches 7F, and continues counting.</tt> <p><tt>The packet number is used by the receiver to distinguish between a new</tt> <br><tt>data packet, or a resend of a previous packet. The packet number is</tt> <br><tt>followed by 120 bytes of data, which form 60, 40, or 30 words (MSB first</tt> <br><tt>for multiword samples), depending on the length of a single data sample.</tt> <br><tt>Each data byte hold seven bits, with the msb in each byte set to 0, in</tt> <br><tt>order to conform to the requirements of MIDI data transmission.</tt> <br><tt>Information is left justified within the 7-bit bytes, and unused bits are</tt> <br><tt>filled with 0. Example: Assume a data point in the memory of a 16-bit</tt> <br><tt>sampler, with the value 87E5. In binary, that would be:</tt> <p><tt>1000 0111 1110 0101</tt> <p><tt>and would be encoded as the following MIDI data stream:</tt> <p><tt>01000011 01111001 00100000</tt> <p><tt>The checksum is the running XOR of all the data after the SYSEX byte, up</tt> <br><tt>to but not including the checksum itself.</tt> <br> <p><tt>6.3 SPEC: SAMPLE DUMP MESSAGES</tt> <p><tt>DUMP REQUEST: F0 7E cc 03 ss ss F7</tt> <p><tt>cc</tt> <br><tt> channel number</tt> <p><tt>ss ss</tt> <br><tt> sample number requested (LSB first)</tt> <p><tt>Upon receiving the request, the sampler checks the sample number to see</tt> <br><tt>if it is within legal range. If it is not, the request is ignored.</tt> <br><tt>If it is, the sample dump is started. One packet at a time is sent, under</tt> <br><tt>control of the handshaking messages outlined below.</tt> <br> <p><tt>6.4 HANDSHAKING MESSAGES:</tt> <p><tt>For all below:</tt> <br><tt>cc</tt> <br><tt>channel number</tt> <p><tt>pp</tt> <br><tt>packet number</tt> <p><tt>Packet numbers are included in the handshaking messages to</tt> <br><tt>accomodate machines that have the intelligence to re-transmit specific</tt> <br><tt>packets after an entire dump is finished, or if synchronization is</tt> <br><tt>lost.</tt> <p><tt>ACK</tt> <br><tt>F0 7E cc 7F pp F7</tt> <p><tt>Means last packet was recieved correctly (checksum OK, etc), please</tt> <br><tt>send next one. Packet number is packet being acknowledged as correct.</tt> <p><tt>NAK</tt> <br><tt>F0 7E cc 7E pp F7</tt> <p><tt>Means last packet not received correctly, please send again. Packet</tt> <br><tt>number is packet being rejected.</tt> <p><tt>CANCEL</tt> <br><tt>F0 7E cc 7D pp F7</tt> <p><tt>Means abort dump immediately. Packet number is packet on which abort</tt> <br><tt>occurs.</tt> <p><tt>WAIT</tt> <br><tt>F0 7E cc 7C pp F7</tt> <p><tt>Means pause dump indefinitely, until next message is sent. Allows the</tt> <br><tt>unit recieving the dump to perform other functions (disk access, etc),</tt> <br><tt>before receiving the remainder of the dump. The next message it sends (eg</tt> <br><tt>ACK, ABORT) will determine if the dump continues or aborts.</tt> <br> <p><tt>6.5 DUMP PROCEDURE: MASTER (DUMP SOURCE)</tt> <p><tt>Once a dump has been requested, either via MIDI or through the front</tt> <br><tt>panel, the DUMP HEADER is sent.</tt> <p><tt>After sending the header, the master must time out for at least two</tt> <br><tt>seconds, to allow the receiver to decide if it will accept this sample</tt> <br><tt>(has enough memory, etc).If it receives a CANCEL, within this time,</tt> <br><tt>it should abort immediately.</tt> <p><tt>If it receives an CAK, it will start sending packets immediately. If it</tt> <br><tt>receives a WAIT, it pauses until another message is received, and then</tt> <br><tt>processes that mesage normally. If nothing is recieved within the</tt> <br><tt>timeout, an open loop is assumed, and the dump starts with the first</tt> <br><tt>packet.</tt> <br><tt>After sending each packet, the master should time out for at least 20</tt> <br><tt>milliseconds and watch its MIDI In.</tt> <p><tt>If an ACK is received, it sends the next packet immediately. If it</tt> <br><tt>receives an NAK, and the packet number matches the number of the last</tt> <br><tt>packet sent, it resend that packet If the packet numbers don't</tt> <br><tt>match, and</tt> <br><tt>the device is incapable of sending packets out of order, the NAK will be</tt> <br><tt>ignored.</tt> <p><tt>If a WAIT is received, the master should watch its MIDI In port</tt> <br><tt>indefinitely for another ACK, NAK, or CANCEL message, which it should</tt> <br><tt>then process normally.</tt> <p><tt>If no messages are received within 20 milliseconds of the</tt> <br><tt>transmission of a packet, the master may assume an open loop</tt> <br><tt>configuration, and send the next packet.</tt> <p><tt>This process continues until there are less than 121 data bytes to send.</tt> <br><tt>The final packet will still consist of 120n bytes, regardless of how</tt> <br><tt>many significant bytes actually remain, and the unused bytes will be</tt> <br><tt>filled with zeroes. The receiver should handshake after receiving</tt> <br><tt>the last packet.</tt> <br> <p><tt>6.6 DUMP PROCEDURE: SLAVE (DUMP DESTINATION)</tt> <p><tt>When receiving a sample dump, a device should keep a running checksum</tt> <br><tt>during reception. If its checksum matches the checksum in the data</tt> <br><tt>packet, it will send an ACK and wait for the next packet.</tt> <p><tt>If it does not match, it will send an NAK containing the number of</tt> <br><tt>the packet that caused the error, and wait for the next packet. If, after</tt> <br><tt>sending an NAK, the packet number of the next packet doesn't match the</tt> <br><tt>previous packet number (the one that was NAK'd), and the unit is not</tt> <br><tt>capable of accepting packets out of order, the error is ignored and the</tt> <br><tt>dump continues as if the checksums had matched.</tt> <p><tt>If a receiver runs out of memory before the dumpo is completed, it should</tt> <br><tt>send a CANCEL to stop the dump.</tt> <br> <p><tt>6.7 SDS OVERVIEW</tt> <p><tt>DUMP DATA FORMAT: DUMP HEADER</tt> <p><tt>Sysex</tt> <p><tt>ID: Universal Non-Real Time</tt> <p><tt>Channel Number</tt> <p><tt>Sub ID: Header</tt> <p><tt>Sample Number (2 bytes, LSB first)</tt> <p><tt>Sample Format</tt> <p><tt>Sample Period (3 bytes, LSB first)</tt> <p><tt>Sample Length (3 bytes, LSB first)</tt> <p><tt>Sustain Loop Start Point (3 bytes, LSB first)</tt> <p><tt>Sustain Loop End Point (3 bytes, LSB first)</tt> <p><tt>Loop Type</tt> <p><tt>Eox</tt> <br> <p><tt>SAMPLE DUMP DATA FORMAT: DATA PACKET</tt> <p><tt>Sysex</tt> <p><tt>ID: Universal Non-Real Time</tt> <p><tt>Channel Number</tt> <p><tt>Sub ID: Data Packet</tt> <p><tt>Packet Number</tt> <p><tt>Sample Data (120 bytes)</tt> <p><tt>Checksum</tt> <p><tt>Eox</tt> <br> <p><tt>SAMPLE DUMP MESSAGES: DUMP REQUEST</tt> <p><tt>Sysex</tt> <p><tt>ID: Universal Non-Real Time</tt> <p><tt>Channel Number</tt> <p><tt>Sub ID: Dump Request</tt> <p><tt>Sample Number (2 bytes, LSB first)</tt> <p><tt>Eox</tt> <br> <p><tt>SAMPLE DUMP MESSAGES: HANDSHAKING FLAGS:</tt> <p><tt>Sysex</tt> <p><tt>ID: Universal Non-Real Time</tt> <p><tt>Channel Number</tt> <p><tt>Sub ID: ACK or NAK or CANCEL or WAIT</tt> <p><tt>Packet Number</tt> <p><tt>Eox</tt> <br> <p><tt>7 ROL</tt> <p><tt>This part contains details of .ROL files used by AdLib and compatible</tt> <br><tt>cards on PC It is also used by Visual Composer (TM).</tt> <p><tt>7.1 Structure of .ROL files:</tt> <p><tt>fld #</tt> <br><tt>size</tt> <br><tt>(bytes)</tt> <br><tt>type</tt> <br><tt>description</tt> <p><tt>1</tt> <br><tt>2</tt> <br><tt>int</tt> <br><tt>file version, major</tt> <p><tt>2</tt> <br><tt>2</tt> <br><tt>int</tt> <br><tt>file version, minor</tt> <p><tt>3</tt> <br><tt>40</tt> <br><tt>char</tt> <br><tt>unused</tt> <p><tt>4</tt> <br><tt>2</tt> <br><tt>int</tt> <br><tt>ticks per beat</tt> <p><tt>5</tt> <br><tt>2</tt> <br><tt>int</tt> <br><tt>beats per measure</tt> <p><tt>6</tt> <br><tt>2</tt> <br><tt>int</tt> <br><tt>editing scale (Y axis)</tt> <p><tt>7</tt> <br><tt>2</tt> <br><tt>int</tt> <br><tt>editing scale (X axis)</tt> <p><tt>8</tt> <br><tt>1</tt> <br><tt>char</tt> <br><tt>unused</tt> <p><tt>9</tt> <br><tt>1</tt> <br><tt>char</tt> <br><tt>0 = percussive mode</tt> <br><tt>1 = melodic mode</tt> <p><tt>10</tt> <br><tt>90</tt> <br><tt>char</tt> <br><tt>unused</tt> <p><tt>11</tt> <br><tt>38</tt> <br><tt>char</tt> <br><tt>filler</tt> <p><tt>12</tt> <br><tt>15</tt> <br><tt>char</tt> <br><tt>filler</tt> <p><tt>13</tt> <br><tt>4</tt> <br><tt>float</tt> <br><tt>basic tempo</tt> <br> <p><tt>Field 14 indicates the number of times to repeat fields 15 and 16:</tt> <br><tt>fld #</tt> <br><tt>size</tt> <br><tt>type</tt> <br><tt>description (bytes)</tt> <p><tt>14</tt> <br><tt>2</tt> <br><tt>int</tt> <br><tt>number of tempo events</tt> <p><tt>15</tt> <br><tt>2</tt> <br><tt>int</tt> <br><tt>time of events, in ticks</tt> <p><tt>16</tt> <br><tt>4</tt> <br><tt>float</tt> <br><tt>tempo multiplier (0.01 - 10.0)</tt> <br> <p><tt>The remaining fields (17 to 34) are to be repeated for each of 11 voices:</tt> <br><tt>fld #</tt> <br><tt>size</tt> <br><tt>type</tt> <br><tt>description (bytes)</tt> <p><tt>17</tt> <br><tt>15</tt> <br><tt>char</tt> <br><tt>filler</tt> <p><tt>18</tt> <br><tt>2</tt> <br><tt>int</tt> <br><tt>time (in ticks) of last note +1</tt> <br> <p><tt>Repeat the next two fields (19 and 20) while the summation of field 20 is</tt> <br><tt>less than the value of field 18:</tt> <br><tt>fld #</tt> <br><tt>size</tt> <br><tt>type</tt> <br><tt>description (bytes)</tt> <p><tt>19</tt> <br><tt>2</tt> <br><tt>int</tt> <br><tt>note number: 0 => silence from 12 to 107 => normal note (you</tt> <br><tt>must subtract 60 to obtain the correct value for the sound driver)</tt> <p><tt>20</tt> <br><tt>2</tt> <br><tt>int</tt> <br><tt>note duration, in ticks</tt> <p><tt>21</tt> <br><tt>15</tt> <br><tt>char</tt> <br><tt>filler</tt> <br> <p><tt>Field 22 indicates the number of times to repeat fields 23 to 26:</tt> <br><tt>fld #</tt> <br><tt>size</tt> <br><tt>type</tt> <br><tt>description (bytes)</tt> <p><tt>22</tt> <br><tt>2</tt> <br><tt>int</tt> <br><tt>number of instrument events</tt> <p><tt>23</tt> <br><tt>2</tt> <br><tt>int</tt> <br><tt>time of events, in ticks</tt> <p><tt>24</tt> <br><tt>9</tt> <br><tt>char</tt> <br><tt>instrument name</tt> <p><tt>25</tt> <br><tt>1</tt> <br><tt>char</tt> <br><tt>filler</tt> <p><tt>26</tt> <br><tt>2</tt> <br><tt>int</tt> <br><tt>unused</tt> <p><tt>27</tt> <br><tt>15</tt> <br><tt>char</tt> <br><tt>filler</tt> <br> <p><tt>Field 28 indicates the number of times to repeat fields 29 and 30:</tt> <br><tt>fld #</tt> <br><tt>size</tt> <br><tt>type</tt> <br><tt>description (bytes)</tt> <p><tt>28</tt> <br><tt>2</tt> <br><tt>int</tt> <br><tt>number of volume events</tt> <p><tt>29</tt> <br><tt>2</tt> <br><tt>int</tt> <br><tt>time of events, in ticks</tt> <p><tt>30</tt> <br><tt>4</tt> <br><tt>float</tt> <br><tt>volume multiplier (0.0 - 1.0)</tt> <p><tt>31</tt> <br><tt>15</tt> <br><tt>char</tt> <br><tt>filler</tt> <br> <p><tt>Field 32 indicates the number of times to repeat fields 33 and 34:</tt> <br><tt>fld #</tt> <br><tt>size</tt> <br><tt>type</tt> <br><tt>description (bytes)</tt> <p><tt>32</tt> <br><tt>2</tt> <br><tt>int</tt> <br><tt>number of pitch events</tt> <p><tt>33</tt> <br><tt>2</tt> <br><tt>int</tt> <br><tt>time of events, in ticks</tt> <p><tt>34</tt> <br><tt>4</tt> <br><tt>float</tt> <br><tt>pitch variation (0.0 - 2.0, nominal is 1.0)</tt> <br> <p><tt>7.2 Notes</tt> <br><tt>Fields #1 and #2 should be set to 0 and 4 respectively. Field #10 should</tt> <br><tt>be filled with zeros.</tt> <br> <p><tt>8 8SVX</tt> <p><tt>The 8SVX files are IFF files used for digital audio data. The format of</tt> <br><tt>the VHDR block is complete guesswork. These files use Motorola byte order.</tt> <br><tt>The 8SVX file format is fixed to 8-bit mono sample data - at least</tt> <br><tt>GoldWave does not support saving files in any other format than 8-bit</tt> <br><tt>mono.</tt> <br> <p><tt>8.1 FORMblock [VHDR]</tt> <p><tt>This is the sample information block. The normal size is 20 bytes.</tt> <p><tt>OFFSET</tt> <br><tt>Count</tt> <br><tt>TYPE</tt> <br><tt>Description</tt> <p><tt>0000h</tt> <br><tt>1</tt> <br><tt>dword</tt> <br><tt>Sampling rate of digital data in Hz. This count seems not to</tt> <br><tt>be too accurate, at least GoldWave v2.0 creates different</tt> <br><tt>rates for Wave and 8SVX files.</tt> <p><tt>0004h</tt> <br><tt>4</tt> <br><tt>dword</tt> <br><tt>Other data, unknown</tt> <br> <p><tt>8.2 FORMblock [BODY]</tt> <p><tt>This block contains the raw sample data, maybe the usual IFF compression</tt> <br><tt>was used. The details of both the compression and the information about</tt> <br><tt>the IFF format are unknow.</tt> <br> <p><tt>9 AIFF</tt> <p><tt>The Audio Interchangeable File Format files are digital audio files stored</tt> <br><tt>in the IFF format; the samples are stored in signed PCM. The header block</tt> <br><tt>is [AIFF], different subblocks are :</tt> <p><tt>[AUTH]</tt> <br><tt>The authors information optional</tt> <p><tt>[COMM]</tt> <br><tt>This record stores information about the sampled data</tt> <br> <p><tt>OFFSET</tt> <br><tt>Count</tt> <br><tt>TYPE</tt> <br><tt>Description</tt> <p><tt>0000h</tt> <br><tt>1</tt> <br><tt>word</tt> <br><tt>number of channels or number of instrument samples ???</tt> <p><tt>0002h</tt> <br><tt>1</tt> <br><tt>dword</tt> <br><tt>Sample length</tt> <p><tt>0006h</tt> <br><tt>1</tt> <br><tt>dword</tt> <br><tt>lower frequency</tt> <p><tt>000Ah</tt> <br><tt>1</tt> <br><tt>dword</tt> <br><tt>maximum frequency</tt> <p><tt>000Dh</tt> <br><tt>1</tt> <br><tt>dword</tt> <br><tt>???</tt> <br> <p><tt>[MARK]</tt> <br> <p><tt>[NAME]</tt> <br><tt>The name of the instrument / sample</tt> <p><tt>[SSND]</tt> <br><tt>The stored sample data.</tt> <br> <p><tt>10 AU</tt> <p><tt>The AU files are digital audio files used by the Sun and NeXT</tt> <br><tt>workstations. Further information wanted.</tt> <p><tt>OFFSET</tt> <br><tt>Count</tt> <br><tt>TYPE</tt> <br><tt>Description</tt> <p><tt>0000h</tt> <br><tt>4</tt> <br><tt>char</tt> <br><tt>ID='.snd'</tt> <p><tt>0004h</tt> <br><tt>1</tt> <br><tt>dword</tt> <br><tt>Offset of start of sample</tt> <p><tt>0008h</tt> <br><tt>1</tt> <br><tt>dword</tt> <br><tt>Length of stored sample</tt> <p><tt>000Ch</tt> <br><tt>1</tt> <br><tt>dword</tt> <br><tt>Sound encoding :</tt> <br><tt>1 - 8-bit ISDN u-law,</tt> <br><tt>2 - 8-bit linear PCM (REF-PCM),</tt> <br><tt>3 - 16-bit linear PCM,</tt> <br><tt>4 - 24-bit linear PCM,</tt> <br><tt>5 - 32-bit linear PCM,</tt> <br><tt>6 - 32-bit IEEE floating point,</tt> <br><tt>7 - 64-bit IEEE floating point,</tt> <br><tt>23 - 8-bit ISDN u-law compressed(G.721 ADPCM)</tt> <p><tt>0010h</tt> <br><tt>1</tt> <br><tt>dword</tt> <br><tt>Sampling rate</tt> <p><tt>0014h</tt> <br><tt>1</tt> <br><tt>dword</tt> <br><tt>Number of sample channels</tt> <br> <p><tt>11 FSM</tt> <p><tt>The .FSM files are samples to be used for module style music with the</tt> <br><tt>Fandarole Composer. Currently only samples of up to 64K length are</tt> <br><tt>supported, altough the header reserves a dword for the sample size.</tt> <p><tt>OFFSET</tt> <br><tt>Count</tt> <br><tt>TYPE</tt> <br><tt>Description</tt> <p><tt>0000h</tt> <br><tt>4</tt> <br><tt>char</tt> <br><tt>ID='FSM',254</tt> <p><tt>0004h</tt> <br><tt>32</tt> <br><tt>char</tt> <br><tt>ASCII name of sample</tt> <p><tt>0024h</tt> <br><tt>3</tt> <br><tt>char</tt> <br><tt>ID=10,13,26</tt> <p><tt>0027h</tt> <br><tt>1</tt> <br><tt>dword</tt> <br><tt>Length of sample (<=64K)</tt> <p><tt>0028h</tt> <br><tt>1</tt> <br><tt>byte</tt> <br><tt>Fine tune value for sample (currently unsupported)</tt> <p><tt>0029h</tt> <br><tt>1</tt> <br><tt>byte</tt> <br><tt>Sample volume (currently unsupported)</tt> <p><tt>002Ah</tt> <br><tt>1</tt> <br><tt>dword</tt> <br><tt>Start of sample loop</tt> <p><tt>002Dh</tt> <br><tt>1</tt> <br><tt>dword</tt> <br><tt>End of sample loop. If the sample is not set to loop (see below)</tt> <br><tt>this should be set to the end of the sample.</tt> <p><tt>0032h</tt> <br><tt>1</tt> <br><tt>byte</tt> <br><tt>Sample type bitmapped</tt> <br><tt>0 - 8-bit/16-bit sample</tt> <br><tt>1-7 - reserved</tt> <p><tt>0033h</tt> <br><tt>1</tt> <br><tt>byte</tt> <br><tt>Loop mode ?bit mapped?</tt> <br><tt>0-2 - reserved</tt> <br><tt>3 - loop off/loop on</tt> <br><tt>4-7 - reserved</tt> <p><tt>0034h</tt> <br><tt>?</tt> <br><tt>byte</tt> <br><tt>Sample data in signed format</tt> <br> <p><tt>12 GF1 PATCH</tt> <p><tt>The GF1 Patch files are multipart sound files for the Gravis Ultrasound</tt> <br><tt>sound card to emulate MIDI sounds in high quality. Each Patch can consist</tt> <br><tt>of many samples (for example, a string ensemble consists of Violin, Viola,</tt> <br><tt>Cello, Bass) which are played depending on the note to play. A patch can</tt> <br><tt>also</tt> <br><tt>contain a part to be played before the loop and a part to be played after</tt> <br><tt>the tone has been released.</tt> <p><tt>OFFSET</tt> <br><tt>Count</tt> <br><tt>TYPE</tt> <br><tt>Description</tt> <p><tt>0000h</tt> <br><tt>12</tt> <br><tt>char</tt> <br><tt>ID='GF1PATCH110'</tt> <p><tt>000Ch</tt> <br><tt>10</tt> <br><tt>char</tt> <br><tt>Manufacturer ID</tt> <p><tt>0018h</tt> <br><tt>60</tt> <br><tt>char</tt> <br><tt>Description of the contained Instruments or copyright of</tt> <br><tt>manufacturer.</tt> <p><tt>0054h</tt> <br><tt>1</tt> <br><tt>byte</tt> <br><tt>Number of instruments in this patch</tt> <p><tt>0055h</tt> <br><tt>1</tt> <br><tt>byte</tt> <br><tt>Number of voices for sample</tt> <p><tt>0056h</tt> <br><tt>1</tt> <br><tt>byte</tt> <br><tt>Number of output channels (1=mono,2=stereo)</tt> <p><tt>0057h</tt> <br><tt>1</tt> <br><tt>word</tt> <br><tt>Number of waveforms</tt> <p><tt>0059h</tt> <br><tt>1</tt> <br><tt>word</tt> <br><tt>Master volume for all samples</tt> <p><tt>005Bh</tt> <br><tt>1</tt> <br><tt>dword</tt> <br><tt>Size of the following data</tt> <p><tt>0060h</tt> <br><tt>36</tt> <br><tt>byte</tt> <br><tt>reserved</tt> <br> <p><tt>Following this header, the instruments with their headers follow. An</tt> <br><tt>instrument header contains the</tt> <br><tt>name and other data about one instrument contained within the patch.</tt> <br><tt>OFFSET</tt> <br><tt>Count</tt> <br><tt>TYPE</tt> <br><tt>Description</tt> <p><tt>0000h</tt> <br><tt>1</tt> <br><tt>word</tt> <br><tt>Instrument number. ?Maybe the MIDI instrument number?. In the</tt> <br><tt>Gravis patches, this is 0, in other patches, I found random values.</tt> <p><tt>0002h</tt> <br><tt>16</tt> <br><tt>char</tt> <br><tt>ASCII name of the instrument.</tt> <p><tt>0012h</tt> <br><tt>1</tt> <br><tt>dword</tt> <br><tt>Size of the whole instrument in bytes.</tt> <p><tt>0016h</tt> <br><tt>1</tt> <br><tt>byte</tt> <br><tt>Layers. Needed for whatever.</tt> <p><tt>0017h</tt> <br><tt>40</tt> <br><tt>byte</tt> <br><tt>reserved</tt> <br> <p><tt>About the patch, I don't know anything. Maybe somebody could enlighten me.</tt> <br><tt>Each patch record has the following format :</tt> <p><tt>OFFSET</tt> <br><tt>Count</tt> <br><tt>TYPE</tt> <br><tt>Description</tt> <p><tt>0000h</tt> <br><tt>7</tt> <br><tt>char</tt> <br><tt>Wave file name</tt> <p><tt>0007h</tt> <br><tt>1</tt> <br><tt>byte</tt> <br><tt>Fractions</tt> <p><tt>0008h</tt> <br><tt>1</tt> <br><tt>dword</tt> <br><tt>Wave size. Size of the wave digital data</tt> <p><tt>000Ch</tt> <br><tt>1</tt> <br><tt>dword</tt> <br><tt>Start of wave loop</tt> <p><tt>0010h</tt> <br><tt>1</tt> <br><tt>dword</tt> <br><tt>End of wave loop</tt> <p><tt>0012h</tt> <br><tt>1</tt> <br><tt>word</tt> <br><tt>Sample rate of the wave</tt> <p><tt>0014h</tt> <br><tt>1</tt> <br><tt>word</tt> <br><tt>Minimum frequency to play the wave</tt> <p><tt>0016h</tt> <br><tt>1</tt> <br><tt>word</tt> <br><tt>Maximum frequency to play the wave</tt> <p><tt>0018h</tt> <br><tt>1</tt> <br><tt>dword</tt> <br><tt>Original sample rate of the wave data</tt> <p><tt>001Ch</tt> <br><tt>1</tt> <br><tt>int</tt> <br><tt>Fine tune value for the wave</tt> <p><tt>001Eh</tt> <br><tt>1</tt> <br><tt>byte</tt> <br><tt>Stereo balance, values unknown**</tt> <p><tt>001Fh</tt> <br><tt>6</tt> <br><tt>byte</tt> <br><tt>Filter envelope rate</tt> <p><tt>0025h</tt> <br><tt>6</tt> <br><tt>byte</tt> <br><tt>Filter envelope offse</tt> <p><tt>002Bh</tt> <br><tt>1</tt> <br><tt>byte</tt> <br><tt>Tremolo sweep</tt> <p><tt>002Ch</tt> <br><tt>1</tt> <br><tt>byte</tt> <br><tt>Tremolo rate</tt> <p><tt>002Dh</tt> <br><tt>1</tt> <br><tt>byte</tt> <br><tt>Tremolo depth</tt> <p><tt>002Fh</tt> <br><tt>1</tt> <br><tt>byte</tt> <br><tt>Vibrato sweep</tt> <p><tt>0030h</tt> <br><tt>1</tt> <br><tt>byte</tt> <br><tt>Vibrato rate</tt> <p><tt>0031h</tt> <br><tt>1</tt> <br><tt>byte</tt> <br><tt>Vibrato depth</tt> <p><tt>0032h</tt> <br><tt>1</tt> <br><tt>byte</tt> <br><tt>Wave data, bitmapped</tt> <br><tt>0 - 8/16 bit wave data</tt> <br><tt>1 - signed/unsigned data</tt> <br><tt>2 - de/enable looping</tt> <br><tt>3 - no/has bidirectional looping</tt> <br><tt>4 - loop forward/backward</tt> <br><tt>5 - Turn envelope sustaining off/on</tt> <br><tt>6 - Dis/Enable filter envelope</tt> <br><tt>7 - reserved</tt> <p><tt>0033h</tt> <br><tt>1</tt> <br><tt>int</tt> <br><tt>Frequency scale, whatever that means</tt> <p><tt>0035h</tt> <br><tt>1</tt> <br><tt>word</tt> <br><tt>Frequency scale factor</tt> <p><tt>0037h</tt> <br><tt>36</tt> <br><tt>byte</tt> <br><tt>Reserved</tt> <br> <p><tt>13 S3I</tt> <p><tt>This is the Digiplayer/ST3.0 digital sample file format. The sample files</tt> <br><tt>include information about the loop of the instrument. The AdLib</tt> <br><tt>instruments have another format listed below.</tt> <p><tt>OFFSET</tt> <br><tt>Count</tt> <br><tt>TYPE</tt> <br><tt>Description</tt> <p><tt>0000h</tt> <br><tt>1</tt> <br><tt>byte</tt> <br><tt>ID=01h</tt> <p><tt>0001h</tt> <br><tt>12</tt> <br><tt>char</tt> <br><tt>DOS filename</tt> <p><tt>000Dh</tt> <br><tt>1</tt> <br><tt>byte</tt> <br><tt>reserved (0)</tt> <p><tt>000Eh</tt> <br><tt>1</tt> <br><tt>word</tt> <br><tt>Paragraph offset of the raw sample data from beginning of file.</tt> <p><tt>0010h</tt> <br><tt>1</tt> <br><tt>dword</tt> <br><tt>Sample length in bytes</tt> <p><tt>0014h</tt> <br><tt>1</tt> <br><tt>dword</tt> <br><tt>Start of sample loop</tt> <p><tt>0018h</tt> <br><tt>1</tt> <br><tt>dword</tt> <br><tt>End of sample loop</tt> <p><tt>001Ch</tt> <br><tt>1</tt> <br><tt>byte</tt> <br><tt>Playback volumne of sample</tt> <p><tt>001Dh</tt> <br><tt>1</tt> <br><tt>byte</tt> <br><tt>??? "DSK" what ever that means</tt> <p><tt>001Eh</tt> <br><tt>1</tt> <br><tt>byte</tt> <br><tt>Pack type</tt> <br><tt>0 - unpacked</tt> <br><tt>1 - DP30ADPCM 1</tt> <p><tt>001Fh</tt> <br><tt>1</tt> <br><tt>byte</tt> <br><tt>Flags (bitmapped)</tt> <br><tt>0 - loop on/off</tt> <br><tt>1 - stereo sample (length bytes for left channel,</tt> <br><tt> then another length bytes for right channel!)</tt> <br><tt>2 - 16-Bit samples (in Intel byte order)</tt> <p><tt>0020h</tt> <br><tt>1</tt> <br><tt>dword</tt> <br><tt>C2 frequency</tt> <p><tt>0024h</tt> <br><tt>1</tt> <br><tt>dword</tt> <br><tt>reserved</tt> <p><tt>0028h</tt> <br><tt>1</tt> <br><tt>word</tt> <br><tt>reserved</tt> <p><tt>002Ah</tt> <br><tt>1</tt> <br><tt>word</tt> <br><tt>ID=512</tt> <p><tt>002Ch</tt> <br><tt>1</tt> <br><tt>dword</tt> <br><tt>?? Date of last modification ?? (see table 0009)</tt> <p><tt>0030h</tt> <br><tt>28</tt> <br><tt>char</tt> <br><tt>ASCIIZ Sample name</tt> <p><tt>003Ch</tt> <br><tt>4</tt> <br><tt>char</tt> <br><tt>ID='SCRS'</tt> <p><tt>0040h</tt> <br><tt>?</tt> <br><tt>byte</tt> <br><tt>Raw sample data</tt> <br> <p><tt>Here follows the AdLib instrument format for which I don't know the</tt> <br><tt>extension:</tt> <p><tt>OFFSET</tt> <br><tt>Count</tt> <br><tt>TYPE</tt> <br><tt>Description</tt> <p><tt>0000h</tt> <br><tt>1</tt> <br><tt>byte</tt> <br><tt>Instrument type</tt> <br><tt>2 - melodic instrument</tt> <br><tt>3 - bass drum</tt> <br><tt>4 - snare drum</tt> <br><tt>5 - tom tom</tt> <br><tt>6 - cymbal</tt> <br><tt>7 - hihat</tt> <p><tt>0001h</tt> <br><tt>12</tt> <br><tt>char</tt> <br><tt>DOS file name</tt> <p><tt>000Dh</tt> <br><tt>3</tt> <br><tt>byte</tt> <br><tt>reserved</tt> <p><tt>0010h</tt> <br><tt>1</tt> <br><tt>byte</tt> <br><tt>Modulator description (bitmapped)</tt> <br><tt>0-3 - frequency multiplier</tt> <br><tt>4 - scale envelope</tt> <br><tt>5 - sustain</tt> <br><tt>6 - pitch vibrato</tt> <br><tt>7 - volume vibrato</tt> <p><tt>0011h</tt> <br><tt>1</tt> <br><tt>byte</tt> <br><tt>Carrier description (same as modulator)</tt> <p><tt>0012h</tt> <br><tt>1</tt> <br><tt>byte</tt> <br><tt>Modulator miscellaneous (bitmapped)</tt> <br><tt>0-5 - 63-volume</tt> <br><tt>6 - MSB of levelscale</tt> <br><tt>7 - LSB of levelscale</tt> <p><tt>0013h</tt> <br><tt>1</tt> <br><tt>byte</tt> <br><tt>Carrier description (same as modulator)</tt> <p><tt>0014h</tt> <br><tt>1</tt> <br><tt>byte</tt> <br><tt>Modulator attack / decay byte (bitmapped)</tt> <br><tt>0-3 - Decay</tt> <br><tt>4-7 - Attack</tt> <p><tt>0015h</tt> <br><tt>1</tt> <br><tt>byte</tt> <br><tt>Carrier description (same as modulator)</tt> <p><tt>0016h</tt> <br><tt>1</tt> <br><tt>byte</tt> <br><tt>Modulator sustain / release byte (bitmapped)</tt> <br><tt>0-3 - Release count</tt> <br><tt>4-7 - 15-Sustain</tt> <p><tt>0017h</tt> <br><tt>1</tt> <br><tt>byte</tt> <br><tt>Carrier description (same as modulator)</tt> <p><tt>0018h</tt> <br><tt>1</tt> <br><tt>byte</tt> <br><tt>Modulator wave select</tt> <p><tt>0019h</tt> <br><tt>1</tt> <br><tt>byte</tt> <br><tt>Carrier wave select</tt> <p><tt>001Ah</tt> <br><tt>1</tt> <br><tt>byte</tt> <br><tt>Modulator feedback byte (bitmapped)</tt> <br><tt>0 - additive synthesis on/off</tt> <br><tt>1-7 - modulation feedback</tt> <p><tt>001Bh</tt> <br><tt>1</tt> <br><tt>byte</tt> <br><tt>reserved</tt> <p><tt>001Ch</tt> <br><tt>1</tt> <br><tt>byte</tt> <br><tt>Instrument playback volume</tt> <p><tt>001Dh</tt> <br><tt>1</tt> <br><tt>byte</tt> <br><tt>??? "DSK"</tt> <p><tt>001Eh</tt> <br><tt>1</tt> <br><tt>word</tt> <br><tt>reserved</tt> <p><tt>0020h</tt> <br><tt>1</tt> <br><tt>dword</tt> <br><tt>C2 frequency</tt> <p><tt>0024h</tt> <br><tt>12</tt> <br><tt>byte</tt> <br><tt>reserved</tt> <p><tt>0030h</tt> <br><tt>28</tt> <br><tt>char</tt> <br><tt>ASCIIZ Instrument name</tt> <p><tt>004Ch</tt> <br><tt>4</tt> <br><tt>char</tt> <br><tt>ID='SCRI'</tt> <br> <p><tt>14 UWF</tt> <p><tt>The UWF files are sample files used by the UltraTracker. Further</tt> <br><tt>information wanted.</tt> <p><tt>OFFSET</tt> <br><tt>Count</tt> <br><tt>TYPE</tt> <br><tt>Description</tt> <p><tt>0000h</tt> <br><tt>32</tt> <br><tt>char</tt> <br><tt>ASCIIZ sample name</tt> <p><tt>0020h</tt> <br><tt>1</tt> <br><tt>char</tt> <br><tt>ID=1Ah</tt> <p><tt>0021h</tt> <br><tt>1</tt> <br><tt>char</tt> <br><tt>ID=10h</tt> <p><tt>0022h</tt> <br><tt>5</tt> <br><tt>char</tt> <br><tt>ID='MUWFB'</tt> <p><tt>0027h</tt> <br><tt>1</tt> <br><tt>char</tt> <br><tt>ID=0</tt> <p><tt>0028h</tt> <br><tt>6</tt> <br><tt>char</tt> <br><tt>Length of sample as ASCII long integer</tt> <p><tt>002Eh</tt> <br><tt>1</tt> <br><tt>word</tt> <br><tt>Length of sample</tt> <br> <p><tt>15 WAVE</tt> <p><tt>The Windows .WAV files are RIFF format files. Some programs expect the fmt</tt> <br><tt>block right behind the RIFF header itself, so your programs should write</tt> <br><tt>out this block as the first block in the RIFF file. The subblocks for the</tt> <br><tt>wave files are:</tt> <br> <p><tt>15.1 RiffBLOCK [data]</tt> <p><tt>This block contains the raw sample data. The necessary information for</tt> <br><tt>playback is contained in the</tt> <br><tt>[fmt ] block.</tt> <br> <p><tt>15.2 RiffBLOCK [fmt ]</tt> <br><tt>This block contains the data necessary for playback of the sound files.</tt> <br><tt>Note the blank after fmt.</tt> <p><tt>OFFSET</tt> <br><tt>Count</tt> <br><tt>TYPE</tt> <br><tt>Description</tt> <p><tt>0000h</tt> <br><tt>1</tt> <br><tt>word</tt> <br><tt>Format tag</tt> <br><tt>1 = PCM (raw sample data)</tt> <br><tt>2 etc. for APCDM, a-Law, u-Law ...</tt> <p><tt>0002h</tt> <br><tt>1</tt> <br><tt>word</tt> <br><tt>Channels (1=mono,2=stereo,...)</tt> <p><tt>0004h</tt> <br><tt>1</tt> <br><tt>dword</tt> <br><tt>Sampling rate</tt> <p><tt>0008h</tt> <br><tt>1</tt> <br><tt>dword</tt> <br><tt>Average bytes per second (=sampling rate*channels)</tt> <p><tt>000Ch</tt> <br><tt>1</tt> <br><tt>word</tt> <br><tt>Block alignment / reserved ??</tt> <p><tt>000Eh</tt> <br><tt>1</tt> <br><tt>word</tt> <br><tt>Bits per sample (8/12/16-bit samples)</tt> <br> <p><tt>15.3 RiffBLOCK [loop]</tt> <p><tt>This block is for looped samples. Very few programs support this block,</tt> <br><tt>but if your program changes the wave file, it should preserve any unknown</tt> <br><tt>blocks.</tt> <p><tt>OFFSET</tt> <br><tt>Count</tt> <br><tt>TYPE</tt> <br><tt>Description</tt> <p><tt>0000h</tt> <br><tt>1</tt> <br><tt>dword</tt> <br><tt>Start of sample loop</tt> <p><tt>0004h</tt> <br><tt>1</tt> <br><tt>dword</tt> <br><tt>End of sample loop</tt> <br> <p><tt>16 ZyXEL</tt> <p><tt>The ZyXEL Modems are capable of digitizing speech, the ZFAX software and</tt> <br><tt>answering machine software like VoiceConnect store the sampled data in</tt> <br><tt>those files. The Modems are capable of compressing the data down to 19.2k</tt> <br><tt>CPS (ADPCM) and 9.6k CPS (CELP), the algorithms for the compression may be</tt> <br><tt>found in the ZyxelVoc package by N. Igl, but as the firmware on the modems</tt> <br><tt>changes, so might the compression algorithm. Playback on the modem is</tt> <br><tt>always possible. Files are specified by the .ZVD and .ZYX extensions.</tt> <p><tt>OFFSET</tt> <br><tt>Count</tt> <br><tt>TYPE</tt> <br><tt>Description</tt> <p><tt>0000h</tt> <br><tt>5</tt> <br><tt>char</tt> <br><tt>ID='ZyXEL'</tt> <p><tt>0005h</tt> <br><tt>1</tt> <br><tt>byte</tt> <br><tt>02h, ??? format tag</tt> <p><tt>0006h</tt> <br><tt>4</tt> <br><tt>byte</tt> <br><tt>reserved</tt> <p><tt>000Ah</tt> <br><tt>1</tt> <br><tt>word</tt> <br><tt>Compression scheme</tt> <br><tt>0 - CELP</tt> <br><tt>1 - 2 bit ADPCM</tt> <br><tt>2 - 3 bit ADPCM</tt> <p><tt>000Ch</tt> <br><tt>4</tt> <br><tt>byte</tt> <br><tt>reserved</tt> <p><tt>0010h</tt> <br><tt>?</tt> <br><tt>????</tt> <br><tt>Raw Data, The voice data is just the data received from U1496</tt> <br><tt>Modem/Fax.</tt> <br> <br> <p><tt>17 Creative Labs File Formats</tt> <br> <p><tt>17.1 Sound Blaster Instrument File Format (SBI)</tt> <p><tt>The SBI format contains the register values for the FM chip to synthesize</tt> <br><tt>an instrument.</tt> <p><tt>Offset</tt> <br><tt>Description</tt> <p><tt>00h-03h</tt> <br><tt>Contains id characters "SBI" followed by byte 1Ah</tt> <p><tt>04h-23h</tt> <br><tt>Instrument name, NULL terminated string</tt> <p><tt>24h</tt> <br><tt>Modulator Sound Characteristic (Mult, KSR, EG, VIB, AM)</tt> <p><tt>25h</tt> <br><tt>Carrier Sound Characteristic</tt> <p><tt>26h</tt> <br><tt>Modulator Scaling/Output Level</tt> <p><tt>27h</tt> <br><tt>Carrier Scaling/Output Level</tt> <p><tt>28h</tt> <br><tt>Modulator Attack/Delay</tt> <p><tt>29h</tt> <br><tt>Carrier Attack/Delay</tt> <p><tt>2Ah</tt> <br><tt>Modulator Sustain/Release</tt> <p><tt>2Bh</tt> <br><tt>Carrier Sustain/Release</tt> <p><tt>2Ch</tt> <br><tt>Modulator Wave Seelct</tt> <p><tt>2Dh</tt> <br><tt>Carrier Wave Select</tt> <p><tt>2Eh</tt> <br><tt>Feedback/Connection</tt> <p><tt>2Fh-33h</tt> <br><tt>Reserved</tt> <br> <p><tt>17.2 Creative Music File Format (CMF)</tt> <p><tt>The CMF file format consists of 3 blocks: the header block, the instrument</tt> <br><tt>block and the music block.</tt> <p><tt>The CMF Header Block</tt> <br><tt>Offset</tt> <br><tt>Description</tt> <p><tt>00h-03h</tt> <br><tt>Contains id characters "CTMF"</tt> <p><tt>04h-05h</tt> <br><tt>CMF Format Version MSB = major version, lsb = minor version</tt> <p><tt>06h-07h</tt> <br><tt>File offset of the instrument block</tt> <p><tt>08h-09h</tt> <br><tt>File offset of the music block</tt> <p><tt>0Ah-0Bh</tt> <br><tt>Clock ticks per quarter note (one beat) default = 120</tt> <p><tt>0Ch-0Dh</tt> <br><tt>Clock ticks per second</tt> <p><tt>0Eh-0Fh</tt> <br><tt>File offset of the music title (0 = none)</tt> <p><tt>10h-11h</tt> <br><tt>File offset of the composer name (0 = none)</tt> <p><tt>12h-13h</tt> <br><tt>File offset of the remarks (0 = none)</tt> <p><tt>14h-23h</tt> <br><tt>Channel-In-Use Table</tt> <p><tt>24h-25h</tt> <br><tt>Number of instruments used</tt> <p><tt>26h-27h</tt> <br><tt>Basic Tempo</tt> <p><tt>28h-?</tt> <br><tt>Title, composer and remarks stored here</tt> <br> <p><tt>17.3 The CMF Instrument Block</tt> <p><tt>The instrument block contains one 16 byte data structure for each</tt> <br><tt>instrument in the piece. Each record is of the same format as bytes</tt> <br><tt>24h-33h in the SBI file format.</tt> <br> <p><tt>17.4 The CMF Music Block</tt> <p><tt>The music block adheres to the standard MIDI file format, and can have</tt> <br><tt>from 1 to 16 instruments. The PC-GPE file MIDI.TXT contains more</tt> <br><tt>information on this file format.</tt> <p><tt>The music block consists of an alternating seqence of time and MIDI event</tt> <br><tt>records:</tt> <p><tt>dTime</tt> <br><tt>MIDI Event</tt> <br><tt>dTime</tt> <br><tt>MIDI Event</tt> <br><tt>dTime</tt> <br><tt>MIDI Event</tt> <br><tt> ........</tt> <p><tt>dTime (delta Time) is the amount of time before the following MIDI event.</tt> <br><tt>MIDI Event is any MIDI channel message.</tt> <p><tt>The CMF file format defines the following MIDI Control Change events:</tt> <p><tt>Control No</tt> <br><tt>Control Data</tt> <p><tt>66h</tt> <br><tt>1-127, used as markers in the music</tt> <p><tt>67h</tt> <br><tt>0 - melody mode, 1 = rhythm mode</tt> <p><tt>68h</tt> <br><tt>0-127, changes the pitch of all following notes upward by the given number</tt> <br><tt>of 1/128</tt> <br><tt>semitones</tt> <p><tt>69h</tt> <br><tt>0-127, changes the pitch of all following notes downward by the given</tt> <br><tt>number of</tt> <br><tt>1/128 semitones</tt> <br> <p><tt>In rhythm mode, the last five channels are allocated for the percussion</tt> <br><tt>instruments:</tt> <br><tt>Channel</tt> <br><tt>Instrument</tt> <p><tt>12h</tt> <br><tt>Bass Drum</tt> <p><tt>13h</tt> <br><tt>Snare Drum</tt> <p><tt>14h</tt> <br><tt>Tom-Tom</tt> <p><tt>15h</tt> <br><tt>Top Cymbal</tt> <p><tt>16h</tt> <br><tt>High-hat Cymbal</tt> <br> <p><tt>17.5 Sound Blaster Instrument Bank File Format (IBK)</tt> <p><tt>A bank file is a group of up to 128 instruments.</tt> <p><tt>Offset</tt> <br><tt>Description</tt> <p><tt>00h-03h</tt> <br><tt>Contains id characters "IBK" followed by byte 1Ah</tt> <p><tt>04h-803h</tt> <br><tt>Parameters for 128 instruments, 16 bytes for each instrument in the same</tt> <br><tt>format</tt> <br><tt>as bytes 24h-33h in the SBI format</tt> <p><tt>804h-C83h</tt> <br><tt>Instrument names for 128 instruments, 9 bytes for each instrument, each</tt> <br><tt>name</tt> <br><tt>must be null terminated</tt> <br> <p><tt>18 Creative Voice (VOC) file format</tt> <p><tt>HEADER (bytes 00-19)</tt> <br><tt>Series of DATA BLOCKS (bytes 1A+) [Must end w/ Terminator Block]</tt> <p><tt>byte #</tt> <br><tt>Description</tt> <p><tt>00-12</tt> <br><tt>"Creative Voice File"</tt> <p><tt>13</tt> <br><tt>1A (eof to abort printing of file)</tt> <p><tt>14-15</tt> <br><tt>Offset of first datablock in .voc file (std 1A 00 in Intel Notation)</tt> <p><tt>16-17</tt> <br><tt>Version number (minor,major) (VOC-HDR puts 0A 01)</tt> <p><tt>18-19</tt> <br><tt>2's Comp of Ver. # + 1234h (VOC-HDR puts 29 11)</tt> <br> <p><tt>Data Block: TYPE(1-byte), SIZE(3-bytes), INFO(0+ bytes)</tt> <br><tt>NOTE: Terminator Block is an exception -- it has only the TYPE byte.</tt> <p><tt>TYPE</tt> <br><tt>Description</tt> <br><tt>Size (3-byte int)</tt> <br><tt>Info</tt> <p><tt>00</tt> <br><tt>Terminator</tt> <br><tt>(NONE)</tt> <br><tt>(NONE)</tt> <p><tt>01</tt> <br><tt>Sound data</tt> <br><tt>2+length of data</tt> <br><tt>*</tt> <p><tt>02</tt> <br><tt>Sound continue</tt> <br><tt>length of data</tt> <br><tt>Voice Data</tt> <p><tt>03</tt> <br><tt>Silence</tt> <br><tt>3</tt> <br><tt>**</tt> <p><tt>04</tt> <br><tt>Marker</tt> <br><tt>2</tt> <br><tt>Marker# (2 bytes)</tt> <p><tt>05</tt> <br><tt>ASCII</tt> <br><tt>length of string</tt> <br><tt>null terminated string</tt> <p><tt>06</tt> <br><tt>Repeat</tt> <br><tt>2</tt> <br><tt>Count# (2 bytes)</tt> <p><tt>07</tt> <br><tt>End repeat</tt> <br><tt>0</tt> <br><tt>(NONE)</tt> <p><tt>08</tt> <br><tt>Extended</tt> <br><tt>4</tt> <br><tt>***</tt> <br> <p><tt>*Sound Info Format:</tt> <br><tt>**Silence Info Format:</tt> <p><tt>00 Sample Rate</tt> <br><tt>00-01 Length of silence - 1</tt> <p><tt>01 Compression Type</tt> <br><tt>02 Sample Rate</tt> <p><tt>02+ Voice Data</tt> <br> <p><tt>***Extended Info Format:</tt> <p><tt>00-01</tt> <br><tt>Time Constant:</tt> <br><tt>Mono: 65536 - (256000000/sample_rate)</tt> <br><tt>Stereo: 65536 - (25600000/(2*sample_rate))</tt> <p><tt>02</tt> <br><tt>Pack</tt> <p><tt>03</tt> <br><tt>Mode:</tt> <br><tt>0 = mono</tt> <br><tt>1 = stereo</tt> <p><tt>Marker#</tt> <br><tt>Driver keeps the most recent marker in a status byte</tt> <p><tt>Count#</tt> <br><tt>Number of repetitions + 1 Count# may be 1 to FFFE for 0 - FFFD</tt> <br><tt>repetitions or FFFF for endless repetitions</tt> <p><tt>Sample Rate</tt> <br><tt>SR byte = 256-(1000000/sample_rate)</tt> <p><tt>Length of silence</tt> <br><tt>in units of sampling cycle</tt> <p><tt>Compression Type</tt> <br><tt>of voice data</tt> <br><tt>8-bits= 0</tt> <br><tt>4-bits = 1</tt> <br><tt>2.6-bits = 2</tt> <br><tt>2-bits = 3</tt> <br><tt>Multi DAC = 3+(# of channels)</tt> <br><tt> [interesting this isn't in the developer's manual]</tt> <br> <p><tt>19 Revision History</tt> <p><tt>Version 1.0 - First document containing 15 formats</tt> <br><tt>Version 1.1 - 2 More formats added</tt> <p><b><font color="#FFFFFF"><font size=-1>. .</font></font><a href="#top"><font color="#999999">to</font><font color="#FFFFFF"><font size=-2>.</font></font><font color="#666666">top</font></a></b> <br> <br> </body> </html>