SoundZone#
One keyzone of a Sound: a sample (another Sound) played over a range of notes and velocities. With PitchFollowsNote the sample plays at the note's pitch relative to RootKey (the sample Sound's own root when null); without it every note plays the sample as recorded (a drum kit's hits). Overlapping zones layer; zones sharing a nonzero Group are alternatives, one picked per play. A zone with its own Modulation plays through it instead of the Sound's (a SoundFont's per-key envelopes).
public sealed record SoundZone(SoundAsset Sample, int KeyLow = 0, int KeyHigh = 119, int VelocityLow = 1, int VelocityHigh = 127, int? RootKey = null, bool PitchFollowsNote = true, float TuneCents = 0, float VolumeDb = 0, int Group = 0, ModulationChain? Modulation = null)Record properties#
| Property | Type | Access | Constructor default |
|---|---|---|---|
Sample | SoundAsset | get; init; | required |
KeyLow | int | get; init; | 0 |
KeyHigh | int | get; init; | 119 |
VelocityLow | int | get; init; | 1 |
VelocityHigh | int | get; init; | 127 |
RootKey | int? | get; init; | null |
PitchFollowsNote | bool | get; init; | true |
TuneCents | float | get; init; | 0 |
VolumeDb | float | get; init; | 0 |
Group | int | get; init; | 0 |
Modulation | ModulationChain? | get; init; | null |
Members: Covers
Covers#
public bool Covers(int key, int velocity);Related types#
Source#
- SoundAsset.cs