Your SlideShare is downloading. ×
0
Sound Processing
in Consumer Electronics
and in PulseAudio
Alexander Patrakov
About Myself
● Author of some sound processing code
– Dcaenc: a Free DTS-compatible encoder
– Wine resampler
● Dayjob:
Hardware
LG 47LM640T
Onkyo TX-NR626
Common effects
● Equalizer presets
– Sound Mode, Listening Modes
● Virtual Surround
– Theater-Dimensional Mode
● Dynamic R...
● User EQ
● ClearVoice II
● Bass, Tremble
● Speaker Distance
Compensation
● Bass Management
● Digital room
Correction
5.1 Speaker Setup
Delay is
needed!
Instead of the equalizer
It Just Works!
PulseAudio
DSP-related functionality
● Equalizer
● Resampler
● Channel Remixer
● Virtual Surround
● Bass Management
● Encoders & Deco...
In this talk
● Equalizer
● Resampler
● Channel Remixer
● Virtual Surround
● Bass Management
● Encoders & Decoders
● LADSPA...
module-equalizer-sink
Author: Jason Newton
Spectrum * Filter
Spectrum * Filter
?
Convolution
t
FIR filter design
● Given the desired frequency response
– Take IFFT
– Shift the signal to positive time values
– Truncate...
Divide and Conquer
FFT-based magic
Circular convolution
t
Convolution
t
Tricks Against Circular Convolution
● Overlap-Save
● Overlap-Add
Overlap-Save
Corrupted fragment
The input signal is split into overlapping segments
Corrupted fragments are thrown away
(t...
Overlap-Add
Space for growth
Pad the input signal fragments with zeroes
Perform circular convolution
Result: overlapped se...
module-equalizer-sink
● Where is this?
– Take IFFT
– Shift the signal to positive time values
– Truncate the signal to a s...
module-equalizer-sink
?
Latency = ?
module-equalizer-sink
/* FIXME: Please clean this up. I see more commented code lines
* than uncommented code lines. I am ...
module-equalizer-sink
EPIC FAIL
module-ladspa-sink + mbeq +
veromix
module-virtual-surround-sink
5.1 recording Stereo Headphones
Author: Niels Ole Salscheider
Amplitude difference
Woof!
Woof!
Delay
Woof..!...Woof!
Spectral features
module-virtual-surround-sink
● Convolution with HRIR (Head Related Impulse
Response)
– HRIR has to be downloaded separately
Virtual Surround on Speakers
● Ambiophonics
– Speaker crosstalk cancellation
– Same technology as in soundbars
– Not in Pu...
HRIR (left ear)
HRIR (left ear)
Cutoff at 64 samples
(to save CPU time)
HRTF (left ear)
HRTF (left ear)
This
sounds
cheap
Conclusions
Open Tasks
● See GSOC thread: http://goo.gl/7fVwTk
Other Relevant Projects
● Speex: contains a denoiser
● Vlevel: dynamic range compressor
● BruteFIR: a fast convolution eng...
А. Патраков "PulseAudio и бытовая электроника: цифровая обработка звука", DUMP-2014
А. Патраков "PulseAudio и бытовая электроника: цифровая обработка звука", DUMP-2014
А. Патраков "PulseAudio и бытовая электроника: цифровая обработка звука", DUMP-2014
А. Патраков "PulseAudio и бытовая электроника: цифровая обработка звука", DUMP-2014
А. Патраков "PulseAudio и бытовая электроника: цифровая обработка звука", DUMP-2014
Upcoming SlideShare
Loading in...5
×

А. Патраков "PulseAudio и бытовая электроника: цифровая обработка звука", DUMP-2014

291

Published on

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
291
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "А. Патраков "PulseAudio и бытовая электроника: цифровая обработка звука", DUMP-2014"

  1. 1. Sound Processing in Consumer Electronics and in PulseAudio Alexander Patrakov
  2. 2. About Myself ● Author of some sound processing code – Dcaenc: a Free DTS-compatible encoder – Wine resampler ● Dayjob:
  3. 3. Hardware LG 47LM640T Onkyo TX-NR626
  4. 4. Common effects ● Equalizer presets – Sound Mode, Listening Modes ● Virtual Surround – Theater-Dimensional Mode ● Dynamic Range Compression – Late-Night Mode
  5. 5. ● User EQ ● ClearVoice II ● Bass, Tremble ● Speaker Distance Compensation ● Bass Management ● Digital room Correction
  6. 6. 5.1 Speaker Setup Delay is needed!
  7. 7. Instead of the equalizer
  8. 8. It Just Works!
  9. 9. PulseAudio
  10. 10. DSP-related functionality ● Equalizer ● Resampler ● Channel Remixer ● Virtual Surround ● Bass Management ● Encoders & Decoders ● LADSPA Effects ● Echo Cancellation
  11. 11. In this talk ● Equalizer ● Resampler ● Channel Remixer ● Virtual Surround ● Bass Management ● Encoders & Decoders ● LADSPA Effects ● Echo Cancellation
  12. 12. module-equalizer-sink Author: Jason Newton
  13. 13. Spectrum * Filter
  14. 14. Spectrum * Filter ?
  15. 15. Convolution t
  16. 16. FIR filter design ● Given the desired frequency response – Take IFFT – Shift the signal to positive time values – Truncate the signal to a suitable length – Apply a windowing function http://www.dspguide.com/ch17/1.htm
  17. 17. Divide and Conquer FFT-based magic
  18. 18. Circular convolution t
  19. 19. Convolution t
  20. 20. Tricks Against Circular Convolution ● Overlap-Save ● Overlap-Add
  21. 21. Overlap-Save Corrupted fragment The input signal is split into overlapping segments Corrupted fragments are thrown away (the previous segment contains a non-corrupted version)
  22. 22. Overlap-Add Space for growth Pad the input signal fragments with zeroes Perform circular convolution Result: overlapped segments of output signal Resolve the overlap by summation
  23. 23. module-equalizer-sink ● Where is this? – Take IFFT – Shift the signal to positive time values – Truncate the signal to a suitable length – Apply a windowing function
  24. 24. module-equalizer-sink ? Latency = ?
  25. 25. module-equalizer-sink /* FIXME: Please clean this up. I see more commented code lines * than uncommented code lines. I am sorry, but I am too dumb to * understand this. */ fftwf_malloc(); …; free(); Buffer Overflow
  26. 26. module-equalizer-sink EPIC FAIL
  27. 27. module-ladspa-sink + mbeq + veromix
  28. 28. module-virtual-surround-sink 5.1 recording Stereo Headphones Author: Niels Ole Salscheider
  29. 29. Amplitude difference Woof! Woof!
  30. 30. Delay Woof..!...Woof!
  31. 31. Spectral features
  32. 32. module-virtual-surround-sink ● Convolution with HRIR (Head Related Impulse Response) – HRIR has to be downloaded separately
  33. 33. Virtual Surround on Speakers ● Ambiophonics – Speaker crosstalk cancellation – Same technology as in soundbars – Not in PulseAudio yet
  34. 34. HRIR (left ear)
  35. 35. HRIR (left ear) Cutoff at 64 samples (to save CPU time)
  36. 36. HRTF (left ear)
  37. 37. HRTF (left ear) This sounds cheap
  38. 38. Conclusions
  39. 39. Open Tasks ● See GSOC thread: http://goo.gl/7fVwTk
  40. 40. Other Relevant Projects ● Speex: contains a denoiser ● Vlevel: dynamic range compressor ● BruteFIR: a fast convolution engine ● DRC-FIR: digital room correction
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×