So give that a go afta8 and see if that is a bit better
Thats perfect, even cleaner than the audacity export! ![]()
Couple of questions to better my understanding…
At this link http://stackoverflow.com/questions/15087668/how-to-convert-pcm-samples-in-byte-array-as-floating-point-numbers-in-the-range?noredirect=1&lq=1itit says the " range of 16 bit integers is -32768 to 32767" however in your code you are always multiplying by 32768 and the max range looks like it is65536 (should this be 65535?). Are you taking a different approach here or am I missing something? I notice when I do a null test it zero’s completely except for a small section where the sine wave reaches it’s peak value.
Also you mention ‘endiness’ and on the wikipedia page for aiff https://en.wikipedia.org/wiki/Audio_Interchange_File_Format itsays “With the development of theMac OS Xoperating system, Apple created a new type of AIFF which is, in effect, an alternativelittle-endianbyte order format.”- Therefore is your code here creating a 'little-endian" format of the aiff?
Could a cdp process help with converting to .aiff? Like;
Yes and could also use sox, however that is only half of what I need to do, the next bit is to ‘customise’ the meta data in the sample to include slice data and tunings, this is why it is better to try and use mxb’s code as it is already writing metadata and hopefully will be easier to modify.
Anyway 4Tey has worked some magic here to help me on my way ![]()