I manage a large sample library using ADSR, which excels at organizing samples based on internal tags. However, I've hit a roadblock: ADSR doesn't embed these crucial BPM and Key tags into the files themselves. This functionality is vital for my workflow since DAWs like Reaper can utilize these tags to automatically adjust samples to match project settings.
While I've successfully used dBpoweramp to create BPM and Key tags, scripting the extraction of this data from the filenames has proven challenging due to their inconsistency. For example, keys might be denoted as "_Fmin_", " Fmin ", "_F minor_", " Fminor ", or "_Fm_", and BPMs might appear as "_85_", " 167 ", "_85 bpm_", " 85 bpm ", or "_85bpm_" among others, in the file name.
I'm in search of a scripting method that can intelligently extract this information from the varied filenames and embed it as tags. I've tried Advanced Renamer among others, but to no avail.
The keys it would be searching for in the filename are as follows:
Major Keys:
C
C*
Db (C* and Db are enharmonic equivalents)
D
D*
Eb (D* and Eb are enharmonic equivalents)
E
F
F*
Gb (F* and Gb are enharmonic equivalents)
G
G*
Ab (G* and Ab are enharmonic equivalents)
A
A*
Bb (A* and Bb are enharmonic equivalents)
B
Minor Keys:
Cm
C*m
Dbm (C*m and Dbm would refer to the same harmonic minor scale)
Dm
D*m
Ebm (D*m and Ebm are enharmonic equivalents)
Em
Fm
F*m
Gbm (F*m and Gbm would refer to the same harmonic minor scale)
Gm
G*m
Abm (G*m and Abm are enharmonic equivalents)
Am
A*m
Bbm (A*m and Bbm are enharmonic equivalents)
Bm
In filenames, sharp (*) and flat (b) symbols might be replaced with "s" or "sharp" and "b" or "flat" respectively to avoid issues with operating systems that do not support these characters in filenames. For example:
F* might become Fsharp or Fs
Db might become Db or Dflat
Major Keys:
C or Cmaj
C* or C*maj
Db or Dbmaj (C* and Db are enharmonic equivalents)
D or Dmaj
D* or D*maj
Eb or Ebmaj (D* and Eb are enharmonic equivalents)
E or Emaj
F or Fmaj
F* or F*maj
Gb or Gbmaj (F* and Gb are enharmonic equivalents)
G or Gmaj
G* or G*maj
Ab or Abmaj (G* and Ab are enharmonic equivalents)
A or Amaj
A* or A*maj
Bb or Bbmaj (A* and Bb are enharmonic equivalents)
B or Bmaj
Minor Keys (using "min"):
Cmin
C*min
Dbmin (C*min and Dbmin would refer to the same harmonic minor scale)
Dmin
D*min
Ebmin (D*min and Ebmin are enharmonic equivalents)
Emin
Fmin
F*min
Gbmin (F*min and Gbmin would refer to the same harmonic minor scale)
Gmin
G*min
Abmin (G*min and Abmin are enharmonic equivalents)
Amin
A*min
Bbmin (A*min and Bbmin are enharmonic equivalents)
Bmin
An additional nicety of being able to do this would be then being able to standardize to a specific tag format and rename the files to a similar filename structure.
If this could be an added feature of dBpoweramp, I'm sure musicians would love the heck out of it!
EDIT: the asterisks should be hashtags
While I've successfully used dBpoweramp to create BPM and Key tags, scripting the extraction of this data from the filenames has proven challenging due to their inconsistency. For example, keys might be denoted as "_Fmin_", " Fmin ", "_F minor_", " Fminor ", or "_Fm_", and BPMs might appear as "_85_", " 167 ", "_85 bpm_", " 85 bpm ", or "_85bpm_" among others, in the file name.
I'm in search of a scripting method that can intelligently extract this information from the varied filenames and embed it as tags. I've tried Advanced Renamer among others, but to no avail.
The keys it would be searching for in the filename are as follows:
Major Keys:
C
C*
Db (C* and Db are enharmonic equivalents)
D
D*
Eb (D* and Eb are enharmonic equivalents)
E
F
F*
Gb (F* and Gb are enharmonic equivalents)
G
G*
Ab (G* and Ab are enharmonic equivalents)
A
A*
Bb (A* and Bb are enharmonic equivalents)
B
Minor Keys:
Cm
C*m
Dbm (C*m and Dbm would refer to the same harmonic minor scale)
Dm
D*m
Ebm (D*m and Ebm are enharmonic equivalents)
Em
Fm
F*m
Gbm (F*m and Gbm would refer to the same harmonic minor scale)
Gm
G*m
Abm (G*m and Abm are enharmonic equivalents)
Am
A*m
Bbm (A*m and Bbm are enharmonic equivalents)
Bm
In filenames, sharp (*) and flat (b) symbols might be replaced with "s" or "sharp" and "b" or "flat" respectively to avoid issues with operating systems that do not support these characters in filenames. For example:
F* might become Fsharp or Fs
Db might become Db or Dflat
Major Keys:
C or Cmaj
C* or C*maj
Db or Dbmaj (C* and Db are enharmonic equivalents)
D or Dmaj
D* or D*maj
Eb or Ebmaj (D* and Eb are enharmonic equivalents)
E or Emaj
F or Fmaj
F* or F*maj
Gb or Gbmaj (F* and Gb are enharmonic equivalents)
G or Gmaj
G* or G*maj
Ab or Abmaj (G* and Ab are enharmonic equivalents)
A or Amaj
A* or A*maj
Bb or Bbmaj (A* and Bb are enharmonic equivalents)
B or Bmaj
Minor Keys (using "min"):
Cmin
C*min
Dbmin (C*min and Dbmin would refer to the same harmonic minor scale)
Dmin
D*min
Ebmin (D*min and Ebmin are enharmonic equivalents)
Emin
Fmin
F*min
Gbmin (F*min and Gbmin would refer to the same harmonic minor scale)
Gmin
G*min
Abmin (G*min and Abmin are enharmonic equivalents)
Amin
A*min
Bbmin (A*min and Bbmin are enharmonic equivalents)
Bmin
An additional nicety of being able to do this would be then being able to standardize to a specific tag format and rename the files to a similar filename structure.
If this could be an added feature of dBpoweramp, I'm sure musicians would love the heck out of it!
EDIT: the asterisks should be hashtags
Comment