汽水音乐(抖音官方音乐 App)里那些让耳朵"炸裂"的 VIP 音效(超重低音、360° 环绕、清澈人声、HiFi 现场、复古唱片……),通通免费,开箱即用。SodaMusic 是一款基于 Kotlin Multiplatform + Compose Multiplatform 的开源音乐播放器,深度复刻汽水音乐的深绿主题 UI,同时提供比肩原版的 DSP 音效处理引擎——核心算法用 C99 实现,Android 端经 NDK 编译为原生库,端到端接管解码→处理→播放管线。
- 🎧 12 种免费 VIP 音效:智能/超重低音/360°环绕/清澈人声/3D/HiFi现场/动感电音/摇滚/复古唱片 + 空间音频/音乐厅/KTV原唱消除
- 🧠 真双耳 3D:基于 HRTF(双耳时间差 ITD + 头部遮蔽 ILD + 耳廓陷波),空间预设让声源绕头旋转——不是靠 Haas 延时做出的相位假象
- 🏛️ FDN 混响:8 延时线 + Householder 反馈矩阵,比传统并行 comb Freeverb 更平滑、更自然
- 🎨 深度复刻汽水音乐 UI:深森林绿主题、方形圆角封面、实时频谱动画、底部抽屉音效切换
- 📱 真正的跨平台:一套代码跑 Android、桌面(Windows/macOS/Linux)、iOS
- 🔊 真实音频管线:Android 走 C/NDK 原生 DSP(MediaCodec 解码 → 原生 DSP → AudioTrack,逐块实时处理、支持播放中切音效);桌面端走 Kotlin 移植的同套算法
- 🎼 本地音乐扫描(Android 读 MediaStore;桌面端支持 JFileChooser,记忆上次目录)
- 📡 支持 MP3/WAV/M4A/FLAC/OGG/AAC(Android MediaCodec;桌面端 JLayer 纯 Java MP3 解码)
- 🎙️ 实时频谱可视化:Android Visualizer 挂 AudioTrack session(反映处理后输出),桌面端跑 256 点 FFT
📢 为什么做这个? 汽水音乐的音效需要付费会员。SodaMusic 用开源方式实现了相同听感的音效链,让所有人都能免费享受音乐的"高级氛围感"。致敬原 App 设计,也致敬所有爱音乐的人。
🎧 空间类音效(360°环绕 / 3D / 空间音频)建议戴耳机体验——HRTF 双耳渲染在耳机下声场定位最准确。
| 特性 | Android | Desktop | iOS |
|---|---|---|---|
| MP3/WAV/M4A 等格式播放 | ✅ MediaCodec 解码 | ✅ JLayer 纯 Java 解码 | 🚧 |
| 12 种 VIP 音效 | ✅ 原生 C/NDK DSP | ✅ Kotlin DSP 引擎 | 🚧 |
| HRTF 双耳 3D + FDN 混响 | ✅ | ✅ | 🚧 |
| 实时频谱可视化 | ✅ Visualizer | ✅ 256 点 FFT | 🚧 |
| 播放中实时切换音效 | ✅ | — | 🚧 |
| 本地媒体库扫描 | ✅ MediaStore | — | 🚧 |
| 原生文件选择器 | ✅ SAF / 运行时权限 | ✅ JFileChooser | 🚧 |
| 深色森林绿主题 | ✅ | ✅ | ✅ |
| 记忆上次目录 | — | ✅ Preferences | 🚧 |
| 自动播放测试曲目 | — | ✅ | — |
| 音效 | 听感 | DSP 配置 |
|---|---|---|
| 🎚️ 原声 | 无任何处理 | EQ 平直 / 全链路旁路 |
| 🧠 智能音效 | 自适应曲风 | 低频提升 + 空气感 + 轻压缩 |
| 🔊 360° 环绕 | 超大声场 | HRTF 绕头旋转 + FDN 房间混响 |
| 🎸 超重低音 | 澎湃低音 | Low Shelf +12dB @80Hz + 低频压缩 |
| 🎤 清澈人声 | 人声突出 | 砍低频 + 2.5kHz 提升 + 5kHz 空气感 |
| 🌐 3D 音效 | 空间包围 | HRTF 缓慢绕头 + 小型 FDN 混响 |
| 🎭 HIFI 现场 | 临场感 | 前方 HRTF 外化 + 大厅 FDN 混响 30% |
| ⚡ 动感电音 | 炸裂电子 | Low +8dB / High +6dB + 高压缩比 + 饱和 |
| 🎸 摇滚音效 | 经典 V 型 | 低频 +5dB / 高频 +4dB + 饱和 |
| 📻 复古唱片 | 怀旧黑胶 | 带通 + 黑胶噪声 + Wow/Flutter(延时线调制) |
| 🌌 空间音频 | 沉浸声场 | 强 HRTF 绕头 + 宽广 FDN 混响 |
| 🏛️ 音乐厅 | 现场殿堂 | 超长 FDN 混响(T60≈3.4s)+ 舞台成像 |
| 🎤 KTV 原唱消除 | 伴奏提取 | 中置人声消除(M/S)+ 保留低频 + 展宽 |
| Windows · 主页 Player | Windows · 音效抽屉 Effects | macOS · 主页 Player |
|---|---|---|
![]() |
![]() |
![]() |
| 主页 Player | 音效抽屉 Effects |
|---|---|
![]() |
![]() |
页面要点 / Highlights
- 首页 Player:深绿背景、方形圆角封面、封面内嵌实时频谱柱状条动画、当前音效标签 pill(点击展开抽屉)、底部播放控制(上一首 / 播放暂停 / 下一首 / 随机 / 循环)
- 音效抽屉 Effects:底部滑出、半透明蒙层、12 种音效卡片网格、VIP 标签用渐变高亮、已选音效带勾
- 音乐源:示例曲目 / 本地扫描 / 在线 URL 三种入口(右上角 🎵 按钮选曲、📶 按钮切换音效)
commonMain/ # 共享 Kotlin 代码
├── audio/effects/ # DSP 链:HrtfBinaural / FdnReverb / BiquadFilter /
│ # Compressor / VinylProcessor / OnePole / FFT / Resampler
│ # (EffectProcessor 桌面端用;Android 走原生同算法)
├── model/ # Track / PlayState / TrackSource
├── ui/ # Compose UI (主题/组件/页面)
└── utils/ # FilePicker / DisplayName / LocalScanner / StartupTrack
nativeDsp/c/ # 🆕 C99 原生 DSP 引擎(NDK+CMake → libsodadsp.so)
├── soda_dsp.c/h # HRTF 双耳 + FDN 混响 + 5 段 EQ + 压缩 + 饱和 + 黑胶
└── soda_jni.c # JNI 桥(被 androidMain 的 NativeDsp.kt 加载)
androidMain/ # Android 实现
├── audio/MediaCodecDecoder # MediaExtractor + MediaCodec 全格式解码 → PCM
├── audio/effects/NativeDsp # JNI 封装:System.loadLibrary("sodadsp")
├── NativeAudioPlayer # MediaCodec → 原生 DSP → AudioTrack(逐块实时,可中途切音效)
├── Visualizer (FFT 频谱,挂 AudioTrack audioSessionId,反映处理后输出)
├── SAF 文件选择器 (ActivityResultContracts.OpenDocument)
├── MediaStore 本地扫描
└── AndroidFilePicker (权限/选择器 suspend 桥接)
(旧的 MediaPlayer + 系统 AudioFx 路线已替换为原生 DSP 管线)
desktopMain/ # Desktop JVM 实现
├── audio/decode/Mp3Decoder # JLayer MP3 解码 (纯 Java)
├── (commonMain 的 EffectProcessor) # Kotlin 移植的同套 HRTF + FDN 算法
├── JFileChooser 文件选择器 (记忆目录)
└── 线性插值重采样器
核心技术栈:
- Kotlin 2.0.21 + Compose Multiplatform 1.7.1
- Kotlinx Coroutines 异步流
- Android NDK 27 + CMake:原生 C DSP 引擎(编译 4 个 ABI:arm64-v8a / armeabi-v7a / x86 / x86_64)
- Android MediaCodec / AudioTrack / Visualizer
- JLayer 1.0.1 桌面端纯 Java MP3 解码(无 native 依赖)
- javax.sound.sampled 桌面音频输出
- 共享 DSP 算法:HRTF 双耳声像(Woodworth ITD + 头部遮蔽 + 耳廓陷波)+ 8 线 Householder 矩阵 FDN 混响 + Biquad IIR EQ + RMS 压缩 + tanh 软限幅 + 黑胶 Wow/Flutter
Android vs 桌面:两端跑的是同一套算法——Android 用 C 原生实现(
soda_dsp.c),桌面用 Kotlin 移植(EffectProcessor+HrtfBinaural+FdnReverb),音感一致。原生库加载失败时 Android 自动降级为 PCM 直播,不会崩溃。
前置条件:JDK 17+
# Linux/macOS
cd SodaMusic
./gradlew :composeApp:run
# Windows
cd SodaMusic
gradlew.bat :composeApp:run启动后会自动查找 D:/workspace/agent-proj/caee.mp3(或项目根下 caee.mp3)播放。
右上角 🎵 按钮打开 JFileChooser 选音频文件;右上角 ⚖ 按钮切换音效。
前置条件:Android Studio + Android SDK (API 24+) + NDK 27
# 命令行构建 debug APK(含原生库编译)
cd SodaMusic
./gradlew :composeApp:assembleDebug
# APK 位置: composeApp/build/outputs/apk/debug/composeApp-debug.apk或者在 Android Studio 中打开项目根目录,直接 Run composeApp。
首次启动请允许:
- 音频权限(READ_MEDIA_AUDIO)- 扫描本地音乐
- 录音权限(RECORD_AUDIO)- Visualizer 读取音频频谱(不录音)
🚧 进行中,欢迎 PR。
桌面端打包成可执行程序(Windows exe / macOS dmg / Linux deb):
cd SodaMusic
./gradlew :composeApp:packageDistributionForCurrentOS
# 输出: composeApp/compose/binaries/main/欢迎 PR!可以做的方向:
- iOS 完整实现(AVAudioEngine + 本地库扫描)
- 歌词展示(LRC 解析 + 滚动)
- 播放列表 / 歌单管理
- 封面图从 MP3 ID3 提取(目前用 coverColor 占位)
- 更多音效预设(经典/舞曲/蓝调/爵士/乡村)
- Android 流式 MediaCodec 管线(降低长音频内存占用)
- WebAssembly 版本
- 暗黑/亮色主题切换
提交 PR 前请确保 ./gradlew :composeApp:compileKotlinDesktop :composeApp:assembleDebug 通过。
- 本项目仅供学习交流,UI 风格参考自字节跳动旗下汽水音乐,不做任何商业用途
- "VIP 音效"为 DSP 算法模拟,听感近似但不完全等同于原版,不关联字节跳动任何产品
- 请确保您播放的音乐版权合规,项目仅作为音频 DSP 技术演示
MIT © 2026 SodaMusic Contributors
Soda-Music-inspired UI · 12 Free VIP Audio Effects · Native C/NDK DSP · Cross-Platform · Open Source
SodaMusic is an open-source, cross-platform music player built with Kotlin Multiplatform + Compose Multiplatform. It brings the Soda Music (Douyin's official music app) look and feel — plus all 12 "VIP" audio effects unlocked for free. The DSP core is written in C99 and compiled to a native library via the Android NDK, so the app owns the full decode → DSP → playback pipeline.
- 🎧 12 free VIP-grade effects: Smart, 360° Surround, Super Bass, Clear Vocals, 3D, HiFi Live, Dynamic EDM, Rock, Vinyl Vintage, plus Spatial Audio, Concert Hall, Karaoke (vocal removal)
- 🧠 Real binaural 3D: HRTF rendering (interaural time difference + head shadow + pinna notch). The spatial presets rotate a virtual source around your head — not a Haas-delay phasing trick
- 🏛️ FDN reverb: 8-line Householder-matrix feedback delay network — smoother and more natural than parallel-comb Freeverb
- 🎨 Authentic Soda-Music-inspired UI: deep forest-green theme, rounded-square album art, live spectrum bars, bottom-sheet effect picker
- 📱 True cross-platform — single codebase, runs on Android, Desktop (Windows/macOS/Linux), iOS (coming)
- 🔊 Owned audio pipeline: Android decodes via MediaCodec → runs the native C DSP → plays through AudioTrack (per-chunk, real-time, live effect switching); Desktop runs a Kotlin port of the same algorithms
- 🎼 Local library scan (Android MediaStore; Desktop with JFileChooser + last-dir memory)
- 📡 MP3/WAV/M4A/FLAC/OGG/AAC (Android MediaCodec; JLayer pure-Java on Desktop)
- 🎙️ Live spectrum visualizer: Android Visualizer taps the AudioTrack session (post-DSP output); 256-point FFT on Desktop
🎧 Spatial effects (360° Surround / 3D / Spatial Audio) sound best on headphones — HRTF binaural rendering localizes most accurately over headphones.
| Windows · Player | Windows · Effects Drawer | macOS · Player |
|---|---|---|
![]() |
![]() |
![]() |
| Player | Effects Drawer |
|---|---|
![]() |
![]() |
cd SodaMusic
./gradlew :composeApp:run # macOS / Linux
gradlew.bat :composeApp:run # WindowsRequires JDK 17+. On first launch it auto-plays caee.mp3 from the project root. Use the 🎵 icon to pick another file, ⚖ to cycle effects.
cd SodaMusic
./gradlew :composeApp:assembleDebug # also builds the native lib for all ABIs
# APK: composeApp/build/outputs/apk/debug/composeApp-debug.apkRequires Android Studio + SDK (API 24+) + NDK 27. Grant audio + record-audio permissions when prompted (record-audio is only used to read the audio-session FFT for the visualizer — no audio is captured).
commonMain/audio/effects— HrtfBinaural / FdnReverb / BiquadFilter / Compressor / VinylProcessor / OnePole / FFT / Resampler (EffectProcessorchains them on Desktop)nativeDsp/c— C99 native DSP engine (soda_dsp.c+ JNI bridgesoda_jni.c), built by NDK+CMake intolibsodadsp.soandroidMain— MediaCodec decode → native DSP → AudioTrack playback, Visualizer FFT, SAF picker, MediaStore scandesktopMain— JLayer MP3 decode, Kotlin port of the same HRTF+FDN chain, JFileChooser, PCM resamplercommonMain/ui— Compose screens & reusable components
Android vs Desktop: both run the same algorithms — C native on Android (
soda_dsp.c), Kotlin port on Desktop (EffectProcessor+HrtfBinaural+FdnReverb). If the native lib fails to load, Android falls back to plain PCM playback (no crash).
| Effect | Signature |
|---|---|
| Smart | Gentle bass + air band |
| 360° Surround | Rotating HRTF + room FDN reverb |
| Super Bass | +12 dB low shelf @80 Hz + bass compressor |
| Clear Vocals | Low cut, 2.5 kHz presence, 5 kHz air |
| 3D Audio | Slow rotating HRTF + small FDN reverb |
| HiFi Live | Front-stage HRTF + large-hall FDN reverb |
| Dynamic EDM | +8 dB bass / +6 dB highs, heavy compression, saturation |
| Rock | V-curve EQ with saturation |
| Vintage | Band-pass, wow/flutter (delay-modulated), vinyl noise |
| Spatial Audio | Strong rotating HRTF + wide lush FDN reverb |
| Concert Hall | Long FDN reverb (T60 ≈ 3.4 s) + stage imaging |
| Karaoke | Center-vocal removal (M/S) + bass kept + widened |
PRs welcome! See the Chinese section for the roadmap.
MIT © 2026 SodaMusic Contributors
This project is for educational purposes only. The UI design is inspired by Soda Music (ByteDance). It is not affiliated with, endorsed by, or sponsored by ByteDance. "VIP effects" are algorithmic approximations — please respect music copyrights in your jurisdiction.




