Talk:Musical instrument

From NetHackWiki
Revision as of 00:14, 9 April 2023 by Cathartes (talk | contribs) (Definition of instrument: source code considers whistles to be instruments)
Jump to navigation Jump to search

Definition of instrument

The tin whistle article calls it an atonal instrument, but the atonal instrument article contradicts that and says it's not an instrument. As far as I know, NetHack has no formal classification of "musical instrument". There's the informal definition of "an elf might start with one", but that of course excludes the magical ones. On the basis that they exist to make noise, I think the whistles should be considered atonal instruments, and we can add notes to the appropriate articles that elves never start with them. --Darth l33t (talk) 23:41, 8 April 2023 (UTC)

I was thinking that the best formal definition is what items call do_play_instrument() when applied, but bells and whistles don't use that.[1] Then I found that a comment in the object definitions actually does consider tin whistles and magic whistles to be instruments.[2] Cathartes (talk) 00:13, 9 April 2023 (UTC)
  1. src/apply.c in NetHack 3.6.7, line 3723-L3733
  2. src/objects.c in NetHack 3.6.7, line 685-L701