toNoiseType method

NoiseType toNoiseType()

Convert from a SYZ_NOISE_TYPE member.

Implementation

NoiseType toNoiseType() {
  switch (this) {
    case SYZ_NOISE_TYPE.SYZ_NOISE_TYPE_UNIFORM:
      return NoiseType.uniform;
    case SYZ_NOISE_TYPE.SYZ_NOISE_TYPE_VM:
      return NoiseType.vm;
    case SYZ_NOISE_TYPE.SYZ_NOISE_TYPE_FILTERED_BROWN:
      return NoiseType.filteredBrown;
    case SYZ_NOISE_TYPE.SYZ_NOISE_TYPE_COUNT:
      return NoiseType.count;
    default:
      throw SynthizerError(
        'Unrecognised `SYZ_NOISE_TYPE` member.',
        this,
      );
  }
}