summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mxml2csv.go4
1 files changed, 2 insertions, 2 deletions
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 {
82 if pitch.Step == "" { 82 if pitch.Step == "" {
83 return 0 83 return 0
84 } 84 }
85 return REFERENCE_PITCH * float64(pitch.Octave-3) * math.Pow(2, float64(pitchOffset[pitch.Step]+pitch.Alter)/12) 85 return math.Abs(REFERENCE_PITCH * float64(pitch.Octave-3) * math.Pow(2, float64(pitchOffset[pitch.Step]+pitch.Alter)/12))
86} 86}
87 87
88/***** Division calculation *****/ 88/***** Division calculation *****/
@@ -122,7 +122,7 @@ func calcDuration(noteDuration int, divisions int, tempo float64) float64 {
122func main() { 122func main() {
123 123
124 if *versionFlag { 124 if *versionFlag {
125 fmt.Println("Version:", APP_VERSION) 125 fmt.Println("MusicXML to CSV converter\n2014 Pacien TRAN-GIRARD\nVersion:", APP_VERSION)
126 return 126 return
127 } 127 }
128 128