Skip to content

JordanMarr/FSharp.ChordParser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FSharp.ChordParser

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

UI created with Avalonia.FuncUI.

image

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
            ]

Console

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".

image

About

Parses and transposes a chord chart.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages