Table of Contents

Class SfzRegion

Namespace
NAudio.Sfz
Assembly
NAudio.Core.dll

A fully-resolved SFZ region: the merged opcode set that applies to it (<global> → <master> → <group> → <region>, most specific winning), with typed accessors. This is the SFZ counterpart of SoundFontRegion; mapping these opcodes onto the format-neutral synthesis model is a later step.

public sealed class SfzRegion
Inheritance
SfzRegion
Inherited Members

Properties

Opcodes

The merged opcodes that apply to this region.

public IReadOnlyDictionary<string, string> Opcodes { get; }

Property Value

IReadOnlyDictionary<string, string>

Sample

The region's sample path: the sample opcode combined with the <control> default_path, with backslashes normalised to forward slashes. Null if the region has no sample opcode. Resolving this to an absolute path and loading it is the loader's job.

public string Sample { get; }

Property Value

string

Methods

GetFloat(string, float)

The floating-point value of an opcode, or fallback if absent or not a valid number.

public float GetFloat(string opcode, float fallback)

Parameters

opcode string
fallback float

Returns

float

GetInt(string, int)

The integer value of an opcode, or fallback if absent or not a valid integer.

public int GetInt(string opcode, int fallback)

Parameters

opcode string
fallback int

Returns

int

GetString(string, string)

The raw string value of an opcode, or fallback if absent.

public string GetString(string opcode, string fallback = null)

Parameters

opcode string
fallback string

Returns

string

Has(string)

Whether the given opcode is present.

public bool Has(string opcode)

Parameters

opcode string

Returns

bool