Play samples using multiple sound channels to increase polyphony
LenweSaralonde opened this issue ยท 0 comments
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 :
- It's no longer possible for the player to adjust Musician's music along using the SFX volume slider
SFX
andDialog
channels volume should be set to the maximum to avoid notes played in these 2 channels to sound quieter than the ones inMaster
- The music can be insanely loud and audio can clip, with no other ways than reducing the master volume.
- The player should set
Sound_NumChannels
to 128 which is not possible using the audio settings panel, but fully supported
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)
- By default, all 3 channels are selected.
- If the
SFX
channel is checked along withMaster
, theSFX
volume channel is automatically set to 100% - If the
Dialog
channel is checked along withMaster
, theDialog
volume channel is set to 100% - If only
SFX
andDialog
are used, the volume of the quietest channel will be set to the same amount of the loudest one. - The amount of
Sound_NumChannels
is automatically increased if needed - If none is selected, music will be played in
SFX
only and no additional audio setting will be changed
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.