FYampaSynth 1.0.0

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

// Install FYampaSynth as a Cake Tool
#tool nuget:?package=FYampaSynth&version=1.0.0

Modular Synthesizer Programming in F#

Overview

FYampaSynth is a modular music synthesizer in F# that's inspired by Haskell's Yampa and YampaSynth. It is based on the concept of a "signal function", which maps an input signal to an output signal:

type SignalFunction<'a, 'b> = Signal<'a> -> Signal<'b>

Where a "signal" is (conceptually) a function from time to values of some type:

type Signal<'a> = Time -> 'a

Signal functions are first-class objects in Yampa, and can be composed using "arrow" combinators to synthesize music in software.

FYampaSynth uses NAudio to generate sound, and hence is Windows-only.

Examples

A simple sine wave can be generated as follows:

open FYampaSynth
open Arrow

use engine = new AudioEngine()
Synth.oscSine 440.0   // A above middle C
    >>^ (*) 0.05      // reduce volume (sine waves are obnoxious!)
    |> Synth
    |> engine.AddInput

To make a slightly more interesting synthesizer, we can use a sawtooth wave instead and slowly oscillate its frequency:

Synth.oscSine 1.0   // low-frequency control value
    >>> Synth.oscSawtooth 440.0

More pleasingly, we can emulate an old Moog synthesizer (via subtractive synthesis), like this:

(Synth.oscSawtooth 440.00
    &&& Synth.oscSine 1.0)        // note and oscillation
    >>> Synth.moogVcf 880.0 0.5   // filter frequencies above 880 hz

Additional references

Product Compatible and additional computed target framework versions.
.NET net5.0-windows7.0 is compatible.  net6.0-windows was computed.  net7.0-windows was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.0.0 300 5/2/2021