Skip to content

Commit

Permalink
Add end beam info.
Browse files Browse the repository at this point in the history
  • Loading branch information
hanwen committed Aug 4, 2012
1 parent dab321a commit 5ee4948
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
14 changes: 13 additions & 1 deletion analyze.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ func analyze(d *encore.Data) {
// analyzeMeasStaff(d)
// analyzeStaffdata(d)
// analyzeStaffHeader(d)
analyzeLine(d)
// analyzeLine(d)
analyzeBeam(d)
}

func analyzeTags(content []byte) {
Expand Down Expand Up @@ -113,6 +114,17 @@ func analyzeStaffdata(d *encore.Data) {
}
}

func analyzeBeam(d *encore.Data) {
for _, m := range d.Measures {
for _, e := range m.Elems {
if e.GetTypeName() == "Beam" {
fmt.Printf("meas %d %+v %+v\n", m.Id, e, e.TypeSpecific)

}
}
}
}

func analyzeStaffHeader(d *encore.Data) {
occs := make([]map[int]int, len(d.Staff[0].VarData))
for i := range occs {
Expand Down
1 change: 1 addition & 0 deletions encore/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ type Beam struct {
NoDuration
LeftPos int8 `offset:"18"`
RightPos int8 `offset:"19"`
EndNoteTicks uint16 `offset:"20"`
}

func (o *Beam) GetTypeName() string {
Expand Down

0 comments on commit 5ee4948

Please sign in to comment.