EZSynth 0.1.1
See the version list below for details.
dotnet add package EZSynth --version 0.1.1
NuGet\Install-Package EZSynth -Version 0.1.1
<PackageReference Include="EZSynth" Version="0.1.1" />
paket add EZSynth --version 0.1.1
#r "nuget: EZSynth, 0.1.1"
// Install EZSynth as a Cake Addin #addin nuget:?package=EZSynth&version=0.1.1 // Install EZSynth as a Cake Tool #tool nuget:?package=EZSynth&version=0.1.1
EZSynth
C# synthesizer designed to be extensible and generic in terms of formats of audio and sequence data.
Installation
Install via NuGet:
Install-Package EZSynth -Version x.x.x
Install-Package EZSynth.Implementations -Version x.x.x
Or via the .NET CLI:
dotnet add package EZSynth --version x.x.x
dotnet add package EZSynth.Implementations --version x.x.x
Usage
EZSynth was designed with a 'bring your own data' approach, though comes with basic default implementations.
Implement ISequence
to provide your own sequence data (in a format similar to MIDI events) for the synthesizer.
Implement ISoundbank
to provide an interface for the synth to get sample/note data based on preset, note, and velocity.
Implement ISampler
to provide an interface for getting sample data.
Built in to EZSynth
are samplers PCMSampler
and SineSampler
for sampling PCM and sine data. There is
also SineBank
that is an ISoundbank
interface providing SineSampler
instances to play notes.
There is also EZSynth.Implementations
which contains MidiSequence
and SoundfontSoundbank
, to render
MIDI data from MIDI files with samples from SoundFont 2 files. This is in a separate package because it
brings in a couple of extra dependencies (DryWetMidi and EZSF2).
// open soundfont with EZSF2 and create a soundbank
using BinaryReader br = new BinaryReader(File.OpenRead("test.sf2"));
SF2 soundFont = new SF2(br);
var soundbank = new SoundfontSoundbank(soundFont);
// create synth with the soundbank
int sampleRate = 44100;
var synth = new Synth(soundbank, sampleRate);
// open midi file with DryWetMidi and create a sequence
using var fs = File.OpenRead("midi.mid");
MidiFile midiFile = MidiFile.Read(fs);
MidiSequence sequence = new MidiSequence(midiFile);
// create sequencer with the sequence
Sequencer sequencer = new Sequencer(sequence, synth);
// render the sequence into PCM data as short[]
var sampleData = sequencer.Render();
// write the data to a WAV file with NAudio
using var writer = new WaveFileWriter("out.wav", new WaveFormat(sampleRate, 2));
writer.WriteSamples(sampleData, 0, sampleData.Length);
Product | Versions 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. |
.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. |
-
.NETStandard 2.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on EZSynth:
Package | Downloads |
---|---|
libLSD
A C# library for loading LSD: Dream Emulator data files. |
|
EZSynth.Implementations
C# synthesizer designed to be extensible and generic in terms of formats of audio and sequence data. |
GitHub repositories
This package is not used by any popular GitHub repositories.