Skip to content

Commit 5728620

Browse files
author
armaan
committed
final commit for webpage
1 parent a251341 commit 5728620

7 files changed

Lines changed: 74 additions & 26 deletions
29.1 KB
Loading
26.7 KB
Loading
20.7 KB
Loading
14.5 KB
Loading
37.6 KB
Loading
32.2 KB
Loading

content/news/2025-08-04-gsoc-2025-report-armaan-chowfin.md

Lines changed: 74 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -281,20 +281,20 @@ Mixxx performs real-time manipulation of audio: live mixing, tempo changes, effe
281281

282282
Mixxx provides an abstract `EngineBufferScale` class, which is subclassed to implement resamplers using various time-stretching libraries. `EngineBufferScaleST`, `EngineBufferScaleRubberband`, `EngineBufferScaleSRC`, `EngineBufferScaleZita` implement resamplers that use the [SoundTouch](https://www.surina.net/soundtouch/), [Rubberband](https://breakfastquay.com/rubberband/), [SampleRate](https://libsndfile.github.io/libsamplerate/) and [libzita-resampler](https://kokkinizita.linuxaudio.org/linuxaudio/zita-resampler/resampler.html) library APIs respectively.
283283

284-
During a live DJ set where the end result is an audio output, the resampling step happens in the player - between the soundsource and the engine. The exact flow is as follows, where T isi the rack sample-rate and E is the Engine (DAC) sample-rate:
284+
During a live DJ set where the end result is an audio output, the resampling step happens in the player - between the soundsource and the engine. The exact flow is as follows, where T is the rack sample-rate and E is the Engine (DAC) sample-rate:
285285

286286
i. Sound source (T)
287287
ii. Read ahead manager (T)
288-
iii. Resample #1 (T -> E): `scaleBuffer()`
288+
iii. Resample #1 (T -> E): `scaleBuffer()`
289289
iv. Engine buffer (E)
290290
v. Engine mixer (E)
291291

292292
With the new additions from this GSOC project, additional resampling occurs in the sidechains during recording and broadcast, where R is the recording/broadcast sample-rate:
293293

294294
vi. Sidechain (E)
295295
vii. Record/Broadcast (E)
296-
viii. Resample #2 (E -> R): `scaleBufferOneShot()`
297-
ix. Encoding (R): `encodeBuffer()`
296+
viii. Resample #2 (E -> R): `scaleBufferOneShot()`
297+
ix. Encoding (R): `encodeBuffer()`
298298

299299
<!-- Mixxx exposes two important parameters in the *Sound Hardware Preferences* panel:
300300
@@ -341,58 +341,106 @@ This GSOC project was derived from reports suggesting sub-par audio quality duri
341341

342342
A scratch can triggered by spinning the jog wheels of a MIDI controller. The architecture of Mixx ensures that the associated change in tempo ratio is made available to the resampler between DAC callbacks at the earliest. Mixxx acts on buffer chunks, for example 20 ms. The scratch control command is taken into account between these buffers. To have a steady tempo without clicks and pops, a ramp is applied. For example, if a user changes tempo from 1x to 2x, one additional buffer is used to slowly change the tempo from 1x to 2x.
343343

344-
The scratch control command directs the chosen resampler to adjust the quantity of input frames it requests from the Read-Ahead Manager and then interpolate to the desired output frame count. This emulates the effect of scratching - i.e. an interval of high/low-frequency output due to sudden tempo change. Our empirical tests have revealed the following per-buffer resample latencies for each resampler:
344+
The scratch control command directs the chosen resampler to adjust the quantity of input frames it requests from the Read-Ahead Manager and then interpolate to the desired output frame count. This emulates scratching - i.e. playback of high/low-frequency output due to sudden tempo change. Our empirical tests have revealed the following per-buffer resample latencies for each resampler:
345345

346-
<!-- <table of resample latencies> -->
346+
<table>
347+
<tr><th>Resampler</th><th>Per-Buffer Latency</th>
348+
<tr><td>SampleRate Linear</td><td>10 µs</td>
349+
<tr><td>Handcrafted Linear</td><td>20 µs</td>
350+
<tr><td>SampleRate Fastest Sinc</td><td>57 µs</td>
351+
<tr><td>SampleRate Highest-Quality Sinc</td><td>448 µs</td>
352+
</table>
353+
---
347354

348355
#### Contributions
349-
**[mixxxPR#15081](https://github.com/mixxxdj/mixxx/pull/15081): Custom samplerates setting for recording.**
356+
**[mixxxPR#15081](https://github.com/mixxxdj/mixxx/pull/15081): Custom samplerates setting for recording.**
357+
Status: *Merged*
350358

351-
This PR introduces an improved user experience in the recording preferences page. No more error messages for incompatible formats. The GUI maintains the necessary format invariants. This PR also introduces `libsamplerate` to the build system along with a base resampler class using the libsamplerate `src_process` API.
359+
This PR introduces an improved user experience in the recording preferences page. No more error messages for incompatible formats. The GUI maintains the necessary format+sample-rate invariants. This PR also introduces `libsamplerate` to the build system along with a base resampler class using the libsamplerate `src_process` API.
352360

353361
**Key Files**
354362

355-
- [dlgprefsrecording.cpp]
356-
- [enginerecord.cpp]
357-
- [recordingmanager.cpp]
363+
- [dlgprefrecording.cpp](https://github.com/mixxxdj/mixxx/blob/7bf99bed4fac98b6b64b5d3170e5b867c402504a/src/preferences/dialog/dlgprefrecord.cpp)
364+
- [enginerecord.cpp](https://github.com/mixxxdj/mixxx/blob/7bf99bed4fac98b6b64b5d3170e5b867c402504a/src/engine/sidechain/enginerecord.cpp)
365+
- [recordingmanager.cpp](https://github.com/mixxxdj/mixxx/blob/7bf99bed4fac98b6b64b5d3170e5b867c402504a/src/recording/recordingmanager.cpp)
366+
367+
**GUI Changes**
368+
<div style="text-align: center; margin-bottom: 30px;">
369+
<div style="display: flex; flex-direction: column; align-items: center; gap: 20px;">
370+
<div style="width: 80%;">
371+
<img src="{static}/images/news/mixxx-recording-prefs-before.png" alt="Periodic Sampling 1" style="width: 100%; height: auto;">
372+
<p style="font-size: small; margin-top: 5px;"><strong>Before</strong></p>
373+
</div>
374+
<div style="width: 80%;">
375+
<img src="{static}/images/news/mixxx-recording-prefs-after.png" alt="Periodic Sampling 2" style="width: 100%; height: auto;">
376+
<p style="font-size: small; margin-top: 5px;"><strong>After</strong></p>
377+
</div>
378+
</div>
379+
</div>
358380

359381
---
360382

361383
**[mixxxPR#15160](https://github.com/mixxxdj/mixxx/pull/15160): Custom samplerates setting for broadcasting.**
384+
Status: *Unmerged*
362385

363386
This PR allows users to choose custom samplerates for each broadcast profile, independently of the engine samplerate.
364387

365388
**Key Files**
366389

367-
- [dlgprefsbroadcast.cpp]
368-
- [shoutconnection.cpp]
369-
- [broadcastmanager.cpp]
390+
- [dlgprefbroadcast.cpp](https://github.com/mixxxdj/mixxx/blob/6cfcecd461de3c6b5a86a8cafcfb334f5b382493/src/preferences/dialog/dlgprefbroadcast.cpp)
391+
- [shoutconnection.cpp](https://github.com/mixxxdj/mixxx/blob/6cfcecd461de3c6b5a86a8cafcfb334f5b382493/src/engine/sidechain/shoutconnection.cpp)
392+
- [broadcastprofile.cpp](https://github.com/mixxxdj/mixxx/blob/6cfcecd461de3c6b5a86a8cafcfb334f5b382493/src/preferences/broadcastprofile.cpp)
370393

371394
Users can now pick custom samplerates for both recording and broadcasting, independent of the engine samplerate.
372395

396+
**GUI Changes**
397+
<div style="text-align: center; margin-bottom: 30px;">
398+
<div style="display: flex; flex-direction: column; align-items: center; gap: 20px;">
399+
<div style="width: 80%;">
400+
<img src="{static}/images/news/mixxx-broadcast-prefs-before.png" alt="Periodic Sampling 1" style="width: 100%; height: auto;">
401+
<p style="font-size: small; margin-top: 5px;"><strong>Before</strong></p>
402+
</div>
403+
<div style="width: 80%;">
404+
<img src="{static}/images/news/mixxx-broacast-prefs-after.png" alt="Periodic Sampling 2" style="width: 100%; height: auto;">
405+
<p style="font-size: small; margin-top: 5px;"><strong>After</strong></p>
406+
</div>
407+
</div>
408+
</div>
409+
373410
---
374411

375412
**[mixxxPR#15005](https://github.com/mixxxdj/mixxx/pull/15005): Support for low-latency scratching using the libsamplerate callback API**
413+
Status: *Unmerged*
376414

377415
This PR implements a resampler class using the libsamplerate Callback API. We observed a reduction in per-buffer resampling latency from 20us to 10us - a 2x improvement over the handcrafted linear interpolator.
378416

379417
**Key Files**
380418

381-
- [enginebuffer.cpp]
382-
- [enginemixer.cpp]
383-
- [enginebufferscalesrc.cpp]
384-
- [dlgprefsound.cpp]
419+
- [enginebuffer.cpp](https://github.com/mixxxdj/mixxx/blob/ede79a2cbae107b557126905e246e6fac011b647/src/engine/enginebuffer.cpp)
420+
- [enginemixer.cpp](https://github.com/mixxxdj/mixxx/blob/ede79a2cbae107b557126905e246e6fac011b647/src/engine/enginemixer.cpp)
421+
- [enginebufferscalesrc.cpp](https://github.com/mixxxdj/mixxx/blob/ede79a2cbae107b557126905e246e6fac011b647/src/engine/bufferscalers/enginebufferscalesr.cpp)
422+
- [dlgprefsound.cpp](https://github.com/mixxxdj/mixxx/blob/ede79a2cbae107b557126905e246e6fac011b647/src/preferences/dialog/dlgprefsound.cpp)
423+
424+
**GUI Changes**
425+
<div style="text-align: center; margin-bottom: 30px;">
426+
<div style="display: flex; flex-direction: column; align-items: center; gap: 20px;">
427+
<div style="width: 80%;">
428+
<img src="{static}/images/news/mixxx-scratching-engine-prefs-before.png" alt="Periodic Sampling 1" style="width: 100%; height: auto;">
429+
<p style="font-size: small; margin-top: 5px;"><strong>Before</strong></p>
430+
</div>
431+
<div style="width: 80%;">
432+
<img src="{static}/images/news/mixxx-scratching-engine-prefs-after.png" alt="Periodic Sampling 2" style="width: 100%; height: auto;">
433+
<p style="font-size: small; margin-top: 5px;"><strong>After</strong></p>
434+
</div>
435+
</div>
436+
</div>
385437

386438
---
387439

388440

389-
### Future Work
441+
#### Future Work
390442
- Benchmarking the latency and CPU usage of the various resamplers during scratching.
443+
- Creating a test-suite for various scratching patterns.
391444

392-
393-
### Acknowledgements
394-
I thank Daniel, Evelynne, Ronny, and JoergBerg, who have spent considerable time reviewing my PRs and offering assistance anytime I needed it.
395-
396-
397-
### References
398-
[^1] https://0pointer.de/blog/projects/all-about-periods.html
445+
#### Acknowledgements
446+
I thank Daniel Schürmann, Evelynne Veys, Ronny, and Jörg Wartenberg, who have spent considerable time reviewing my PRs and offering assistance anytime I needed it.

0 commit comments

Comments
 (0)