From d9f2fa1d7fe1723790d3eb2b7af059c701b5e785 Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Thu, 9 Jun 2016 21:40:53 +0200 Subject: [PATCH] Make note length configurable --- 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 bc313ec..3615a3e 100755 --- a/git-sound.py +++ b/git-sound.py @@ -158,6 +158,7 @@ class GitSoundWindow(object): self.skip_spin = self.builder.get_object('skip-spin') 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.gitmidi = None @@ -291,6 +292,7 @@ class GitSoundWindow(object): scale_selected = self.scale_combo.get_active_id() skip = int(self.skip_spin.get_value()) vol_deviation = int(self.vol_spin.get_value()) + notelen = self.notelen_spin.get_value() self.set_status("Generating data") self.progressbar.set_fraction(0.0) @@ -301,7 +303,8 @@ class GitSoundWindow(object): scale=SCALES[scale_selected][1], program=PROGRAMS[program_selected], volume_range=vol_deviation, - skip=skip) + skip=skip, + note_duration=notelen) 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 b735f74..aca6204 100644 --- a/git-sound.ui +++ b/git-sound.ui @@ -35,6 +35,13 @@ 1 10 + + 0.1 + 10.0 + 0.1 + 1 + 0.3 + False Git Sound @@ -110,7 +117,7 @@ 0 - 6 + 7 1 1 @@ -128,7 +135,7 @@ 1 - 6 + 7 1 1 @@ -146,7 +153,7 @@ 3 - 6 + 7 1 1 @@ -159,7 +166,7 @@ 0 - 7 + 8 3 1 @@ -232,7 +239,7 @@ 0 - 8 + 9 4 1 @@ -245,7 +252,7 @@ 3 - 7 + 8 1 1 @@ -278,6 +285,36 @@ 1 + + + True + False + Note length + + + 0 + 6 + 1 + 1 + + + + + True + True + 0.3 + notelen-adjustment + 0.3 + 1 + + + + 1 + 6 + 3 + 1 + + True @@ -320,7 +357,7 @@ 2 - 6 + 7 1 1