Old 11-14-2019, 01:31 PM   #1
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 1,175
Default Write ACID Chunk ?

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
__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
MusoBob is online now   Reply With Quote
Old 12-02-2019, 04:19 PM   #2
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 1,175
Default

BUMP....
__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
MusoBob is online now   Reply With Quote
Old 12-05-2019, 09:36 AM   #3
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,690
Default

Where can I find more information about ACID?

Apart from psychedelic music from the siexties, drugs and the old musicstyle my search didn't give me something conclusive on that...

Thanks
__________________
Ultraschall-API - a Lua-functions-library4Reaper: https://forum.cockos.com/showthread....98#post2067798
Reaper Internals - Developerdocs4Reaper: https://forum.cockos.com/showthread.php?t=207635
mespotine is offline   Reply With Quote
Old 12-05-2019, 02:16 PM   #4
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 1,175
Default

There's plenty of info on amino acid ?
There's bits n pieces everywhere.



https://www.recordingblogs.com/wiki/...of-a-wave-file

https://github.com/GStreamer/gst-plu.../gstwavparse.c

https://github.com/ceefour/sinsymake...ster/README.md

Audio Output Format

We'll be using ACID Loop File format (i.e. enhanced WAV) when generating all output audios.
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.
Via http://www.kvraudio.com/forum/viewto...61898#p3061898 :
TBD: Use FluidSynth's / GrandOrgue's format? TBD: RIFF Wave Cue-Point chunks: http://sharkysoft.com/archive/lava/d...ve-content.htm
__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
MusoBob is online now   Reply With Quote
Old 12-05-2019, 02:46 PM   #5
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,690
Default

Thank you, will check that out.
__________________
Ultraschall-API - a Lua-functions-library4Reaper: https://forum.cockos.com/showthread....98#post2067798
Reaper Internals - Developerdocs4Reaper: https://forum.cockos.com/showthread.php?t=207635
mespotine is offline   Reply With Quote
Old 12-05-2019, 11:30 PM   #6
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 1,175
Default

You can see the chunk it writes with Acidizer.zip to run on Win10 set the Acidizer.exe > right click > Properties > Compatibility > Vista

more http://www.ievs.ch/projects/var/uplo...e%20Format.pdf

__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com

Last edited by MusoBob; 12-05-2019 at 11:36 PM.
MusoBob is online now   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 11:13 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.