From 1212d63312461ddf54fa470e337ea66028e80f3b Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Thu, 9 Jun 2016 21:55:30 +0200 Subject: [PATCH] Make maximum beat length configurable on the GUI --- git-sound.py | 5 ++++- git-sound.ui | 51 ++++++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 48 insertions(+), 8 deletions(-) diff --git a/git-sound.py b/git-sound.py index 6fd00a9..1eefa99 100755 --- a/git-sound.py +++ b/git-sound.py @@ -159,6 +159,7 @@ class GitSoundWindow(object): self.scale_combo = self.builder.get_object('scale-combo') self.chooser_button = self.builder.get_object('repo-chooser') self.notelen_spin = self.builder.get_object('notelen-spin') + self.beatlen_spin = self.builder.get_object('beatlen-spin') self.gitmidi = None @@ -293,6 +294,7 @@ class GitSoundWindow(object): skip = int(self.skip_spin.get_value()) vol_deviation = int(self.vol_spin.get_value()) notelen = self.notelen_spin.get_value() + beatlen = int(self.beatlen_spin.get_value()) or None self.set_status("Generating data") self.progressbar.set_fraction(0.0) @@ -304,7 +306,8 @@ class GitSoundWindow(object): program=PROGRAMS[program_selected], volume_range=vol_deviation, skip=skip, - note_duration=notelen) + note_duration=notelen, + max_beat_len=beatlen) self.gitmidi.gen_repo_data(callback=self.genrepo_cb) self.gitmidi.generate_midi(callback=self.genrepo_cb) diff --git a/git-sound.ui b/git-sound.ui index aca6204..20f522c 100644 --- a/git-sound.ui +++ b/git-sound.ui @@ -42,6 +42,13 @@ 1 0.3 + + 0 + 10000.0 + 0 + 1 + 0 + False Git Sound @@ -117,7 +124,7 @@ 0 - 7 + 8 1 1 @@ -135,7 +142,7 @@ 1 - 7 + 8 1 1 @@ -153,7 +160,7 @@ 3 - 7 + 8 1 1 @@ -166,7 +173,7 @@ 0 - 8 + 9 3 1 @@ -239,7 +246,7 @@ 0 - 9 + 10 4 1 @@ -252,7 +259,7 @@ 3 - 8 + 9 1 1 @@ -315,6 +322,36 @@ 1 + + + True + False + Maximum beat length + + + 0 + 7 + 1 + 1 + + + + + True + True + 0.3 + beatlen-adjustment + 0 + 0 + + + + 1 + 7 + 3 + 1 + + True @@ -357,7 +394,7 @@ 2 - 7 + 8 1 1