Menees.Chords 1.2.2

Prefix Reserved
dotnet add package Menees.Chords --version 1.2.2
                    
NuGet\Install-Package Menees.Chords -Version 1.2.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Menees.Chords" Version="1.2.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Menees.Chords" Version="1.2.2" />
                    
Directory.Packages.props
<PackageReference Include="Menees.Chords" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Menees.Chords --version 1.2.2
                    
#r "nuget: Menees.Chords, 1.2.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Menees.Chords@1.2.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Menees.Chords&version=1.2.2
                    
Install as a Cake Addin
#tool nuget:?package=Menees.Chords&version=1.2.2
                    
Install as a Cake Tool

Windows Ubuntu NuGet Chords NuGet Cli

Chords

This repo contains a .NET library and applications (e.g., an online Blazor WebAssembly app) for parsing, transforming, and reformatting chord sheets. It can parse files in human-friendly "chords over text" format (e.g., from Ultimate Guitar), machine-friendly ChordPro format, or a mix of both. For example, given this "chords over text" input:

[Verse 2]
D          G      C          G
 Bring him peace,  bring him joy,
C      Bm     Am      C      D
 He is young,   he is only a boy.

Running .\Menees.Chords.Cli.exe convert with that input produces this output in ChordPro format:

{start_of_verse: Verse 2}
[D] Bring him [G]peace, [C] bring him [G]joy,
[C] He is [Bm]young, [Am]  he is [C]only a [D]boy.
{end_of_verse}

Library

The Menees.Chords.dll .NET library is the main focus of this repo, and it contains all of the parsing, transforming, and formatting objects. It can be reused in any application targeting .NET Framework 4.8, .NET 8.0, or .NET Standard 2.0.

Code Example

// Parsing
Document inputDocument = Document.Load(inputFileName);

// Transforming
ChordProTransformer transformer = new ChordProTransformer(inputDocument);
Document outputDocument = transformer.Transform().Document;

// Formatting
ContainerFormatter formatter = new TextFormatter(outputDocument);
string outputText = formatter.ToString();

// Saving
File.WriteAllText(outputFileName, outputText);

Parsing

The Document class provides methods to Load chord sheet files and to Parse chord sheet text into an in-memory DOM. Document is similar to .NET's XDocument class except instead of XML nodes, Document represents a parsed chord sheet as a tree of Entry objects in IEntryContainers (e.g., Sections). The Entry-derived class hierarchy is:

Chord sheets are parsed line-by-line. Parsing can be customized using the DocumentParser class with an ordered collection of specialized line parsers and groupers.

Transforming

Documents (and Entrys) are immutable after construction. The DocumentTransformer class provides a way to build a new in-memory Document by transforming an existing one. The primary transformer-derived types are:

  • ChordProTransformer - Transforms "chords over text" (e.g., Ultimate Guitar) syntax into standard ChordPro syntax.
  • MobileSheetsTransformer - A ChordProTransformer-derived type that restricts the output to a subset of ChordPro syntax compatible with the MobileSheets application.
  • ChordOverLyricTransformer - Transforms standard ChordPro syntax into "chords over text" (e.g., Ultimate Guitar) syntax.

Formatting

In-memory Documents can be formatted as text using one of the ContainerFormatter-derived types:

These are useful when saving chord sheets back into text files after transforming them to a new syntax.

Helpers

The library also contains some helper classes for specialized parsing situtations:

Applications

Web

The Menees Chord Sheet Converter web application converts Ultimate Guitar-style chords-over-text sheets into ChordPro format or MobileSheets format. The converter is a Blazor WebAssembly app, so it needs to be run in a modern, up-to-date web browser.

Because this is a WebAssembly app, it runs completely in your browser. It never sends any data to an external server. None of the information you enter into it leaves your brower, so it's safe to use it to convert private transcriptions.

Console

The .\Menees.Chords.Cli.exe .NET console application is a wrapper over the Menees.Chords.dll library. Run .\Menees.Chords.Cli.exe --help to see its available commands and options. This is also available as the menees-chords dotnet tool.

DotNet Local Tool

It can be installed as a local tool with:

dotnet tool install Menees.Chords.Cli --local

To run it as a local tool and see the convert command's help:

dotnet menees-chords convert --help
DotNet Global Tool

It can be installed as a global tool with:

dotnet tool install Menees.Chords.Cli --global

To run it as a global tool and see the convert command's help:

menees-chords convert --help

Note: The dotnet prefix isn't required (or supported) when running it as a global tool.

Others

Here are some links to similar software that might be of interest:

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 is compatible.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.8

    • No dependencies.
  • .NETStandard 2.0

    • No dependencies.
  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.2.2 91 2/16/2026
1.2.1 97 1/21/2026
1.2.0 103 1/11/2026
1.1.4 306 7/19/2025
1.1.3 190 7/13/2025
1.1.2 136 7/4/2025
1.1.1 194 7/1/2025
1.1.0 207 5/27/2025
1.0.2 216 4/30/2025
1.0.1 238 3/31/2025
1.0.0 194 2/17/2025
0.9.6-beta 135 11/19/2024
0.9.5-beta 155 9/26/2024
0.9.4-beta 306 3/26/2024
0.9.3-beta 169 2/11/2024
0.9.2-beta 148 2/11/2024
0.9.1-beta 159 2/5/2024
0.9.0-beta 247 12/3/2023
0.8.7-beta 187 10/27/2023
0.8.5-beta 153 10/18/2023
Loading failed