I noticed some files got duplicated and renamed in the past, for example: Clap001.wav, Clap001(01).wav, Clap001(02).wav, etc.
Firstly we will treat this file just like any old file. If and only if we don't find a match and it doesn't already have a valid ref, we will finally proceed to check if it does end with "(someNumber)" proceed by using one of the below methods:
Option 1:
If we find a Clap001(01).wav, we could
Check that there's a Clap001.wav in the project,
Delete Clap001(01).wav and change its appearances in the song to link to Clap001.wav
Not really sure the side effects this would have. If other plugins are using this stuff might get messed up.
Option 2:
May result with multiple references to the same file. Hopefully S1 won't yell at us.
Just update Clap001(01).wav to Clap001.wav and do the exact same thing we do with all files, but if we don't find one obviously we'll change it back.
I am inclined to go for option 2.
Also it'll be a good idea to possibly trim off whitespace (not sure if OSes add a space before the number).
I noticed some files got duplicated and renamed in the past, for example: Clap001.wav, Clap001(01).wav, Clap001(02).wav, etc. Firstly we will treat this file just like any old file. If and only if we don't find a match and it doesn't already have a valid ref, we will finally proceed to check if it does end with "(someNumber)" proceed by using one of the below methods:
Option 1: If we find a Clap001(01).wav, we could
Option 2: May result with multiple references to the same file. Hopefully S1 won't yell at us. Just update Clap001(01).wav to Clap001.wav and do the exact same thing we do with all files, but if we don't find one obviously we'll change it back.
I am inclined to go for option 2.
Also it'll be a good idea to possibly trim off whitespace (not sure if OSes add a space before the number).