musicxml

package module
v0.0.0-...-c512b0b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2018 License: MIT Imports: 7 Imported by: 0

README

MusicXML parser for Go.


  • This package parses MusicXML files into a simple tree-like structure. It provides the bare minimum functions needed to traverse the XML tree.

  • To parse a MusicXML file, use

    • ParseXMLBuffer(XMLFileReader io.Reader).

    • ParseXMLFile(XMLFilePath string).

    • ParseMXLFile(MXLFilePath string)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MusicXML

type MusicXML struct {
	// contains filtered or unexported fields
}

MusicXML is a container for MusicXML data parsed into a MXML struct.

func NewMusicXML

func NewMusicXML() *MusicXML

NewMusicXML returns a new empty MusicXML struct.

func (*MusicXML) Creators

func (m *MusicXML) Creators() []string

Creators returns the creators of the score.

func (*MusicXML) MXML

func (m *MusicXML) MXML() *mxml.MXML

MXML returns the musicxml tree as MXML.

func (*MusicXML) ParseMXLFile

func (m *MusicXML) ParseMXLFile(filePath string) (*MusicXML, error)

ParseMXLFile parses a MusicXML data from a mxl file into a MusicXML struct.

func (*MusicXML) ParseXMLBuffer

func (m *MusicXML) ParseXMLBuffer(r io.Reader) (*MusicXML, error)

ParseXMLBuffer parses MusicXML data from a io.Reader into a MusicXML struct.

func (*MusicXML) ParseXMLFile

func (m *MusicXML) ParseXMLFile(filePath string) (*MusicXML, error)

ParseXMLFile parses MusicXML data from a file into a MusicXML struct.

func (*MusicXML) Rights

func (m *MusicXML) Rights() []string

Rights returns the copyright and other intellectual property notices of the score.

func (*MusicXML) SetMXML

func (m *MusicXML) SetMXML(mx *mxml.MXML) (*MusicXML, error)

SetMXML sets a MXML to the MusicXML struct.

func (*MusicXML) WorkTitle

func (m *MusicXML) WorkTitle() string

WorkTitle returns the title of the score.

func (*MusicXML) XMLRoot

func (m *MusicXML) XMLRoot() string

XMLRoot returns the name of the root MusicXML element. Right now it can return only score-partwise.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL