MCPcopy Create free account
hub / github.com/CoderLine/alphaTab / parseNoteHead

Method parseNoteHead

packages/alphatab/src/importer/GpifParser.ts:874–924  ·  view source on GitHub ↗

* @internal

(txt: string)

Source from the content-addressed store, hash-verified

872 * @internal
873 */
874 public static parseNoteHead(txt: string): MusicFontSymbol {
875 switch (txt) {
876 case 'noteheadDoubleWholeSquare':
877 return MusicFontSymbol.NoteheadDoubleWholeSquare;
878 case 'noteheadDoubleWhole':
879 return MusicFontSymbol.NoteheadDoubleWhole;
880 case 'noteheadWhole':
881 return MusicFontSymbol.NoteheadWhole;
882 case 'noteheadHalf':
883 return MusicFontSymbol.NoteheadHalf;
884 case 'noteheadBlack':
885 return MusicFontSymbol.NoteheadBlack;
886 case 'noteheadNull':
887 return MusicFontSymbol.NoteheadNull;
888 case 'noteheadXOrnate':
889 return MusicFontSymbol.NoteheadXOrnate;
890 case 'noteheadTriangleUpWhole':
891 return MusicFontSymbol.NoteheadTriangleUpWhole;
892 case 'noteheadTriangleUpHalf':
893 return MusicFontSymbol.NoteheadTriangleUpHalf;
894 case 'noteheadTriangleUpBlack':
895 return MusicFontSymbol.NoteheadTriangleUpBlack;
896 case 'noteheadDiamondBlackWide':
897 return MusicFontSymbol.NoteheadDiamondBlackWide;
898 case 'noteheadDiamondWhite':
899 return MusicFontSymbol.NoteheadDiamondWhite;
900 case 'noteheadDiamondWhiteWide':
901 return MusicFontSymbol.NoteheadDiamondWhiteWide;
902 case 'noteheadCircleX':
903 return MusicFontSymbol.NoteheadCircleX;
904 case 'noteheadXWhole':
905 return MusicFontSymbol.NoteheadXWhole;
906 case 'noteheadXHalf':
907 return MusicFontSymbol.NoteheadXHalf;
908 case 'noteheadXBlack':
909 return MusicFontSymbol.NoteheadXBlack;
910 case 'noteheadParenthesis':
911 return MusicFontSymbol.NoteheadParenthesis;
912 case 'noteheadSlashedBlack2':
913 return MusicFontSymbol.NoteheadSlashedBlack2;
914 case 'noteheadCircleSlash':
915 return MusicFontSymbol.NoteheadCircleSlash;
916 case 'noteheadHeavyX':
917 return MusicFontSymbol.NoteheadHeavyX;
918 case 'noteheadHeavyXHat':
919 return MusicFontSymbol.NoteheadHeavyXHat;
920 default:
921 Logger.warning('GPIF', 'Unknown notehead symbol', txt);
922 return MusicFontSymbol.None;
923 }
924 }
925
926 private _parseStaves(track: Track, node: XmlNode): void {
927 let staffIndex: number = 0;

Callers 2

readFullInstrumentSetFunction · 0.80
_parseArticulationMethod · 0.80

Calls 1

warningMethod · 0.65

Tested by 1

readFullInstrumentSetFunction · 0.64