14.3 Realtime audio effects


  • 14.3.1 Compressor
    How to reduce the dynamic range of audio.
  • 14.3.2 Delay audio
  • 14.3.3 Denoise
  • 14.3.4 DenoiseFFT
  • 14.3.5 Despike
  • 14.3.6 EQ Parametric
  • 14.3.7 Freeverb
  • 14.3.8 Gain
  • 14.3.9 Heroine College Concert Hall
  • 14.3.10 Interpolate
  • 14.3.11 Invert Audio
  • 14.3.12 Live audio
    Pass audio from the soundcard directly to the timeline.
  • 14.3.13 Loop audio
  • 14.3.14 Overlay
  • 14.3.15 Pitch shift
  • 14.3.16 Reverse audio
    How to play regions in reverse.
  • 14.3.17 SoundLevel
  • 14.3.18 Spectrogram
  • 14.3.19 Synthesizer
  • 14.3.20 Time stretch

14.3.1 Compressor


compressor.png

Contrary to computer science experience, the audio compressor does not reduce the amount of data required to store the audio. The audio compressor reduces the dynamic range of the audio. In Cinelerra the compressor actually performs the function of an expander and compressor.

The compressor works by calculating the maximum sound level within a certain time period of the current position. The maximum sound level is taken as the input sound level. For every input sound level there is an output sound level specified by the user. The gain at the current position is adjusted so the maximum sound level in the time range is the user specified value.

The compressor has a graph which correlates every input sound level to an output level. The horizontal direction is the input sound level in dB. The vertical direction is the output sound level in dB. The user specifies output sound levels by creating points on the graph. Click in the graph to create a point. If 2 points exist, drag one point across another point to delete it. The most recent point selected has its vales displayed in textboxes for more precise adjustment.

To make the compressor reduce the dynamic range of the audio, make all the output values greater than the input values except 0 dB. To make the compressor expand the dynamic range of the audio, make all the output values except 0 dB less than the input values. The algorithm currently limits all sound levels above 0 dB to 0 dB so to get an overloaded effect put a gain effect before the compressor to reduce all the levels and follow it with another gain effect to amplify all the levels back over 0 dB.

Reaction secs: This determines where in relation to the current position the maximum sound level is taken and how fast the gain is adjusted to reach that peak. It is notated in seconds. If it is negative the compressor reads ahead of the current position to get the future peak. The gain is ramped to that peak over one reaction time. This allows it to hit the desired output level exactly when the input peak occurs at the current position.

If the reaction time is positive the compressor scans only the current position for the gain and ramps gain over one reaction time to hit the desired output level. It hits the output level exactly one reaction time after detecting the input peak.

Decay secs: If the peak is higher than the current level, the compressor ramps the gain up to the peak value. Then if a future peak is less than the current peak it ramps the gain down. The time taken to ramp the gain down can be greater than the time taken to ramp the gain up. This ramping down time is the decay seconds.

Trigger type: The compressor is a multi-channel effect. Several tracks can share one compressor. How the signal from many tracks is interpreted is determined by the trigger type.

The Trigger type uses the value supplied in the Trigger textbox as the number of the track to use as input for the compressor. This allows a track which is not even heard to determine the loudness of the other tracks.

The Maximum trigger takes the loudest track and uses it as the input for the compressor.

The Total trigger type adds the signals from all the tracks and uses the total as the input for the compressor. This is the most natural sounding compression and is ideal when multiple tracks are averaged into single speakers.

Trigger: The compressor is a multichannel effect. Several tracks can share one compressor. Normally only one track is scanned for the input peak. This track is specified by the Trigger. By sharing several tracks and playing with the trigger value, you can make a sine wave on one track follow the amplitude of a drum on another track for example.

Smooth only: For visualizing what the compressor is doing to the sound-level, this option causes it to replace the sound wave with just the current peak value. It makes it very easy to see how reaction secs affects the detected peak values.

14.3.2 Delay audio


delayaudio.png

