Acidized wav's format specification?

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

I am developping a sampler for djDecks, and I found out that it would be very useful to be able to get the tempo from loops created in FL Studio for example.

I know that for wav's it is possible to store tempo information in an ACID tag, and by looking at the file I noticed that it was appended at the end of the wav file.
Using google, the kvr wiki and the search here I wasn't able to find any specification for this tag though.

Since there are a lot of applications that are capable of reading/writing this info, I suppose it should be documented somewhere, or it shouldn't be difficult to find out how it stores it's data?

Post

I've looked a bit around in SourceForge, but alas no good hits on acid in the multimedia departement...

You could use a RIFF viewer to find out which extra tags are there in Acidized WAVs, and hack your way around ;-)
We are the KVR collective. Resistance is futile. You will be assimilated. Image
My MusicCalc is served over https!!

Post

Thanks, I've found a RIFF viewer, and specification of the riff chunks now.
In my example wav, I see a chunk called 'acid' which is 24 bytes. I suppose this will contain the tempo information, but I haven't figured out yet how this field is structured.

Update: My test file had tempo 138.00 BPM
I couldn't find 138 either in asci or in integer format in the acid tag, but 138 appears to be 00 00 0A 43 in floating point format, and this were exactly the last 4 bytes of the acid chunk.
Now I still need to find out if the tempo is at a fixed offset in the tag, or if there's some other way to know where the tempo is located.
The acid chunk that Fruity Loops created was 24 bytes long btw.

Post

No one knows of additional info about the acid chunk?
Reading seems to work fine now, but I also want to add tag writing to my program now, so I need to know what to write in the bytes that I don't know about yet.

Post


Post

AUTO-ADMIN: Non-MP3, WAV, OGG, SoundCloud, YouTube, Vimeo, Twitter and Facebook links in this post have been protected automatically. Once the member reaches 5 posts the links will function as normal.

Code: Select all (#)

** 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

Post

Thanks a lot, that's perfect!

Post Reply

Return to “DSP and Plugin Development”