paulrosen / abcjs

javascript for rendering abc music notation
Other
1.91k stars 282 forks source link

When doing .wav export any x/8 tune without specific Q: tempos, the speed in the .wav is wrong #937

Open seisiuneer opened 1 year ago

seisiuneer commented 1 year ago

I added .wav export to my ABC Transcriptions Tools, ran into this issue.

The reference drawthedots page does the same thing, for example with this ABC:

X: 1 T: The Kesh R: Jig M: 6/8 L: 1/8 K: Gmaj C: Traditional |:"G"GAG GAB|"D"ABA ABd|"G"edd gdd|"C"edB "D"dBA| "G"GAG GAB|"D"ABA ABd|"G"edd gdB|"D"AGF "G"G3:| |:"G"BAB dBd|"C"ege "D"dBA|"G"BAB dBG|"D"ABA AGA| "G"BAB dBd|"C"ege "G"dBd|"C"gfg "D"aga|"G"bgf g3:|

If you play the tune, it plays at a reasonable speed, if you export .wav, the speed is doubled.

In my tool, to work around this, I'm detecting that it's either a 6/8, 9/8, or 12/8 tune without a Q: tag and adjusting the millisecondsPerMeasure as required, required different values for each meter.

If there is a Q: tag, there is no issue with the speed in the .wav file.

paulrosen commented 1 year ago

Thanks for the bug report! Interestingly, the midi download is the right speed.