Commit 748c6cda authored by Ed Rogers's avatar Ed Rogers
Browse files

Choose next sound based on current bounds

parent 0540cc2f
......@@ -47,9 +47,14 @@ class HearingTest:
def play_next_sound(self):
# TODO select tone based on results
volume = random.random()
freq = random.choice(self.freqs)
# TODO allow tone outside lims with low prob?
choices = []
for i, freq in enumerate(self.freqs):
choices.extend([(freq, v) for v in
np.arange(self.lower_bounds[i], self.upper_bounds[i], self.get_block_size())])
freq, volume = random.choice(choices), volume)
played_time = time.time()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment