nstrName :: Int -> Maybe String


gmClef x = Data.Maybe.fromMaybe 0 $ fmap (go . Data._standardClef) $ Data.getInstrumentDefByGeneralMidiProgram (x + 1)
  where
    go cs | head cs == trebleClef = 0
          | head cs == altoClef   = 1
          | head cs == bassClef   = 2
          | otherwise = error "gmClef: Unknown clef"

g
gmInstrName :: Int -> Maybe String
gmClef x = Data.Maybe.fromMaybe 0 $ fmap (go . Data._standardClef) $ Data.getInstrumentDefByGeneralMidiProgram (x + 1)
  where
    go cs | head cs == trebleClef = 0
          | head cs == altoClef   = 1
          | head cs == bassClef   = 2
          | otherwise = error "gmClef: Unknown clef"
gmClef x = Data.Maybe.fromMaybe 0 $ fmap (go . Data._standardClef) $ Data.getInstrumentDefByGeneralMidiProgram (x + 1)
  where
    go cs | head cs == trebleClef = 0
          | head cs == altoClef   = 1
          | head cs == bassClef   = 2
          | otherwise = error "gmClef: Unknown clef"