Skip to content

Commit cb93f12

Browse files
feat: identify the maintained fork as ProjectM TV Engine
1 parent 910e837 commit cb93f12

11 files changed

Lines changed: 27 additions & 9 deletions

File tree

‎AGENTS.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Last full discovery: 2026-10-04, against `main` at `4fc66208` (projectM patch se
2424

2525
## Repository overview
2626

27-
ProjectM TV is a music visualizer for Android TV. It renders [projectM](https://github.com/projectM-visualizer/projectm) (a MilkDrop reimplementation) presets that react to the audio another app plays on the same TV; it is not a music player. It bundles 9,606 *Cream of the Crop* presets. GitHub: `johnneerdael/ProjectM-TV` (verified with `gh repo view`; a checkout's `origin` URL may still use the former name `projectm-android-tv`, which redirects).
27+
ProjectM TV is a music visualizer for Android TV, powered by **ProjectM TV Engine**, the maintained projectM fork based on upstream 4.1.7 plus this repository's patch series. It renders MilkDrop presets that react to the audio another app plays on the same TV; it is not a music player. It bundles 9,606 *Cream of the Crop* presets. GitHub: `johnneerdael/ProjectM-TV` (verified with `gh repo view`; a checkout's `origin` URL may still use the former name `projectm-android-tv`, which redirects).
2828

2929
| | `:app` | `:core` |
3030
|---|---|---|
@@ -130,7 +130,7 @@ Follow the existing dependency injection and ownership model. Prefer explicit de
130130
Use the project's established resource or localization mechanism for user-facing text. Follow its locale ownership and translation workflow; do not invent an English-only or all-locales policy.
131131

132132
- **Not localized today.** `app/src/main/res/values/strings.xml` holds only `app_name` (overridden by `resValue` for test builds); there are no `values-*` locale directories and no translation workflow. UI text is English literals in Java (`MainActivity`, `OptionRow`, …) and the layout XML. Introducing localization is a deliberate change that should move strings to resources consistently.
133-
- **Wording conventions:** the product name is "ProjectM TV"; menu paths use `›` (e.g. *Settings › Advanced › Auto-update*). Keep setting names and values identical in the UI, the README settings tables and `docs/user-guide/settings.md`.
133+
- **Wording conventions:** the app name is "ProjectM TV" and its maintained engine is "ProjectM TV Engine". Use "based on projectM 4.1.7" for upstream provenance; do not present the patched engine as stock upstream 4.1.7. The core AAR shares the app release version; `ProjectMJNI.getVersion()` still reports the upstream version. Preserve package/API/artifact names and historical evidence identities. Menu paths use `›` (e.g. *Settings › Advanced › Auto-update*). Keep setting names and values identical in the UI, the README settings tables and `docs/user-guide/settings.md`.
134134
- Store listing text: `fastlane/metadata/android/en-US/` (F-Droid metadata, English only).
135135

136136
## Code structure and modularization

‎README.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
[![Android CI](https://github.com/johnneerdael/ProjectM-TV/actions/workflows/android.yml/badge.svg)](https://github.com/johnneerdael/ProjectM-TV/actions/workflows/android.yml)
44

5-
ProjectM TV is a music visualizer for Android TV. It runs [projectM](https://github.com/projectM-visualizer/projectm), an open-source reimplementation of Winamp's MilkDrop, built from the 4.1.7 release with fixes from the upcoming 4.1.8 already applied on top, including this project's own [shader remainder and operator-precedence fix](https://github.com/projectM-visualizer/projectm/pull/1031) that was merged upstream. It ships with 9,606 presets from Jason Fletcher's *Cream of the Crop* collection. It visualizes the music another app plays on the TV, such as SoundCloud. It is not a music player itself.
5+
ProjectM TV is a music visualizer for Android TV, powered by **ProjectM TV Engine**, our extensively modified fork of [projectM](https://github.com/projectM-visualizer/projectm), the open-source reimplementation of Winamp's MilkDrop. Based on upstream version 4.1.7, the engine combines upstream backports with this project's shader and equation compatibility fixes, rendering optimizations, resolution-scaled lines and authored-scale feedback alongside native-resolution geometry and composite output, up to 4K. It ships with 9,606 presets from Jason Fletcher's *Cream of the Crop* collection. It visualizes the music another app plays on the TV, such as SoundCloud. It is not a music player itself.
6+
7+
The engine is designed to preserve the authored look as resolution increases; some presets still differ from MilkDrop or have known visual defects. See [picture limits](#what-it-does-not-do-and-known-limits) and the [patch inventory and upstream attribution](docs/THIRD_PARTY.md), including this project's [shader remainder and operator-precedence fix](https://github.com/projectM-visualizer/projectm/pull/1031) merged upstream.
68

79
> **Install on your TV with the Downloader app: code `4821216`**
810
>
@@ -238,6 +240,8 @@ Visibility resumes still use `revalidateForResume`. See [architecture](docs/ARCH
238240

239241
### projectM
240242

243+
**ProjectM TV Engine** is the maintained fork embedded in both the app and the core AAR used by Milkbeat. The settings panel identifies it by name and labels 4.1.7 as its upstream base. The core AAR shares the app's release version; `ProjectMJNI.getVersion()` continues to report the upstream projectM version for existing consumers. The upstream number alone does not identify the patched engine: use the release version, source revision and artifact checksum when comparing builds.
244+
241245
projectM is built from source with the app. The git submodule `third_party/projectm` is pinned to the 4.1.7 release; the app's CMake applies the patches in `tools/projectm-patches/` (a transition fix from upstream; rendering into the app's own framebuffer, keeping the presets' frames when the render size changes, caches of linked and translated shader programs, fewer redundant GL calls, batched drawing of custom shapes, reuse of framebuffer textures between presets, a faster HLSL parser on Android, corrected floating-point/vector remainder and shader operator precedence, and less memory traffic per frame on tile-based GPUs: discarded render-target contents, fewer full-screen copies, one indexed draw for the warp mesh, the final image drawn straight to the screen; and lines drawn as quads that keep their share of the picture at every render size ([#682](https://github.com/projectM-visualizer/projectm/issues/682)); and shader translation fixes for presets that assign to uniform values such as `q18` or `time`, fill arrays from flat value lists, or declare `sampler_state` blocks; and MilkDrop's equation loading: numbered code lines joined and line comments removed when the code does not compile otherwise, a lone `.` read as 0, and code blocks that do not compile left out instead of failing the preset). The transition fix, the PCM buffer size, parenthesized constructor expressions, the HLSL parser's number scan ([#1030](https://github.com/projectM-visualizer/projectm/pull/1030)), the projectm-eval 1.0.7 evaluator and the remainder/precedence fix ([#1031](https://github.com/projectM-visualizer/projectm/pull/1031), from this project) are already on upstream master for 4.1.8; the rest are specific to this app. The build links projectM statically into `libprojectmtv.so`, for armeabi-v7a and arm64-v8a. The first build per ABI takes a few minutes longer; later builds reuse it. There are no prebuilt binaries in the repository. After pulling a change to one of the patches, reset the submodule first (`git submodule foreach --recursive git checkout -- .`) so the new version applies.
242246

243247
Blur texture allocation now preserves the active render targets on first use and resize. This fixes the host framebuffer error in `midgitstraights of majillaen - featy sweet.milk`; see the [diagnosis and validation](docs/superpowers/evidence/midgit-framebuffer/README.md) for device and appearance limits.

‎app/src/main/java/com/example/projectm/visualizer/MainActivity.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,8 @@ public void onStopped() {
406406
updater.attach(handler, updateListener);
407407

408408
TextView versionInfo = findViewById(R.id.version_info);
409-
versionInfo.setText("v" + appVersion() + " · projectM " + ProjectMJNI.getVersion());
409+
versionInfo.setText("v" + appVersion() + " · ProjectM TV Engine"
410+
+ "\nBased on projectM " + ProjectMJNI.getVersion());
410411

411412
findViewById(R.id.prev_preset_button).setOnClickListener(v -> ProjectMJNI.previousPreset(true));
412413
findViewById(R.id.random_preset_button).setOnClickListener(v -> ProjectMJNI.randomPreset(true));

‎app/src/main/res/layout/activity_main.xml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,8 @@
220220
<TextView
221221
android:id="@+id/version_info"
222222
style="@style/Overlay.Meta"
223+
android:singleLine="false"
224+
android:maxLines="2"
223225
android:layout_width="match_parent"
224226
android:layout_height="wrap_content"
225227
android:layout_marginStart="12dp"

‎docs/ARCHITECTURE.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
This document retains the historical v1.8/v1.9 analysis and verification below. Section 5 includes current rendering and integration guidance; older measurements are identified as historical and do not establish the current Auto policy or device limits. Current settings and validation are documented in the [user guide](user-guide/settings.md) and [Native trails design](superpowers/specs/2026-10-05-native-trails.md).
44

5+
The maintained engine is named **ProjectM TV Engine**: an extensively modified projectM fork based on upstream 4.1.7, built from the pinned submodule plus `tools/projectm-patches/`. The app and Milkbeat's core AAR share this engine. The settings panel names the fork and shows the upstream base separately. Public Java/JNI names and artifact filenames are retained; `ProjectMJNI.getVersion()` still returns the upstream version. Identify a patched build by its release version, source revision and artifact checksum. [Third-party attribution](THIRD_PARTY.md) records upstream backports and local changes.
6+
57
## 1. Summary
68

79
Version 1.8 rebuilds the rendering and preset pipeline. The goals were to start visuals right away, skip presets that show nothing, and fix the causes of black presets, several of which were already present before 1.7.

‎docs/THIRD_PARTY.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Third-party content
22

3+
**ProjectM TV Engine** is this project's maintained, extensively modified fork of projectM, based on upstream version 4.1.7. It is built from the pinned upstream sources plus the ordered patches listed below, including upstream backports and ProjectM TV-specific changes. The engine name does not replace projectM's attribution or LGPL 2.1 licence. The app and the core AAR consumed by Milkbeat use this engine; their release version and artifact checksums identify the distributed build.
4+
35
| Content | Source | License |
46
|---|---|---|
57
| projectM 4.1.7, built from source with the app: git submodule `third_party/projectm` at tag `v4.1.7` (commit `e0b0a967`, with projectm-eval as its own submodule), plus the patches in `tools/projectm-patches/` (0001: upstream commit `0227b7a6`, plasma transition fix for NVIDIA SHIELD; 0002: render target, frame-keeping resize, shader program cache, shader state caching and an outgoing-preset frame divisor; 0003: hlslparser uses the prebuilt "C" locale; 0004: projectm-eval's `rand()` state per thread; 0005: cache of translated preset shaders; 0006: custom shapes drawn in batches; 0007: pool of framebuffer textures; 0008: preserve floating-point/vector shader remainder and correct operator precedence, merged upstream as [PR 1031](https://github.com/projectM-visualizer/projectm/pull/1031); 0009: invalidate fully overwritten render targets, orphan the warp mesh buffer; 0010: skip the first y-flip when the flip texture already holds it; 0011: indexed warp mesh draw; 0012: warp and shapes in one render pass, blur drawn straight into its textures; 0013: motion-vector map written only while motion vectors are shown; 0014: video echo drawn in the final orientation, without a third y-flip; 0015: keeps 0009 and 0012 from changing the image of presets whose warp shader reads the blur textures or whose shaders discard pixels; 0016: the final image drawn straight into the target framebuffer outside of transitions and switches; 0017: upstream commit `dd89dfba` ([PR 1032](https://github.com/projectM-visualizer/projectm/pull/1032)), `projectm_pcm_get_max_samples()` returns the 576-sample analysis buffer size instead of 480; 0018: upstream commit `c86dee9b` ([PR 948](https://github.com/projectM-visualizer/projectm/pull/948)), hlslparser accepts parenthesized constructors followed by an operator, e.g. `(float2(x, y)) * s`; 0019: upstream commit `a4e86cd8` ([PR 1030](https://github.com/projectM-visualizer/projectm/pull/1030)), hlslparser no longer copies the rest of the shader for every number it scans; 0020: projectm-eval's evaluator code from 1.0.6 to 1.0.7 (MilkDrop's comparison tolerance of 0.00001, an error-message leak); 0021: upstream commit `2a3c3603` ([PR 1025](https://github.com/projectM-visualizer/projectm/pull/1025)), stops infinite expansion of self-referencing shader macros (HLSLParser only; the stb_image changes are not needed with SOIL2 in 4.1.7); 0022: upstream commit `3b82f41f` ([PR 1029](https://github.com/projectM-visualizer/projectm/pull/1029)), bounds custom waveform audio reads, ignores oscilloscope separation offsets, and scales up to 512 waveform points; 0023: makes the shader-analysis headers from 0015 unconditional so GCC builds without debug logging compile; 0024: waveforms, custom waves, shape outlines and motion vectors drawn as quads whose width, together with the blur levels, texel sizes and waveform sample count, follows MilkDrop's 1024x768 reference size above its area, for [issue 682](https://github.com/projectM-visualizer/projectm/issues/682), specific to this app; 0025: preserve shader driver diagnostics in standard exception handlers and free vertex shaders after failed fragment compilation; 0026: reserve warp texture unit zero for the implicit main sampler so named clamp, wrap and point samplers keep their requested settings; 0027: preserve preset loading and expression-compilation diagnostics through standard exception handlers; 0028: initialize new color attachments to transparent black and use a context-safe scratch framebuffer for attachment clearing; 0029: per-frame code that the evaluator rejects is compiled once more with its line breaks and `//` and `\\` line comments removed, as MilkDrop joins the records before compiling; 0030: a preset shader that assigns to a uniform (`q18 = 1;`, `time *= 0.4;`) writes a copy that starts with the uniform's value and that all its functions share, instead of an uninitialized local; 0031: flat array initializer lists such as `float4 samples[5] = {...20 values...}` are grouped into one constructor per element, lists that do not fill the array are reported, and global arrays are initialized whole; 0032: `sampler_state` blocks are blanked without shifting the shader source, so `shader_body` is found at the right place, and sampler names end at the identifier (`sampler_noise_lq=sampler_state{` names `noise_lq`). 0030–0032 are specific to this app; 0033: the 0029 retry for preset init and per-pixel code and for custom wave and shape code, plus NS-EEL's reading of a `;` inside parentheses without a following operand as a space, with the evaluator's error position in compile messages; 0034: projectm-eval reads a lone `.` as the number 0, as NS-EEL's lexer does; 0035: equation code that still does not compile is left out and reported through a new initialization-warning callback, as MilkDrop's `CState::RecompileExpressions` does, instead of failing the preset; 0036: preserve locals named `sample` during type lookahead, escape that name in GLSL, retain macro token spacing and authored grouping for declarations/statements, and accept postfix swizzles/indexing after parenthesized constructors; specific to this app; 0037: preserves random texture aliases and requested sampler modes across shared slots, filters qualified random names by their filename suffix, binds short aliases to the same image, deduplicates emitted uniforms and retains loaded-image source paths for diagnostics; 0038: reference-scale feedback diffusion with exact point-sampled feedback and sharp composites; 0039: compile-time diffusion opt-out for the capped core rendering policy; 0040: preserve plain uninitialized scalar/vector float shader globals as external uniform inputs with initialized writable copies, specific to this app; 0041: preserve caller read/draw framebuffer bindings before blur texture allocation or resizing, specific to this app; 0042: instance-owned authored feedback with native geometry/composite, centered headroom-limited trail detail, per-frame shader RNG reuse, resize/motion-vector/viewport state controls and additive feedback APIs, specific to this app); linked statically into `libprojectmtv.so`. Up to 1.9.4 the app shipped a prebuilt master snapshot, commit `d89c09ef` (August 2025); 1.9.5 shipped prebuilt 4.1.7. | [projectM](https://github.com/projectM-visualizer/projectm) | LGPL 2.1 |

‎docs/user-guide/development.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Build and test
22

3-
ProjectM TV embeds projectM 4.1.7 with the app's patch series. The Android app, offline analyzer and documentation site have separate build dependencies.
3+
ProjectM TV embeds **ProjectM TV Engine**, our extensively modified fork of projectM based on upstream version 4.1.7, with the ordered patch series in `tools/projectm-patches/`. The Android app, offline analyzer and documentation site have separate build dependencies.
4+
5+
The published core AAR shares the app's release version. `ProjectMJNI.getVersion()` retains its existing meaning: the upstream projectM version, not the identity of the patched build. Record the release version, source revision and artifact checksum for reproducible engine comparisons. See the [patch inventory and upstream attribution](https://github.com/johnneerdael/ProjectM-TV/blob/main/docs/THIRD_PARTY.md).
46

57
## Android app
68

‎docs/user-guide/index.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# ProjectM TV user guide
22

3-
ProjectM TV visualizes music another app plays on Android TV. It runs projectM with 9,606 MilkDrop presets. Start music in your player, open ProjectM TV and control it with your TV remote.
3+
ProjectM TV visualizes music another app plays on Android TV. It uses **ProjectM TV Engine**, our extensively modified fork of projectM based on upstream version 4.1.7, with 9,606 MilkDrop presets. Start music in your player, open ProjectM TV and control it with your TV remote.
4+
5+
The engine combines expanded preset compatibility with authored-scale feedback and native-resolution geometry and output, up to 4K. It is designed to preserve the authored look as resolution increases, with [known visual and device limits](troubleshooting.md#native-trails-look-soft-or-different). The settings panel shows **ProjectM TV Engine** and labels the upstream version separately as **Based on projectM 4.1.7**.
46

57
![ProjectM TV showing a preset and the playing track](images/launch.jpg)
68

‎docs/user-guide/settings.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Open the panel with Center, Enter or Menu. Use Up / Down to select a row and Left / Right to change its value.
44

5+
The panel identifies **ProjectM TV Engine**, the maintained projectM fork, beside the app version. **Based on projectM 4.1.7** on the next line identifies the upstream base; it does not describe an unmodified upstream engine. Some older setup screenshots below predate this naming.
6+
57
All is the default preset mood. Your selected collection is saved. The beta predictor uses overlapping score bands: Chill 1–30, Normal 25–75 and Intense 70–100. Saved Dance selections return to All.
68

79
| Setting | Values | Default |

0 commit comments

Comments
 (0)