mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-25 13:35:12 +00:00
3ed76d6a5c
* Add Extended Soundbank This PR adds a soundbank to the game with every instrument in the game, so there's no need to only use one set of instruments for m64 sequences. Use the soundbank ID "42" when replacing sequences with lua to use it. * Remove hardcoded.h include duplicate There's a duplicated line that shouldn't be there since hardcoded.h is already included. * Reinclude duplicate include I'm still learning the commits system and I've noticed I should push this into a different PR instead by making a fork, sorry about that
42 lines
1.2 KiB
Python
42 lines
1.2 KiB
Python
#!/usr/bin/env python3
|
|
import os
|
|
|
|
copy_directories = {
|
|
'sound/samples/instruments/': [
|
|
'sound/samples/extended/',
|
|
],
|
|
'sound/samples/bowser_organ/': [
|
|
'sound/samples/extended/',
|
|
],
|
|
'sound/samples/course_start/': [
|
|
'sound/samples/extended/',
|
|
],
|
|
'sound/samples/piranha_music_box/': [
|
|
'sound/samples/extended/',
|
|
],
|
|
}
|
|
|
|
# If extended folder doesn't exist, create it
|
|
if not os.path.exists('sound/samples/extended/'):
|
|
os.makedirs('sound/samples/extended/')
|
|
print('Created extended soundbank folder, as it was missing')
|
|
|
|
def copy_dir(source, destinations):
|
|
for filename in os.listdir(source):
|
|
if not filename.endswith('.aiff'):
|
|
continue
|
|
src = source + filename
|
|
|
|
for destination in destinations:
|
|
dst = destination + filename
|
|
if os.path.exists(dst):
|
|
continue
|
|
print('Copying instrument samples to the extended soundbank folder: ' + src + ' -> ' + dst)
|
|
os.system('cp ' + src + ' ' + dst)
|
|
|
|
def main():
|
|
for source in copy_directories:
|
|
copy_dir(source, copy_directories[source])
|
|
|
|
if __name__ == "__main__":
|
|
main()
|