The counterpart of toNoteData for instruments: an entry point takes
whatever form the caller has — the profile a project file holds, one of the
built-in profiles, or an Instrument instance — and gets one shape back. An
instance is accepted through its toJSON method rather than by its type,
because the core layer cannot import the model layer that defines the class.
If the value names no instrument, or the instrument it names is
contradictory — a neck with no strings, a fret count that is no count, or a
kit no limb reaches.
Resolve any instrument-shaped value to a plain InstrumentProfile.
The counterpart of toNoteData for instruments: an entry point takes whatever form the caller has — the profile a project file holds, one of the built-in profiles, or an
Instrumentinstance — and gets one shape back. An instance is accepted through itstoJSONmethod rather than by its type, because the core layer cannot import the model layer that defines the class.