This will write a CUE
amagalma_Write project markers as media cues to selected items' active takes' source files (WAV only)
This is some info I found:
Code:
** The acid chunk goes a little something like this:
**
** 4 bytes 'acid'
** 4 bytes (int) length of chunk starting at next byte
**
** 4 bytes (int) type of file:
** this appears to be a bit mask,however some combinations
** are probably impossible and/or qualified as "errors"
**
** 0x01 On: One Shot Off: Loop
** 0x02 On: Root note is Set Off: No root
** 0x04 On: Stretch is On, Off: Strech is OFF
** 0x08 On: Disk Based Off: Ram based
** 0x10 On: ?????????? Off: ????????? (Acidizer puts that ON)
**
** 2 bytes (short) root note
** if type 0x10 is OFF : [C,C#,(...),B] -> [0x30 to 0x3B]
** if type 0x10 is ON : [C,C#,(...),B] -> [0x3C to 0x47]
** (both types fit on same MIDI pitch albeit different octaves, so who cares)
**
** 2 bytes (short) ??? always set to 0x8000
** 4 bytes (float) ??? seems to be always 0
** 4 bytes (int) number of beats
** 2 bytes (short) meter denominator //always 4 in SF/ACID
** 2 bytes (short) meter numerator //always 4 in SF/ACID
** //are we sure about the order?? usually its num/denom
** 4 bytes (float) tempo
**
From wav.c in libsndfile library
Code:
struct AcidTag
{
int properties; // flags: 0x01 = oneshot, 0x02 = rootSet, 0x04 = stretch, 0x08 = diskbased
short rootNote; // midi number i.e. C = 48 or 60 etc
short unknown1; // = 0x80 0x00
int unknown2; // = 0
int beatCount;
short timeSigDen;
short timeSigNum;
float tempo;
}
Code:
Int32 unknown1; // always 28 (0x1C)
Int32 numberOfSlices; // i.e. number of 32 byte blocks following this header
Int32 unknown2; // either 25 (0x19) or 65 (0x41)
Int32 unknown3; // either 10 (0x0A) or 5 (0x05) seems to be linked to value of unknown 2, i.e. 25 and 10 go together, or 65 and 5
Int32 unknown4; // always 1 (0x01)
Int32 unknown5; // either 0, 1 or 10
Int32 unknown6; // have seen values 2,3,4 and 5
Code:
Int32 data1; // either 0 or 2
Int32 data2; // a seemingly random number. is the same value for every slice
Int64 samplePosition; // sample position of this slice
Int64 samplePosition2; // first set of slices this will be zero,
// second set it will be the same as samplePosition
Int32 data3; // first set of slices this is a large number, different every time,
// but in similar order of magnitude, doesn't seem to be a float.
// could be some kind of volume representation?
// Second set of slices it will be zero
Int32 data4; // another seemingly random number, but the same value for every slice