Just tell how much seconds you want to delay the video track.

14.3.3 Denoise


denoise.png

FIXME

14.3.4 DenoiseFFT


denoisefft.png

FIXME

14.3.5 Despike


despike.png

FIXME

14.3.6 EQ Parametric


parametric.png

FIXME

14.3.7 Freeverb


freeverb.png

FIXME

14.3.8 Gain


gain.png

FIXME

14.3.9 Heroine College Concert Hall


reverb.png

FIXME

14.3.10 Interpolate


interpolateaudio.png

FIXME

14.3.11 Invert Audio


invertaudio.png

FIXME

14.3.12 Live audio


liveaudio.png

This effect reads audio directly from the soundcard's input through the timeline, in realtime. It replaces any audio on the track so it is normally applied to an empty track.

To use Live Audio, highlight a horizontal region of an audio track or define in and out points. Then drop the Live Audio effect into it. Create extra tracks and attach shared copies of the first Live Audio effect to the other tracks to have extra channels recorded.

Live Audio uses the sound driver selected in Settings->Preferences->Playback->Audio Out for recording, but unlike recording it uses the playback buffer size as the recording buffer size and it uses the project sample rate as the sampling rate.

These settings are critical since some sound drivers can not record in the same sized buffer they play back in. Live audio has been most reliable when ALSA is the recording driver and the playback fragment size is 2048.

Drop other effects after Live Audio to process the soundcard's input in realtime.

Now the bad news. With live audio there is no read-ahead, so effects like compressor requiring read ahead will either delay if they have read-ahead enabled or playback will under-run.

Another problem is sometimes the recording clock on the soundcard is slightly slower than the playback clock. The recording eventually falls behind and playback sounds choppy.

Finally, live audio does not work in reverse.

14.3.13 Loop audio


loopaudio.png

FIXME

14.3.14 Overlay


overlay.png


FIXME

14.3.15 Pitch shift


pitch.png

Like the time stretching methods, there are three pitch shifting methods: Pitch shift, Resample, and Asset info dialog. Pitch shift is a realtime effect which can be dragged and dropped onto recordable audio tracks. Pitch shift uses a fast Fourier transform to try to change the pitch without changing the duration, but this introduces windowing artifacts.

Because the windowing artifacts are less obtrusive in audio which is obviously pitch shifted, Pitch shift is mainly useful for extreme pitch changes. For mild pitch changes, use Resample from the Audio->Render Effect interface. Resample can change the pitch within 5% without a noticeable change in duration.

Another way to change pitch slightly is to go to the Resources window, highlight the media folder, right click on an audio file, click on Info. Adjust the sample rate in the Info dialog to adjust the pitch. This method also requires left clicking on the right boundary of the audio tracks and dragging left or right to correspond to the length changes.

14.3.16 Reverse audio


reverseaudio.png

Apply reverse audio to an audio track and play it backwards. The sound plays forward.Be aware when reversing audio that the waveform on the timeline does not reflect the actual reversed output.

14.3.17 SoundLevel


level.png

FIXME

14.3.18 Spectrogram


spectrogram.png

FIXME

14.3.19 Synthesizer


synthesizer.png

FIXME

14.3.20 Time stretch


timestretch.png

It may appear that time stretching audio is a matter of selecting a region of the audio tracks, enabling recording for the desired tracks, going to Audio->Render Effect, and applying Time Stretch. In actuality there are 3 audio effects for time stretching: Time Stretch, Resample, and Asset info dialog.

Time Stretch applies a fast fourier transform to try to change the duration without changing the pitch, but this introduces windowing artifacts to the audio. It's only useful for large changes in time because obvious changes in duration make windowing artifacts less obtrusive.

Another way to change duration slightly is to go to the Resources window, highlight the media folder, right click on an audio file, click on Info. Adjust the sample rate in the Info dialog to adjust the duration. This method also requires left clicking on the right boundary of the audio tracks and dragging left or right to correspond to the length changes.