leonwhite06 wrote:Is this possible?
Yes it is, though as PGA wrote, this is not "normal", so the method is a bit geeky
Let's say that the chirp was generated with amplitudes:
Start: 0.1
End: 1.0
To shift the red line up to the yellow line, you will need to shift the left end up by 0.1 and the right end up by 1.0.
Note 1:
This will cause the right hand end of the waveform to exceed 0 dB.
Sample values greater than 0 dB are only possible when using "floating point audio formats", so the track must be 32-bit float format.
Integer formats cannot handle values over 0 dB, so the "over 0 dB" part will be clipped to 0 dB.
There is a bug in all current release versions of Audacity that can sometimes cause data corruption when resampling over 0 dB samples (not surprising as over 0 dB is not generally considered to be "valid" audio, however this has been fixed for the next version of Audacity).
If you specifically need sample values over 0 dB, then the audio must be 32-bit float so as to avoid these issues, but sound cards will not be able to play the sound because sound cards use integer format data which will clip the audio at 0 dB. The better solution is likely to be to tilt the audio and then to scale it so that the peak at the right hand end does not exceed 0 dB. The output will then look like this:

- firsttrack000.png (9.37 KiB) Viewed 1547 times
Note 2:
It looks like your "chirp" is a square wave. If the waveform is "tilted", the waveform will no longer be quite "square" because the top of the waveform will now be tilted. If you need the top and bottom of the waveform to be exactly horizontal, the waveform that you require will need to be synthesized from scratch.
Note 3:
We are adding a "DC offset" to the signal (making it "offset" from the centre line). If you output this signal through your sound card it is likely that the sound card will be unable to handle the DC component and will attempt to "correct" it, tilting the output back down.
To add the DC component, we can use the Nyquist Prompt effect.
The following code will produce a "ramp" from 0.1 to 1.0 at a low sample rate.
We can "add" this to the signal like this:
"s" is a special variable that Audacity uses to pass audio from the track to Nyquist.
We then want to scale the audio so that it still fits within a 0 dB range. Essentially we are halving the amplitude of each sample, so all we need to do is to multiply each sample value by 0.5:
Code: Select all
(mult 0.5 (sum s (pwlv 0.1 1 1.0)))
Select the track, then copy and paste this final line of code into the Nyquist Prompt text box, then click the OK button.