I am building a patch that will scale the gain of multiple sf-play2~ object based on the number of tracks that are playing.

If only 1 track is playing - gain is 1. if 2 - gain of each track that playing is 0.5 etc etc
my idea seems to work but I was wondering if there is more simple solution for my above?

Screen Shot 2023-01-21 at 11.59.03.png sf-play2 scaling example.pd