diff options
author | Pacien TRAN-GIRARD | 2014-06-15 19:30:54 +0200 |
---|---|---|
committer | Pacien TRAN-GIRARD | 2014-06-15 19:30:54 +0200 |
commit | 6dc403396d76e156c8917029eaec55e403af68ce (patch) | |
tree | 5f459249c8dd6759ba30bdf199b266ae3cf6255a /src | |
parent | c56de915f2e9fc6ae2eb0697f9bd82d725306396 (diff) | |
download | labviewplayer-6dc403396d76e156c8917029eaec55e403af68ce.tar.gz |
Add author and absolute value
Diffstat (limited to 'src')
-rw-r--r-- | src/mxml2csv.go | 4 |
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 { | |||
122 | func main() { | 122 | func 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 | ||