LenweSaralonde / Musician

Add-on for World of Warcraft to perform music in game.
https://musician.lenwe.io
GNU General Public License v3.0
11 stars 4 forks source link

Play samples using multiple sound channels to increase polyphony #60

Closed LenweSaralonde closed 3 years ago

LenweSaralonde commented 3 years ago

Musician currently plays its samples using the SFX channel. As discovered in this discussion, each sound channel appear to have its own fixed cap for simultaneous sounds, regardless to the total number of sound channels (Sound_NumChannels). For example, SFX can handle 15, Dialog 20 and Master 30 which means that 15 + 20 + 30 = 65 simultaneous sounds can be played if we use those 3 channels.

A quick experiment shows that setting Sound_NumChannels to 128 and playing music using Master, SFX and Dialog channels simultaneously just sounds amazing and definitely resolves the limited polyphony issue.

The drawbacks are :

The solution is to allow the player to choose which channel(s) they want to use with Musician in the add-on options panel, following this order :

Master (30) > SFX (15) > Dialog (20)

The "Audio channels" section will consist in 3 checkboxes indicating the resulting available polyphony. A small text is added to explain the behavior and which audio settings will be changed.

Audio channels

Check more audio channels to increase the maximum number of notes Musician can play simultaneously. Depending on the selected options, some audio settings will need to be adjusted.

[x] Master (30) > [x] SFX (15) > [x] Dialog (20) ==> Max polyphony: 65

(i) The volume of SFX and Dialog will be set to 100%. (i) The number of audio channels will be set to 128.