I created this for my dad to allow him to transpose chords and change lyrics to uppercase (and it was also a great opportunity for me to learn FParsec).
UI created with Avalonia.FuncUI.
let cmp () = Component (fun ctx ->
let model, dispatch = ctx.useElmish (init, update)
Grid.create [
Grid.rowDefinitions "20, *"
Grid.columnDefinitions "*, 80, *"
Grid.margin 10
Grid.children [
// Row labels
TextBlock.create [
TextBlock.text "Input Chord Chart"
TextBlock.horizontalAlignment HorizontalAlignment.Center
Grid.column 0
]
TextBlock.create [
TextBlock.text "Output Chord Chart"
TextBlock.horizontalAlignment HorizontalAlignment.Center
Grid.column 2
]
// Input Chord Chart
TextBox.create [
TextBox.text model.InputChordChart
TextBox.onTextChanged (fun txt -> dispatch (SetInputChart txt))
Grid.column 0
Grid.row 1
]
CLI created with FSharp.SystemCommandLine
To try it out against the sample txt file (Song.txt), just run the app; it will output "Song ChordParser.txt".