Class PitchShiftAudioEffect
- Namespace
- VisioForge.Core.Types.X.AudioEffects
- Assembly
- VisioForge.Core.dll
Pitch shift audio effect changes the pitch of audio without affecting its tempo/speed. Uses the SoundTouch library via GStreamer to perform high-quality pitch shifting. Useful for key transposition, vocal correction, or special effects. Implements the VisioForge.Core.Types.X.AudioEffects.BaseAudioEffect.
public class PitchShiftAudioEffect : BaseAudioEffect, ISharedAudioEffectXInheritance
Implements
Inherited Members
Remarks
Uses soundtouch-based pitch shifting algorithm. The effect maintains audio duration while changing frequency content.
Pitch multiplier examples:
- 0.5 = one octave down
- 0.75 = minor third down
- 1.0 = no change (original pitch)
- 1.122 = approximately one semitone up
- 1.5 = perfect fifth up
- 2.0 = one octave up
Quality considerations:
- Small pitch changes (0.9-1.1) sound very natural
- Moderate changes (0.7-1.4) are noticeable but acceptable
- Large changes (<0.5 or >2.0) can introduce artifacts
Constructors
PitchShiftAudioEffect(float)
Initializes a new instance of the VisioForge.Core.Types.X.AudioEffects.PitchShiftAudioEffect class.
public PitchShiftAudioEffect(float pitch)Parameters
pitchfloat-
The pitch multiplier. 1.0 = no change, 0.5 = one octave down, 2.0 = one octave up. Typical range: 0.5 to 2.0. Values outside this range may produce artifacts.
Properties
Pitch
Gets or sets the pitch multiplier that determines how much the pitch is shifted.
- Values < 1.0 shift pitch down (0.5 = one octave down)
- Value = 1.0 means no pitch change (original pitch)
- Values > 1.0 shift pitch up (2.0 = one octave up)
Musical intervals (approximate):
- 0.5 = -12 semitones (one octave down)
- 0.841 = -3 semitones (minor third down)
- 0.943 = -1 semitone
- 1.059 = +1 semitone
- 1.122 = +2 semitones (whole tone up)
- 1.5 = +7 semitones (perfect fifth up)
- 2.0 = +12 semitones (one octave up)
The duration of the audio remains unchanged.
public float Pitch { get; set; }