Thanks 4Tey, some useful knowledge there
Now your OP-1? Does it want little or big endian stream? I don't own a OP-1 afta8 but with the file I have here it seems to me to want a little endian PCM stream.
It looks like it will accept either, I loaded the sample created by your code (big endian) into the OP-1 and it works fine. If I look at the samples generated in the OP-1 in a hex editor you can see: "sowt)Signed integer (little-endian)" so I presume the OP-1 native format is little endian.
I also generated a sample for the OP-1 using a standalone software tool for it: http://now.teenageen...-1-drum-utility and I think that is big endian, but not sure how to tell when looking at it in a Hex editor
So overall I don't think the OP-1 is fussed about the "endiness"
The other thing to mention is that when you do start to modify the header afta8, I don't think Renoise can load any other format of AIFF other than standard 'old style' big endian format.
It works fine for me, I tried loading the native sample generated on the OP-1 which is little endian and it loads into Renoise fine.
If you are interested I have attached 3 different versions of same sample:
1) lua_export.aiff - The file generated by your code
2) xfer_util.aif - The same file exported by the OP1 utility I mentioned earlier
3) op1_native - The same sample re-saved within the OP1
You can see in the 2 and 3 the following meta data chunk which I now need to put into the lua export file in a APPL chunk:
Should be fairly straightforward right