paulrosen / abcjs

javascript for rendering abc music notation
Other
1.9k stars 281 forks source link

Measure Loop #714

Open db5050 opened 3 years ago

db5050 commented 3 years ago

I use audio for play. Somehow, I couldn't make it ring between two measures. There is a setprogress function. The thing that might work for me here is the beat. However, this method will not give accurate results when there is more than one rhythm in the song. The other percent and millisecond options are already unsuitable for the note. Actually I want something simple. For example, I want to ring between measure 5 and measure 15. Can I do this with abcjs? (Assuming there are 5/8.4/4.7/8 rhythms in a song and lots of repeat marks)

paulrosen commented 3 years ago

I'm not sure what you mean by "ring". Do you mean playing a really long note? What instrument? There is a fixed length to the soundfont notes so it probably won't work to try to play a note more than a few seconds. For some instruments that don't have attack or decay the soundfont could be repeated but that doesn't happen yet.

db5050 commented 3 years ago

Ekran Alıntısı How can I ring between the 3rd and 5th measures?

paulrosen commented 3 years ago

Do you mean "play the d note for the whole 3rd, 4th, and 5th measures"? Sorry to not understand.

db5050 commented 3 years ago

no. I don't know how to explain it any other way. It's not about playing notes, that's what I want. When I press the play button, all the 3rd measure, all the 4th measure, all the 5th measure will be played. Then it will return to the 3rd measure and this cycle will continue continuously. This feature is necessary so that students can continuously study the measure they have chosen.

paulrosen commented 3 years ago

Oh, I see - that is probably a bug. I'll look into it. That should work if there isn't a time sig change but I don't think I tested what you have.

db5050 commented 3 years ago

Any progress on this issue? Actually, this will work for me. If I can see the "beat number" value of the note I clicked, I can repeat the parts I want.