Is it possible to emulate class d amp. That is have audio file and pulse modulate as is done in class d amp
https://en.wikipedia.org/wiki/Class-D_amplifier
Cheer
Dmian
emulate class d amp
Forum rules
This forum is for Audacity on Windows.
Please state which version of Windows you are using,
and the exact three-section version number of Audacity from "Help menu > About Audacity".
Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
Please state which version of Windows you are using,
and the exact three-section version number of Audacity from "Help menu > About Audacity".
Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
Re: emulate class d amp
That would be PWM (Pulse Width Modulation).
You can do almost anything Nyquist, so that might be worth a try. You'll probably want to use the highest sample rate that Audacity supports (I don't know what that is, but it can support 192kHz) and assuming you're going to play the sound through your soundcard (which is "normal" PCM) or save it as a regular sound file, you'll probably want to make a low-pass filter in Nyquist too.
You can do almost anything Nyquist, so that might be worth a try. You'll probably want to use the highest sample rate that Audacity supports (I don't know what that is, but it can support 192kHz) and assuming you're going to play the sound through your soundcard (which is "normal" PCM) or save it as a regular sound file, you'll probably want to make a low-pass filter in Nyquist too.
Re: emulate class d amp
The highest sample rate supported by Audacity is 1000000 Hz (1 MHz).DVDdoug wrote:You'll probably want to use the highest sample rate that Audacity supports (I don't know what that is, but it can support 192kHz)
As no sound cards support such a high sample rate you need to use "Tracks menu > Resample"
This code run in the Nyquist Prompt effect (http://manual.audacityteam.org/man/nyquist_prompt.html) is a simple way to create PWM:
Code: Select all
;version 4
(if (and (soundp *track*)(= *sound-srate* 1000000))
(osc-pulse 25000 *track*)
"Error.\nInput must be a mono track\nwith 1,000,000 Hz sample rate.")
Note that the sound quality will be very poor, but it demonstrates the principle.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
Re: emulate class d amp
And, thinking a bit more about this... if you low-pass filter digitally, you've no longer got PWM, you're back to PCM. But, that should also "demonstrate the principal".
Re: emulate class d amp
Quantize-noise is close, (and doesn't require the overhead of re-sampling to 1MHz) ...