danigb / smplr

A web audio sampler instrument
https://danigb.github.io/smplr/
186 stars 19 forks source link

The use of multi-instrument setVolume is a problem of being set globally #6

Closed AlanPaine closed 1 year ago

AlanPaine commented 1 year ago

Creating multiple instruments' Soundfont 'at the same time using' setVolume 'causes the other instruments to be changed as well. How to set a single volume instead of a global one

danigb commented 1 year ago

The volume is set globally for each instrument. It means that it will affect all notes of the given instrument.

See example: https://jsfiddle.net/k235cmp4/1/