Closed SamWindell closed 3 years ago
Sounds like a great plan^ :)
also more ideas:
Good ideas, I've added them too.
I also think reading and embedding the smpl chunk, especially loop points is essential. what you could do is have reader code that checks if this chunk exists, stores the data in a variable and after the audio operating injects that chunk in the header.
Yeah, I'll move that further up the to-do list. I bet that would be a deal-breaker feature for people.
BTW I just closed this issue because I moved these things to the projects section instead. Seems like a better way to handle to-dos.
i think its a deal breaker yes, especially considering its for sample library builders... maybe have a look here for inspiration, for the reading (it works but i do not know if my code is bug free there, look at the part where the smpl chunk is read): https://github.com/faxinadu/LuaWAV
so you read everything, perform the operation, then brute force the smpl chunk back in.
Thanks. Thinking about it, the complications come from when editing the audio file by changing its length (stretching or trimming). In that situation, things like loop markers would become incorrect. So I guess really the loop data needs to be carried throughout the processing - that way each subcommand can modify the loop points along with the audio data so that by the time we come to write it, it still makes sense.
yes thats what I was doing when I was doing these things with Lua. After every process I re-write the chunk.
If a process changes the file's length. for example silence removal then that process should also re-calculate the loop points based on what changed.
i have been following your commits, awesome stuff! go on! 👍
Where possible, it might be worth changing the processing to use the native format of a file. For example, process a file as a buffer of 16bit ints if that is what the input file is saved as. Currently, we are converting all input files to float buffers, and then writing them back out to whatever format. This introduces minor precision errors.