snestracker icon indicating copy to clipboard operation
snestracker copied to clipboard

[Feature request] Rip all STIs from an SPC

Open jordanlewis opened this issue 3 years ago • 3 comments

Hi, thanks for the great work on SNESTracker!

It would be really convenient to have a feature in the debugger that rips all of the instruments from a loaded SPC. Right now, to rip each of the instruments, the user has to do several clicks per rip, which is kind of unpleasant.

Cheers.

jordanlewis avatar Aug 10 '20 19:08 jordanlewis

This is problematic due to each sound driver having different instrument formats... although an alternative could be to rip STIs from all eight channels at once instead.

KungFuFurby avatar Aug 10 '20 21:08 KungFuFurby

Hi Jordan! Nice idea. Good thinking, KFF. I can definitely implement this. I put the tech details below.

Do a rapid playthru of the SPC (just like when exporting WAV), collect the ADSR settings for each sample played, and then dump all of that data into a collection of STI files.

The naming convention could be a folder with the SPC filename, appending "-STI". and each STI file could simply be the DIR entry number, the first start time of the sample in the song (0m00s format), and the note that was played (A4, C#3 format).

bazz1tv avatar Aug 12 '20 05:08 bazz1tv

I was actually just thinking at one time (which nets up to eight STIs at once), rather than via the rapid playthrough function. Some sound drivers may change the ADSR on the fly, which may also throw off your converter... and then there's the pure gain cases (SNESMod is what I'm citing here, but there could be others).

Rips can also be done on a per-sound driver basis if the sound driver can be identified. I know N-SPC/Kankichi's format, and David Whittaker's sound driver's instrument format is N-SPC/Kankichi compatible minus noise support (and it ignores the GAIN settings except for the two earliest versions).

KungFuFurby avatar Aug 12 '20 21:08 KungFuFurby