From ce094c708eba80a41b48cac3f00766878509e77a Mon Sep 17 00:00:00 2001 From: Nando Florestan Date: Wed, 13 Dec 2017 13:19:01 +0100 Subject: [PATCH] Put aif files inside an aif/ subdirectory --- lib/send_notes.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/send_notes.py b/lib/send_notes.py index dded31f..1c97a24 100644 --- a/lib/send_notes.py +++ b/lib/send_notes.py @@ -37,7 +37,7 @@ def filename_for(note, velocity): - return '%s_v%s.aif' % (note_name(note), velocity) + return 'aif/%s_v%s.aif' % (note_name(note), velocity) def generate_region(zone, velocity, velocities, loop=None): @@ -225,6 +225,9 @@ def sample_program( if already_sampled_region is None: filename = os.path.join( path_prefix, filename_for(zone.center, velocity)) + aif_directory = os.path.dirname(filename) + if not os.path.exists(aif_directory): + os.mkdir(aif_directory) if print_progress: print("Sampling %s at velocity %s..." % (