Skip to content

Commit 29ccd4d

Browse files
committed
fix(rhythm): first note rest dont separate
1 parent b621919 commit 29ccd4d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

internal/rhythm/splitter/quater.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ func (qs *quaterSpliiter) SplitSingle(ctx context.Context, notes []*entity.NoteR
305305
default:
306306
if diff > 6 {
307307
startIndex := segment.StartIndex
308-
if diff%2 == 1 {
308+
if diff%2 == 1 && !notes[startIndex].IsRest {
309309
notes[startIndex].UpdateBeam(beamNo, musicxml.NoteBeamTypeEnd)
310310
notes[startIndex+1].UpdateBeam(beamNo, musicxml.NoteBeamTypeBegin)
311311
startIndex = startIndex + 2

0 commit comments

Comments
 (0)