Could this be extended to allow variant sounds, like it's done with samples -- bd
producing bd:0
, but also allowing bd:1
mapped to a different note, and so forth? This would be great for drum machines that offer different sounds per "instrument"; more generally, putting together arbitrary groups of sounds and selecting from them with patterns should be fun.
Described the use case in this comment: Writing addon library for MIDI instruments - #10 by johanw. (Learning some Haskell would make sense, but until then..)
Would inhabit
be a reasonable way to write such a lookup? The point that a name could "trigger more than one event" is intriguing.