[solved] problem with sampler volume adjustment
Hi all,
Thank you for this great forum.
I am trying to set the volume of a synthesizer.
Can't find what I'm doing wrong..
(
I will be greatful if someone can point me to the right direction.
Thank you!
###volume adjustment
vol=0.5
my_canvas.clear()
my_canvas.text('set the volume')
my_canvas.show()
while True:
my_keyboard = keyboard(keylist=['UP','space'], timeout=None)
key, end_time = my_keyboard.get_key()
if key=='space':
break
test=synth(exp, osc='sine', freq=850, attack=5,decay=5, length=50)
test.volume(vol) ### code works fine without this line...
test.play()
Comments
Ah,
I found the problem.
The volume is a property not a function.
http://osdoc.cogsci.nl/3.0/python/sampler/#backwards-incompatible-changes-from-29-to-30
Thank you
This code works
Exactly! This is one of the few intentional backward-incompatible changes in 3.0:
Check out SigmundAI.eu for our OpenSesame AI assistant!