diffrhythm.ai 1767.511.117.931

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

diffrhythm.ai

A .NET library providing essential tools for comparing and analyzing rhythmic patterns. This package simplifies the process of identifying differences and similarities within time-series data.

Installation

To install the diffrhythm.ai package, use the following command in your .NET project: bash dotnet add package diffrhythm.ai

Usage Examples

Here are a few examples demonstrating how to use the diffrhythm.ai package in your C# code:

1. Comparing Two Rhythmic Sequences: csharp using Diffrhythm;

// Example rhythmic sequences (e.g., onset times in milliseconds) List<double> sequence1 = new List<double> { 100, 300, 550, 800, 1050 }; List<double> sequence2 = new List<double> { 120, 320, 570, 820, 1070 };

// Create a RhythmComparer instance RhythmComparer comparer = new RhythmComparer();

// Calculate the difference score double differenceScore = comparer.Compare(sequence1, sequence2);

Console.WriteLine($"Difference Score: {differenceScore}");

2. Normalizing Rhythmic Data: csharp using Diffrhythm;

// Example rhythmic sequence with varying magnitudes List<double> rawSequence = new List<double> { 50, 150, 300, 600 };

// Create a RhythmNormalizer instance RhythmNormalizer normalizer = new RhythmNormalizer();

// Normalize the sequence List<double> normalizedSequence = normalizer.Normalize(rawSequence);

Console.WriteLine("Normalized Sequence:"); foreach (var value in normalizedSequence) { Console.WriteLine(value); }

3. Detecting Tempo Changes: csharp using Diffrhythm;

// Example sequence representing time intervals between events List<double> timeIntervals = new List<double> { 0.2, 0.22, 0.18, 0.3, 0.33, 0.27 };

// Create a TempoAnalyzer instance TempoAnalyzer analyzer = new TempoAnalyzer();

// Analyze for tempo changes bool tempoChangeDetected = analyzer.DetectChange(timeIntervals, threshold: 0.1);

if (tempoChangeDetected) { Console.WriteLine("Tempo change detected!"); } else { Console.WriteLine("No significant tempo change detected."); }

4. Calculating Inter-Onset Intervals (IOIs): csharp using Diffrhythm;

// Example sequence of onset times List<double> onsetTimes = new List<double> { 1.0, 1.5, 2.2, 3.0, 3.8 };

// Create an IOI Calculator instance IOICalculator ioiCalculator = new IOICalculator();

// Calculate the IOIs List<double> iois = ioiCalculator.CalculateIOIs(onsetTimes);

Console.WriteLine("Inter-Onset Intervals:"); foreach (var ioi in iois) { Console.WriteLine(ioi); }

5. Quantizing Rhythmic Events to a Grid: csharp using Diffrhythm;

// Example sequence of event times (e.g., in seconds) List<double> eventTimes = new List<double> { 0.1, 0.32, 0.58, 0.85 };

// Define the quantization grid resolution (e.g., 1/16th notes) double gridResolution = 0.125;

// Create a RhythmQuantizer instance RhythmQuantizer quantizer = new RhythmQuantizer();

// Quantize the events to the grid List<double> quantizedEvents = quantizer.Quantize(eventTimes, gridResolution);

Console.WriteLine("Quantized Event Times:"); foreach (var time in quantizedEvents) { Console.WriteLine(time); }

Feature Summary

  • Rhythm Comparison: Provides algorithms for comparing rhythmic sequences and calculating difference scores.
  • Rhythm Normalization: Offers methods for normalizing rhythmic data to a standard scale.
  • Tempo Analysis: Includes functionalities for detecting tempo changes within a rhythmic sequence.
  • IOI Calculation: Computes Inter-Onset Intervals (IOIs) from sequences of onset times.
  • Rhythm Quantization: Quantizes rhythmic events to a defined grid, useful for aligning rhythms to a musical structure.

License

This project is licensed under the MIT License - see the LICENSE file for details.

This package is part of the diffrhythm.ai ecosystem. For advanced features and enterprise-grade tools, visit: https://diffrhythm.ai/

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.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
1767.511.117.931 125 1/4/2026