Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sine.set_voume isn't working #15

Open
cwrightlibrary opened this issue Aug 10, 2023 · 1 comment
Open

sine.set_voume isn't working #15

cwrightlibrary opened this issue Aug 10, 2023 · 1 comment

Comments

@cwrightlibrary
Copy link

Just installed pysinewave and I'm a huge fan so far but I'm having a problem with sine.set_volume not working. I'm not sure if I'm just not using it correctly but here's the code I'm using:

import time
from pysinewave import SineWave

note = 12
vol = 30
sine = SineWave(pitch=note, pitch_per_second=20)

sine.set_volume(-100)

sine.play()

time.sleep(1)

sine.set_pitch(+14)

time.sleep(1)

sine.set_volume(-10)

time.sleep(0.5)

while True:
    sine.set_pitch(+1)
    time.sleep(0.075)
    sine.set_pitch(-1)
    time.sleep(0.075)

Originally, I was going to change the value of the volume with decibels from 30 to 20 or something similar just to test it out but it wasn't working so I went to extremes and tried 0 for the input as well as what I have above.

I'm using PyCharm to write my code on a M1 MacBook Air.

@cwrightlibrary
Copy link
Author

My bad, I just realized I need to add the decibels_per_second line in the SineWave.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant