Brc 1.0.0

dotnet add package Brc --version 1.0.0
                    
NuGet\Install-Package Brc -Version 1.0.0
                    
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="Brc" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Brc" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Brc" />
                    
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 Brc --version 1.0.0
                    
#r "nuget: Brc, 1.0.0"
                    
#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 Brc@1.0.0
                    
#: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=Brc&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Brc&version=1.0.0
                    
Install as a Cake Tool

Brc

Brc

Overview

The Brc namespace provides functionality for reading and writing .brc files, which are used to represent structured musical data.

BrcWriter

The BrcWriter class is responsible for serializing Brc objects into .brc file format.

Key Features

  • Write Method: Converts Brc objects into .brc file format and writes them to a specified file path.
  • Sentence Serialization: Handles serialization of BrcSentence objects, including their properties such as BeatsPerMinute, BeatsPerBar, NotePerBeat, and Offset.
  • Word Serialization: Encodes BrcWord objects, ensuring special characters are escaped and durations are properly represented.

Usage## BrcReader

The BrcReader class is responsible for deserializing .brc files into Brc objects.

Key Features

  • Read Method: Parses .brc files and constructs Brc objects.
  • Sentence Deserialization: Extracts BrcSentence properties and reconstructs their structure.
  • Word Deserialization: Decodes BrcWord objects, handling escaped characters and duration calculations.

Brc File Format

Overview

The .brc file format is designed to represent structured musical data, including beats, notes, and lyrics. It is used by the BrcReader and BrcWriter classes for deserialization and serialization, respectively.

File Structure

The header defines the global properties of the file, such as beats per bar, notes per beat, beats per minute, and offset. It is enclosed in square brackets [] and uses commas , to separate values.

Example:
  • [8, 4, 120, 20]
    • 8: Beats per bar, default is 8
    • 4: Notes per beat, default is 4
    • 120: Beats per minute, default is 100
    • 20: Offset in milliseconds`

Sentences

Sentences are separated by semicolons ; and represent a collection of lines. Each sentence can optionally redefine the header properties.
Multiple sentences can be seperated by +.

Example:
  • +: Indicates a bar boundary.

Lines

Lines are sequences of words separated by -. Each line can span multiple bars, and words can have varying durations.

Example:
  • I ---wan|na |lea-ve---
    • I ---: A word with a duration of one beat (1/4 * (1 + 3)).
    • wan: A word with a duration of 1/4 beat.
    • |: A separator indicating a word boundary.
    • na: A word with a duration of 1/4 beat.
    • ...
  • \: Escaped characters.

Words

Words are the smallest unit in the .brc format. Each word can have a duration, which is represented by the number of | or - characters following it. Special characters are escaped using //.

Example:
  • To: A word with a duration of one beat.
  • |: Indicates a bar boundary.

Examble

[4,4,108];;;;;;;;;
-I |don't//\\ -know -what -to -say -
I -think -I'm -wai-ting -for -you-;;
-To |tell -me -what -to -do -
To -tell -me -who -I -am-;;
...
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 was computed.  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 was computed.  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.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Brc:

Package Downloads
RhythmBase.Addition

Added some tools into RhythmBase.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 210 6/15/2025