I want to write a command that responds to an argument being in one set of reference strings or another.
The argument takes a (musical) note name, and the command will print an accidental depending on whether the argument is in (a, h, c, d, e, f, g), (ces, des, es, fes, ges, as, b) or (cis, dis, eis, fis, gis, ais, his) (German note names).
In a programming language I would use the in operator to achieve this, but I don't know how to do it in LaTeX.
What I would like to write is
\notewithacc{c}\\
\notewithacc{cis}\\
\notewithacc{des}
and get
\natural c\\
\sharp cis\\
\flat des
as the output.

