Created
February 11, 2022 07:35
-
-
Save gazzar/c2710fa9ec35735a03da38de6567db16 to your computer and use it in GitHub Desktop.
Converts the filenames written by MPC Beats' Auto Sampler to ones recognised by the modwave Sample Builder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Converts the filenames written by MPC Beats' Auto Sampler to ones recognised by the | |
modwave Sample Builder. Copy this file to where the samples are and run it there | |
python flat_to_sharp.py | |
OR | |
python -m flat_to_sharp.main | |
Gary Ruben 2022-01-22 | |
''' | |
import glob | |
import os | |
import pathlib | |
def main(): | |
cd = pathlib.Path(__file__).parent.resolve() | |
os.chdir(cd) | |
files = glob.glob('*.wav') | |
print(files) | |
for f in files: | |
new_f = f.replace('Ab', 'G#').replace('Bb', 'A#').replace('Db', 'C#').replace('Eb', 'D#').replace('Gb', 'F#') | |
os.rename(f, new_f) | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment