NOTE: this post is just “thought jots” and the official formats are going to be different 😛 You’ve been warned
There will be 2 new file formats.. which are being developed.. this isn’t final.
BRR is the plain ol’ sample
BRR-Plus (BRR+) (.brrp) contains a 2byte loop offset directly after the BRR sample
BRR-instrument (.brri) / SNES-instrument / SPC-instrument will contain:
Loop offset (2 bytes)
ADSR1,2 (2 bytes)
GAIN (1 byte)
As far as ripping the samples go. I am in the notion that you’re watching the STD memory debugger, and see samples being played.. You right-click a sample region and get a box
But I want to focus today on Download Sample and how to calculate the correct portion. There is a possibility for slight error but mostly working copy: All BRR-END locations are already known. DIR has the start-locations and loop point information. Program must do the following:
in report namespace, append BRR_End
As BRR end headers are found, check the array if they already exist or add them otherwise.. Be sure to add 9 to the brr header block address. i dunno how the performance will be. We'll get there.
When the user right-clicks on the memory region (SDL Event), find the closest entry in array that is above the user's clicked address..
get the DSP DIR * 0x100
Inspect the IAPURAM DIRECTORY for the address that is closest to user clicked address and is < userclicked address. then we have start_addr and end_addr
Organize the package for downloading: