Expand description
P7.6 — Audio edits as geometric surface operations. P7.6 — Audio edits as geometric surface operations on the time-frequency surface.
Each edit is a geometric transformation of the TfSurface raster:
- Gain: scale magnitude in a rectangular region (affine scale in z).
- Cut/paste: copy a rectangular patch of the surface to another location (translation in the time-frequency plane).
- Time-stretch: resample the surface along the time axis (affine scale in u).
- Pitch-shift: resample along the frequency axis (affine scale in v).
- Crossfade: blend two surfaces with a weight ramp (linear blend of two height fields).
- Spectral gate: zero out bins below a threshold (clipping plane in z).
All operations write to caller-supplied buffers. Deterministic.
Structs§
- Region
- A rectangular region in the time-frequency plane.
Enums§
Functions§
- apply_
gain - Apply a gain (scalar multiplication) to a region of the surface.
outmust be at leastframe_count * bin_count. - copy_
patch - Copy a rectangular patch from
srcto a destination offset inout.outmust be at leastframe_count * bin_count. - crossfade
- Crossfade: blend two surfaces with weight
t(0 = surface_a, 1 = surface_b). Both surfaces must have the same dimensions. - fade_in
- Fade in: ramp gain from 0 to 1 over the first
fade_framesframes. - fade_
out - Fade out: ramp gain from 1 to 0 over the last
fade_framesframes. - pitch_
shift - Pitch-shift by resampling along the frequency axis.
factor > 1.0shifts up,factor < 1.0shifts down.outmust be at leastframe_count * bin_count. - spectral_
gate - Spectral gate: zero out all bins below
thresholdin the region. - time_
stretch - Time-stretch by resampling along the time axis.
factor > 1.0stretches,factor < 1.0compresses.outmust be at leastnew_frame_count * bin_countwherenew_frame_count = round(frame_count * factor).