Reputation: 1333
I'm new to the world of library API's, and not having much luck figuring out ToneJS. In particular I, am trying to change the setting on volume.
I've got: let appVol = new Tone.Volume()
. I'd like the user to be able to change that default '0' setting. From looking at the link above, it seems like appVol.volume = -12
should work to do this; it does not.
What is the correct code to do this? And if you can explain it - what am I missing here?
Upvotes: 0
Views: 2504
Reputation: 1333
Turns out that .volume
, like many properties in ToneJS, is a signal-rate-property ... this means that it needs to be manipulated as such: appVol.volume.value = -12
.
Signal-rate properties can be identified in the ToneJS API docs by the presence of a circled "~" to the left of the description.
Upvotes: 3