Volume control of start_tone within Adafruit code

For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
rickseiden
 
Posts: 66
Joined: Thu Oct 06, 2016 2:48 pm

Volume control of start_tone within Adafruit code

Post by rickseiden »

Hello,

Is there any way to control the volume of the sound coming from the Clue when using adafruit_clue.clue.start_tone?

For exmple:

Code: Select all

from adafruit_clue import clue
from time import sleep
while True:
     # some Adafruit code like clue.set_volume(1) for 100%
     clue.start_tone(650)
     sleep(0.5)
     clue.stop_tone()
     # some Adafruit code like clue.set_volume(0.75) for 75%
     clue.start_tone(750)
     sleep(0.5)
     clue.stop_tone()
I found this post about using audiomixer, but if there's an "official" set of Adafruit code that does this, I'd rather use that.

Thank you

Locked
Please be positive and constructive with your questions and comments.

Return to “CLUE Board”