xmlparser

package
v0.0.0-...-65c6d10 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchAll

func FetchAll() []os.FileInfo

Types

type Attributes

type Attributes struct {
	Key       Key  `xml:"key"`
	Time      Time `xml:"time"`
	Divisions int  `xml:"divisions"`
	Clef      Clef `xml:"clef"`
}

Attributes represents

type Bar

type Bar struct {
	Number    int        `xml:"number,attr"`
	Atters    Attributes `xml:"attributes"`
	Harmonies []Harmony  `xml:"harmony"`
	//	HarmonyTag []HarmonyTag `xml:"harmony"`
	Notes   []Note  `xml:"note"`
	Forward Forward `xml:"forward"`
}

Measure represents a measure in a piece of music

type ChordConvert

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

type Clef

type Clef struct {
	Sign string `xml:"sign"`
	Line int    `xml:"line"`
}

Clef represents a clef change

type Degree

type Degree struct {
	DegreeValue string `xml:"degree-value"`
	DegreeAlter string `xml:"degree-alter"`
	DegreeType  string `xml:"degree-type"`
}

type Encoding

type Encoding struct {
	Software string `xml:"software"`
	Date     string `xml:"encoding-date"`
}

Encoding holds encoding info

type Forward

type Forward struct {
	Duration int `xml:"duration"`
}

type Harmony

type Harmony struct {
	Default string `xml:"default-y,attr"`
	Print   string `xml:"print-object,attr"`
	Root    Root   `xml:"root"`
	Type    string `xml:"kind"`
	Degree  Degree `xml:"degree"`
}

type Identification

type Identification struct {
	Composer string `xml:"creator"`
	Encoding `xml:"encoding"`
	Rights   string `xml:"rights"`
	Source   string `xml:"source"`
	Title    string `xml:"movement-title"`
}

Identification holds all of the ident information for a music xml file

type Key

type Key struct {
	Fifths int    `xml:"fifths"`
	Mode   string `xml:"mode"`
}

Key represents a key signature change

type KeyConvert

type KeyConvert struct {
	Key int
}

type MXLDoc

type MXLDoc struct {
	Score          xml.Name `xml:"score-partwise"`
	Identification `xml:"identification"`
	Parts          []Part `xml:"part"`
}

MXLDoc holds all data for a music xml file

type Note

type Note struct {
	Pitch    Pitch    `xml:"pitch"`
	Duration int      `xml:"duration"`
	Dot      xml.Name `xml:"dot"`
	Voice    int      `xml:"voice"`
	Type     string   `xml:"type"`
	Rest     xml.Name `xml:"rest"`
	Chord    xml.Name `xml:"chord"`
	Tie      Tie      `xml:"tie"`
}

Note represents a note in a measure

type NoteDuration

type NoteDuration struct {
	Type   string
	Dotted bool
}

type Parser

type Parser struct {
	MusicXml MXLDoc
}

func (*Parser) GetBarCount

func (p *Parser) GetBarCount() int

func (*Parser) GetBarDuration

func (p *Parser) GetBarDuration() int

func (*Parser) GetSixteenthNote

func (p *Parser) GetSixteenthNote() int

func (*Parser) Parse

func (p *Parser) Parse() (string, error)

func (*Parser) ParseChordsFromBar

func (p *Parser) ParseChordsFromBar(index int) (string, error)

func (*Parser) ParseNotesFormBar

func (p *Parser) ParseNotesFormBar(index int) string

func (*Parser) TotalDivisibleLength

func (p *Parser) TotalDivisibleLength(length int) int

type Part

type Part struct {
	Id   string `xml:"id,attr"`
	Bars []Bar  `xml:"measure"`
}

Part represents a part in a piece of music

type Pitch

type Pitch struct {
	Accidental int8   `xml:"alter"`
	Step       string `xml:"step"`
	Octave     int    `xml:"octave"`
}

Pitch represents the pitch of a note

type PitchConvert

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

type Root

type Root struct {
	RootNote  string `xml:"root-step"`
	SharpFlat int    `xml:"root-alter"`
}

type Tie

type Tie struct {
	Type string `xml:"type,attr"`
}

Tie represents whether or not a note is tied.

type Time

type Time struct {
	Beats    int `xml:"beats"`
	BeatType int `xml:"beat-type"`
}

Time represents a time signature change

type Validate

type Validate struct {
	Bars []Bar
}

func (*Validate) CheckDurations

func (v *Validate) CheckDurations() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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