From about 2006-2025 I did embedded firmware development for a small electronic music manufacturer. From the outset our agreement was that I owned the source code and they had exclusive rights to use it, paying royalties per unit shipped. This worked well until they ceased operation. Now there's a fairly large user community for these products and in the current climate there are some who'd like to reverse-engineer the firmware and make modifications.
1/2