You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do you want to add this, or something like this, to the library? (Well, to some currently living fork, since the original seems to be frozen, cf. https://www.euterpea.com/faq/ "I want to add...")
import Euterpea
import Data.Tree
toTree :: Show a => Music a -> Tree [Char]
toTree m = case m of
Prim p -> Node (show p)[]
l :+: r -> Node "+" [toTree l, toTree r]
l :=: r -> Node "=" [toTree l, toTree r]
Modify m t -> Node (show m) [toTree t]
putStrLn $ drawTree $ toTree $ line [ c 4 en, e 4 en]
+
|
+- Note (1 % 8) (C,4)
|
`- +
|
+- Note (1 % 8) (E,4)
|
`- Rest (0 % 1)
The text was updated successfully, but these errors were encountered:
I wanted to show the tree structure of a
Music1
score. This can be done with https://hackage.haskell.org/package/containers-0.6.5.1/docs/Data-Tree.html#v:drawTreeDo you want to add this, or something like this, to the library? (Well, to some currently living fork, since the original seems to be frozen, cf. https://www.euterpea.com/faq/ "I want to add...")
The text was updated successfully, but these errors were encountered: