[PR #18391] Feat/music annotation #28905

Closed
opened 2026-02-21 20:44:21 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/18391

State: closed
Merged: Yes


Summary

Close https://github.com/langgenius/dify/issues/18390

Examples

X: 1
T: Cooley's
M: 4/4
L: 1/8
K: Emin
|:D2|"Em"EBBA B2 EB|\
    ~B2 AB dBAG|\
    "D"FDAD BDAD|\
    FDAD dAFD|
"Em"EBBA B2 EB|\
    B2 AB defg|\
    "D"afe^c dBAF|\
    "Em"DEFD E2:|
|:gf|"Em"eB B2 efge|\
    eB B2 gedB|\
    "D"A2 FA DAFA|\
    A2 FA defg|
"Em"eB B2 eBgB|\
    eB B2 defg|\
    "D"afe^c dBAF|\
    "Em"DEFD E2:|
X: 1
T: Jingle Bells [A]
C:James Lord Pierpont, 1857
M: 2/4
L: 1/8
Q: 120
K: A
[| Ec BA | E3 E/-E/ | Ec BA | F4 | Fd cB | G3 e | fe dB | c4 ||
|| Ec BA | E3 E/-E/ | Ec BA | F3 F | Fd cB | ee ee | fe dB | A2 z2 |
|: cc c2 | cc c2 | ce A>B | c4 | dd d>d | dc cc/c/ |1 cB Bc | B2 e2 :|2 ee dB | A4 |]
X: 1
M: 4/4
L: 1/4
U:n=!style=x!
K:perc
V:ALL stem=up
[P:Open Hi-Hat]!open!ng !open!ng !open!ng !open!ng |\
[P:Closed Hi-Hat]!+!ng !+!ng !+!ng !+!ng |\
[P:Ghost Notes]"<("">)"B "<("">)"B "<("">)"B "<("">)"B |
  tabstave notation=true key=A time=4/4

  notes :q =|: (5/2.5/3.7/4) :8 7-5h6/3 ^3^ 5h6-7/5 ^3^ :q 7V/4 |
  notes :8 t12p7/4 s5s3/4 :8 3s:16:5-7/5 :q p5/4
  text :w, |#segno, ,|, :hd, , #tr
X:1
T:Pulse Chase
C:Original by Grok
M:4/4
L:1/8
Q:1/4=120
K:C
% 右手旋律 (R) 和 左手伴奏 (L) 分开标注,实际一起弹奏
V:1 name="Right Hand" clef=treble
V:2 name="Left Hand" clef=bass
%
[V:1] |: G4 E2 C2 | D4 E2 G2 | A4 G2 E2 | G6 z2 :| % 重复4小节
[V:2] |: C,4 G,4 | C,4 G,4 | F,4 C,4 | G,6 z2 :|
%
[V:1] | C4 E4 | G4 A2 G2 | F4 E2 C2 | D6 z2 |
[V:2] | C,4 G,4 | C,4 G,4 | F,4 C,4 | G,6 z2 |
%
[V:1] | G2 A2 G2 E2 | C4 E2 G2 | A4 G2 F2 | E6 z2 |
[V:2] | C,4 G,4 | C,4 G,4 | F,4 C,4 | C,6 z2 |
%
[V:1] | G4 E2 C2 | D4 E2 G2 | C6 E2 | C8 ||
[V:2] | C,4 G,4 | C,4 G,4 | C,4 G,4 | C,8 ||

Screenshots

Before After
image image

Checklist

Important

Please review the checklist below before submitting your pull request.

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
**Original Pull Request:** https://github.com/langgenius/dify/pull/18391 **State:** closed **Merged:** Yes --- # Summary Close https://github.com/langgenius/dify/issues/18390 ## Examples ```abc X: 1 T: Cooley's M: 4/4 L: 1/8 K: Emin |:D2|"Em"EBBA B2 EB|\ ~B2 AB dBAG|\ "D"FDAD BDAD|\ FDAD dAFD| "Em"EBBA B2 EB|\ B2 AB defg|\ "D"afe^c dBAF|\ "Em"DEFD E2:| |:gf|"Em"eB B2 efge|\ eB B2 gedB|\ "D"A2 FA DAFA|\ A2 FA defg| "Em"eB B2 eBgB|\ eB B2 defg|\ "D"afe^c dBAF|\ "Em"DEFD E2:| ``` ```abc X: 1 T: Jingle Bells [A] C:James Lord Pierpont, 1857 M: 2/4 L: 1/8 Q: 120 K: A [| Ec BA | E3 E/-E/ | Ec BA | F4 | Fd cB | G3 e | fe dB | c4 || || Ec BA | E3 E/-E/ | Ec BA | F3 F | Fd cB | ee ee | fe dB | A2 z2 | |: cc c2 | cc c2 | ce A>B | c4 | dd d>d | dc cc/c/ |1 cB Bc | B2 e2 :|2 ee dB | A4 |] ``` ```abc X: 1 M: 4/4 L: 1/4 U:n=!style=x! K:perc V:ALL stem=up [P:Open Hi-Hat]!open!ng !open!ng !open!ng !open!ng |\ [P:Closed Hi-Hat]!+!ng !+!ng !+!ng !+!ng |\ [P:Ghost Notes]"<("">)"B "<("">)"B "<("">)"B "<("">)"B | ``` ```abc tabstave notation=true key=A time=4/4 notes :q =|: (5/2.5/3.7/4) :8 7-5h6/3 ^3^ 5h6-7/5 ^3^ :q 7V/4 | notes :8 t12p7/4 s5s3/4 :8 3s:16:5-7/5 :q p5/4 text :w, |#segno, ,|, :hd, , #tr ``` ```abc X:1 T:Pulse Chase C:Original by Grok M:4/4 L:1/8 Q:1/4=120 K:C % 右手旋律 (R) 和 左手伴奏 (L) 分开标注,实际一起弹奏 V:1 name="Right Hand" clef=treble V:2 name="Left Hand" clef=bass % [V:1] |: G4 E2 C2 | D4 E2 G2 | A4 G2 E2 | G6 z2 :| % 重复4小节 [V:2] |: C,4 G,4 | C,4 G,4 | F,4 C,4 | G,6 z2 :| % [V:1] | C4 E4 | G4 A2 G2 | F4 E2 C2 | D6 z2 | [V:2] | C,4 G,4 | C,4 G,4 | F,4 C,4 | G,6 z2 | % [V:1] | G2 A2 G2 E2 | C4 E2 G2 | A4 G2 F2 | E6 z2 | [V:2] | C,4 G,4 | C,4 G,4 | F,4 C,4 | C,6 z2 | % [V:1] | G4 E2 C2 | D4 E2 G2 | C6 E2 | C8 || [V:2] | C,4 G,4 | C,4 G,4 | C,4 G,4 | C,8 || ``` # Screenshots | Before | After | |--------|-------| | ![image](https://github.com/user-attachments/assets/1ad61a6a-ee73-4193-b4f4-edfbf8a68bce) | <img width="1175" alt="image" src="https://github.com/user-attachments/assets/584dd132-fe1a-4810-bbc8-abbdbbfa3b98" /> | # Checklist > [!IMPORTANT] > Please review the checklist below before submitting your pull request. - [ ] This change requires a documentation update, included: [Dify Document](https://github.com/langgenius/dify-docs) - [x] I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!) - [x] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change. - [x] I've updated the documentation accordingly. - [x] I ran `dev/reformat`(backend) and `cd web && npx lint-staged`(frontend) to appease the lint gods
yindo added the pull-request label 2026-02-21 20:44:21 -05:00
yindo closed this issue 2026-02-21 20:44:21 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#28905