>From 2e6b1ec540b9d391bdecb68511407dcf7aa78424 Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Wed, 17 Feb 2016 12:17:28 -0600 Subject: [PATCH] Use a narrower band and linear progression for progress bar beeps. --- src/orca/sound_generator.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/orca/sound_generator.py b/src/orca/sound_generator.py index b8a79df..e27a88f 100644 --- a/src/orca/sound_generator.py +++ b/src/orca/sound_generator.py @@ -307,11 +307,9 @@ class SoundGenerator(generator.Generator): # Reduce volume as pitch increases. volumeMultiplier = 1 - (percent / 120) - # Adjusting so that the initial beeps are not too deep. - if percent < 7: - frequency = int(98 + percent * 5.4) - else: - frequency = int(percent * 22) + octaveStart = 261.6 # middle C + ratio = percent * 0.01 + frequency = octaveStart + octaveStart * ratio return [Tone(duration, frequency, volumeMultiplier, Tone.SINE_WAVE)] -- 2.5.0