EZSynth.Implementations
0.1.0
dotnet add package EZSynth.Implementations --version 0.1.0
NuGet\Install-Package EZSynth.Implementations -Version 0.1.0
<PackageReference Include="EZSynth.Implementations" Version="0.1.0" />
paket add EZSynth.Implementations --version 0.1.0
#r "nuget: EZSynth.Implementations, 0.1.0"
// Install EZSynth.Implementations as a Cake Addin #addin nuget:?package=EZSynth.Implementations&version=0.1.0 // Install EZSynth.Implementations as a Cake Tool #tool nuget:?package=EZSynth.Implementations&version=0.1.0
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
- EZSF2 (>= 0.1.3)
- EZSynth (>= 0.1.0)
- Melanchall.DryWetMidi (>= 7.0.0)
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 |
---|---|---|
0.1.0 | 210 | 8/9/2023 |