From 6dc403396d76e156c8917029eaec55e403af68ce Mon Sep 17 00:00:00 2001 From: Pacien TRAN-GIRARD Date: Sun, 15 Jun 2014 19:30:54 +0200 Subject: Add author and absolute value --- src/mxml2csv.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mxml2csv.go b/src/mxml2csv.go index 21dcbb4..9b97f53 100644 --- a/src/mxml2csv.go +++ b/src/mxml2csv.go @@ -82,7 +82,7 @@ func calcFrequency(pitch Pitch) float64 { if pitch.Step == "" { return 0 } - return REFERENCE_PITCH * float64(pitch.Octave-3) * math.Pow(2, float64(pitchOffset[pitch.Step]+pitch.Alter)/12) + return math.Abs(REFERENCE_PITCH * float64(pitch.Octave-3) * math.Pow(2, float64(pitchOffset[pitch.Step]+pitch.Alter)/12)) } /***** Division calculation *****/ @@ -122,7 +122,7 @@ func calcDuration(noteDuration int, divisions int, tempo float64) float64 { func main() { if *versionFlag { - fmt.Println("Version:", APP_VERSION) + fmt.Println("MusicXML to CSV converter\n2014 Pacien TRAN-GIRARD\nVersion:", APP_VERSION) return } -- cgit v1.2.3