Q
着色票據由音高
6
A
回答
9
有一個在snippets一個這樣的例子:
%Association list of pitches to colors.
#(define color-mapping
(list
(cons (ly:make-pitch 0 0 0) (x11-color 'red))
(cons (ly:make-pitch 0 0 1/2) (x11-color 'green))
(cons (ly:make-pitch 0 1 -1/2) (x11-color 'green))
(cons (ly:make-pitch 0 2 0) (x11-color 'red))
(cons (ly:make-pitch 0 2 1/2) (x11-color 'green))
(cons (ly:make-pitch 0 3 -1/2) (x11-color 'red))
(cons (ly:make-pitch 0 3 0) (x11-color 'green))
(cons (ly:make-pitch 0 4 1/2) (x11-color 'red))
(cons (ly:make-pitch 0 5 0) (x11-color 'green))
(cons (ly:make-pitch 0 5 -1/2) (x11-color 'red))
(cons (ly:make-pitch 0 6 1/2) (x11-color 'red))
(cons (ly:make-pitch 0 1 0) (x11-color 'blue))
(cons (ly:make-pitch 0 3 1/2) (x11-color 'blue))
(cons (ly:make-pitch 0 4 -1/2) (x11-color 'blue))
(cons (ly:make-pitch 0 5 1/2) (x11-color 'blue))
(cons (ly:make-pitch 0 6 -1/2) (x11-color 'blue))
))
%Compare pitch and alteration (not octave).
#(define (pitch-equals? p1 p2)
(and
(= (ly:pitch-alteration p1) (ly:pitch-alteration p2))
(= (ly:pitch-notename p1) (ly:pitch-notename p2))))
#(define (pitch-to-color pitch)
(let ((color (assoc pitch color-mapping pitch-equals?)))
(if color
(cdr color))))
#(define (color-notehead grob)
(pitch-to-color
(ly:event-property (ly:grob-property grob 'cause) 'pitch)))
\score {
\new Staff \relative c' {
\override NoteHead #'color = #color-notehead
c8 b d dis ees f g aes
}
}
3
有一個問題It is possible to color note heads depending on their pitch?在LilyPond Snippet Repository ♪♫。點擊五線譜即可獲得the answer。
+0
我見過這樣的例子,但顯然沒有足夠的音樂素養來認識到這與鍵盤上的音高變化不一樣:)這確實是這樣的工作! – 2009-12-14 18:41:35
1
OK,這本書Kid's Keyboard Course - Book #1我今年年初在劍橋買了,我現在有這個顏色編碼:
#(define color-mapping
(list
(cons (ly:make-pitch 0 0 0) (x11-color 'magenta))
(cons (ly:make-pitch 0 1 -1/2) (x11-color 'grey))
(cons (ly:make-pitch 0 1 0) (x11-color 'grey))
(cons (ly:make-pitch 0 1 1/2) (x11-color 'grey))
(cons (ly:make-pitch 0 2 0) (x11-color 'red))
(cons (ly:make-pitch 0 2 1/2) (x11-color 'red))
(cons (ly:make-pitch 0 3 -1/2) (x11-color 'green))
(cons (ly:make-pitch 0 3 0) (x11-color 'green))
(cons (ly:make-pitch 0 4 -1/2) (x11-color 'blue))
(cons (ly:make-pitch 0 4 0) (x11-color 'blue))
(cons (ly:make-pitch 0 4 1/2) (x11-color 'blue))
(cons (ly:make-pitch 0 5 0) (x11-color 'yellow))
(cons (ly:make-pitch 0 5 -1/2) (x11-color 'yellow))
(cons (ly:make-pitch 0 5 1/2) (x11-color 'yellow))
(cons (ly:make-pitch 0 6 1/2) (x11-color 'purple))
(cons (ly:make-pitch 0 6 0) (x11-color 'purple))
(cons (ly:make-pitch 0 6 -1/2) (x11-color 'purple))))
相關問題
- 1. 根據最高值着色excel表VBA
- 2. 重新着色股票圖像
- 3. 頂點着色由python-色數X(G)
- 4. AVSpeechSynthesizer高品質音色
- 5. 高斯模糊着色器不模糊
- 6. 着色時的高程問題BottomNavigationView
- 7. 提高Opengl的2.0片段着色器
- 8. 着色/突出顯示崇高文字
- 9. 着色甚至提高列數
- 10. 由Z值着色的3D scatterplot
- 11. 由無符號字符數組着色
- 12. UIAlertController着色顏色默認爲高亮顯示爲藍色
- 13. 崇高文本 - 根據修訂狀態給文件着色
- 14. 由元數據(素食包)着色稀疏曲線(phyloseq包)
- 15. 如何按組件對Trac報告中的票據進行着色?
- 16. 由於未着色的着色器導致iOS應用程序崩潰
- 17. GLSL:頂點着色器無片段着色片段着色器
- 18. 由於着色器的黑色屏幕ps_3
- 19. 算法,其中顏色值不是由片段着色器
- 20. 包含着色器的着色器?
- 21. 不要着色,但「着色」精靈
- 22. 排序由票數
- 23. 集成檢票和發音
- 24. UIActionSheet着色
- 25. 着色JComboBox
- 26. 着色對象
- 27. 着色行
- 28. 細胞着色
- 29. Eclipse塊着色
- 30. 着色上Avalonedit
+1我愛lilypond! – 2009-12-14 18:26:36
儘管如此,與西貝柳斯相比,這是相當痛苦的,但根據我的經驗,到目前爲止,我已經完成了音樂排版,但我更喜歡圖形:) – Joey 2009-12-14 18:30:45
我幾乎是一個音樂愛好者...... Lilypond做我需要的東西,在Linux上運行,並且是免費的。 – 2009-12-14 19:18:17