Skip to content
This repository has been archived by the owner on Jun 9, 2019. It is now read-only.

Change volume of note continuously #30

Open
pehrlich opened this issue Sep 15, 2014 · 1 comment
Open

Change volume of note continuously #30

pehrlich opened this issue Sep 15, 2014 · 1 comment

Comments

@pehrlich
Copy link

I have a synthDef, on which is called noteOn and noteOff. I am also hackishly changing the volume of the gen, by calling .set({mul: value}).

I notice that this causes a disruption, which is very obvious when changed at a fast rate. E.g., if I update the mul every 16ms, then it is more clicks and white noise than a continuous function.

Is there a more correct way of doing this?

Thanks!

Edit, here's a good way to test, where list[0] is a synthGen:

   i = 0; setInterval(function(){ 
  i++; list[0].set({mul: 1000000 * 0.5 * (Math.sin(i / Math.PI / 2) )  })
 }, 16)
@pehrlich
Copy link
Author

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

No branches or pull requests

1 participant