From daf15d9ba2cd098039666d4aa73acd7b97060ed4 Mon Sep 17 00:00:00 2001 From: mathealgou Date: Sat, 31 Oct 2026 01:15:58 -0300 Subject: [PATCH 01/10] feat: add castration option (removing balls) --- .vscode/settings.json | 16 +++++++++++++ src/plug.c | 52 +++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..2b8df765 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,16 @@ +{ + "workbench.colorCustomizations": { + "terminal.background": "#00000000", + "activityBar.background": "#0F3046", + "titleBar.activeBackground": "#164462", + "titleBar.activeForeground": "#F6FAFD", + "titleBar.inactiveBackground": "#0F3046", + "titleBar.inactiveForeground": "#F6FAFD", + "statusBar.background": "#0F3046", + "statusBar.foreground": "#F6FAFD", + "statusBar.debuggingBackground": "#0F3046", + "statusBar.debuggingForeground": "#F6FAFD", + "statusBar.noFolderBackground": "#0F3046", + "statusBar.noFolderForeground": "#F6FAFD" + } +} \ No newline at end of file diff --git a/src/plug.c b/src/plug.c index 84d0ef24..1ad74749 100644 --- a/src/plug.c +++ b/src/plug.c @@ -192,6 +192,7 @@ typedef struct { int circle_radius_location; int circle_power_location; bool fullscreen; + bool castrated; // Renderer bool rendering; @@ -363,6 +364,10 @@ static void fft_render(Rectangle boundary, size_t m) Texture2D texture = { rlGetTextureIdDefault(), 1, 1, 1, PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 }; + // No balls if castrated + if (p->castrated) {return;} + + // Display the Smears SetShaderValue(p->circle, p->circle_radius_location, (float[1]){ 0.3f }, SHADER_UNIFORM_FLOAT); SetShaderValue(p->circle, p->circle_power_location, (float[1]){ 3.0f }, SHADER_UNIFORM_FLOAT); @@ -1227,6 +1232,37 @@ static int render_button_with_location(const char *file, int line, Rectangle bou return state; } +static int castrated_checkbox_with_location(const char *file, int line, Rectangle boundary) +{ + uint64_t id = DJB2_INIT; + id = djb2(id, file, strlen(file)); + id = djb2(id, &line, sizeof(line)); + + int state = button_with_id(id, boundary); + if (state & BS_CLICKED) { + p->castrated = !p->castrated; + } + + Rectangle checkbox = { + .x = boundary.x + boundary.width/2 - boundary.width*0.2f, + .y = boundary.y + boundary.height/2 - boundary.height*0.2f, + .width = boundary.width*0.4f, + .height = boundary.height*0.4f, + }; + Color color = (state & BS_HOVEROVER) ? COLOR_TRACK_BUTTON_HOVEROVER : COLOR_TRACK_BUTTON_BACKGROUND; + DrawRectangleRounded(boundary, 0.2f, 20, color); + if (p->castrated) { + DrawRectangleRec(checkbox, COLOR_ACCENT); + } + DrawRectangleLinesEx(checkbox, 2, WHITE); + + tooltip(boundary, "Castrated mode (no balls)", SIDE_TOP, false); + return state; +} + +#define castrated_checkbox(boundary) \ + castrated_checkbox_with_location(__FILE__, __LINE__, (boundary)) + #ifdef MUSIALIZER_MICROPHONE #define microphone_button(boundary) \ microphone_button_with_location(__FILE__, __LINE__, (boundary)) @@ -1355,9 +1391,9 @@ static bool toolbar(Track *track, Rectangle boundary) int state = 0; #ifdef MUSIALIZER_MICROPHONE - size_t buttons_count = 5; + size_t buttons_count = 6; #else - size_t buttons_count = 4; + size_t buttons_count = 5; #endif // MUSIALIZER_MICROPHONE if (boundary.width < HUD_BUTTON_SIZE*buttons_count) return interacted; @@ -1390,6 +1426,17 @@ static bool toolbar(Track *track, Rectangle boundary) start_rendering_track(track); } + state = castrated_checkbox((CLITERAL(Rectangle) { + x, + boundary.y, + HUD_BUTTON_SIZE, + HUD_BUTTON_SIZE, + })); + x += HUD_BUTTON_SIZE; + if (state & BS_CLICKED) { + interacted = true; + } + #ifdef MUSIALIZER_MICROPHONE state = microphone_button((CLITERAL(Rectangle) { x, @@ -1871,6 +1918,7 @@ MUSIALIZER_PLUG void plug_init(void) load_assets(); p->screen = LoadRenderTexture(RENDER_WIDTH, RENDER_HEIGHT); p->current_track = -1; + p->castrated = false; // TODO: restore master volume between sessions SetMasterVolume(0.5); From 00a5ec8b6b93758b5d311642ba85967179107e34 Mon Sep 17 00:00:00 2001 From: Matheus Goulart Date: Sat, 31 Oct 2026 01:22:36 -0300 Subject: [PATCH 02/10] Update README to reflect project status and origin --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f17afb31..c1888c78 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@

> [!WARNING] -> This software is unfinished. Keep your expectations low. +> This is a fork of [https://github.com/tsoding/musializer](https://github.com/tsoding/musializer) The project aims to make a tool for creating beautiful music visualizations and rendering high quality videos of them. From 3bd6856400230462e0bd5f123e48b39869bd8a88 Mon Sep 17 00:00:00 2001 From: mathealgou Date: Sat, 31 Oct 2026 16:26:10 -0300 Subject: [PATCH 03/10] fix: ignore bullshit folder --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 712bb841..df2db6c8 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,6 @@ nob.old nob.exe nob.exe.old nob.obj + +# stupid extension creates file +.vscode/ \ No newline at end of file From 913239d7c8eeef11a7f917756fd6c04fa0ce6942 Mon Sep 17 00:00:00 2001 From: mathealgou Date: Sat, 31 Oct 2026 16:28:03 -0300 Subject: [PATCH 04/10] fix: ignore bullshit folder --- .vscode/settings.json | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 2b8df765..00000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "workbench.colorCustomizations": { - "terminal.background": "#00000000", - "activityBar.background": "#0F3046", - "titleBar.activeBackground": "#164462", - "titleBar.activeForeground": "#F6FAFD", - "titleBar.inactiveBackground": "#0F3046", - "titleBar.inactiveForeground": "#F6FAFD", - "statusBar.background": "#0F3046", - "statusBar.foreground": "#F6FAFD", - "statusBar.debuggingBackground": "#0F3046", - "statusBar.debuggingForeground": "#F6FAFD", - "statusBar.noFolderBackground": "#0F3046", - "statusBar.noFolderForeground": "#F6FAFD" - } -} \ No newline at end of file From 77eb55616dc0601c4ac0c9349847bf45e4853d83 Mon Sep 17 00:00:00 2001 From: mathealgou Date: Sat, 31 Oct 2026 16:30:54 -0300 Subject: [PATCH 05/10] Trigger Build From 7a56969952a88f4b6a776fcbe35fd3efe128cf71 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 31 Oct 2026 19:31:55 +0000 Subject: [PATCH 06/10] Initial plan From 8040d07a0ca4033252e8be91ae12c41a62dec25e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 31 Oct 2026 19:33:31 +0000 Subject: [PATCH 07/10] Discover MSVC install in Windows workflow Co-authored-by: mathealgou <23152411+mathealgou@users.noreply.github.com> --- .github/workflows/nob.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nob.yaml b/.github/workflows/nob.yaml index 5b981a8b..6d686134 100644 --- a/.github/workflows/nob.yaml +++ b/.github/workflows/nob.yaml @@ -51,12 +51,12 @@ jobs: # https://github.com/actions/runner-images/issues/6205#issuecomment-1241573412 # https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170#create-your-own-command-prompt-shortcut run: | - call "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvars64.bat" + for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do call "%%i\VC\Auxiliary\Build\vcvars64.bat" cl.exe /Fenob nob.c - name: Run nob shell: cmd run: | - call "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvars64.bat" + for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do call "%%i\VC\Auxiliary\Build\vcvars64.bat" nob.exe config ${{ matrix.hotreload == true && 'hotreload' || '' }} nob.exe - name: Upload build folder From 9a969fbe045ee4e1af880a5d9cc8c2c7b0e6294f Mon Sep 17 00:00:00 2001 From: mathealgou Date: Sat, 31 Oct 2026 16:36:35 -0300 Subject: [PATCH 08/10] Trigger Build From a13943779a07b66106ed853702b29644cad5fa7f Mon Sep 17 00:00:00 2001 From: mathealgou Date: Sat, 31 Oct 2026 16:37:26 -0300 Subject: [PATCH 09/10] Trigger Build From d2c1ec8db10a3aab1074d6ecb484923e7ec77123 Mon Sep 17 00:00:00 2001 From: mathealgou Date: Sat, 31 Oct 2026 16:46:06 -0300 Subject: [PATCH 10/10] feat: github release release --- .github/workflows/nob.yaml | 62 +++++++++++++++++++++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nob.yaml b/.github/workflows/nob.yaml index 6d686134..f6cce683 100644 --- a/.github/workflows/nob.yaml +++ b/.github/workflows/nob.yaml @@ -1,5 +1,7 @@ name: no-build build -on: [push, pull_request] +on: + push: + pull_request: jobs: macos: @@ -16,6 +18,18 @@ jobs: with: name: macos-build-folder path: build/ + - name: Package release + if: github.ref == 'refs/heads/main' && github.event_name == 'push' + run: | + brew install imagemagick + ./nob dist + ditto -c -k --sequesterRsrc --keepParent build/Musializer.app musializer-macos.zip + - name: Upload release package + if: github.ref == 'refs/heads/main' && github.event_name == 'push' + uses: actions/upload-artifact@v4 + with: + name: release-macos + path: musializer-macos.zip ubuntu: strategy: matrix: @@ -35,6 +49,15 @@ jobs: with: name: ubuntu-${{ matrix.cc }}-build-folder path: build/ + - name: Package release + if: github.ref == 'refs/heads/main' && github.event_name == 'push' && matrix.cc == 'gcc' + run: ./nob dist + - name: Upload release package + if: github.ref == 'refs/heads/main' && github.event_name == 'push' && matrix.cc == 'gcc' + uses: actions/upload-artifact@v4 + with: + name: release-linux + path: musializer-linux-x86_64.tar.gz windows: name: windows (${{ matrix.hotreload == true && 'hotreload' || '' }}) runs-on: windows-latest @@ -64,3 +87,40 @@ jobs: with: name: windows-${{ matrix.hotreload == true && 'hotreload' || '' }}-build-folder path: build/ + # `nob dist` is not implemented for the MSVC target, so package by hand + - name: Package release + if: github.ref == 'refs/heads/main' && github.event_name == 'push' && matrix.hotreload == false + shell: pwsh + run: | + New-Item -ItemType Directory musializer-win64 + Copy-Item build/musializer.exe musializer-win64/ + Copy-Item -Recurse resources musializer-win64/resources + Copy-Item musializer-logged.bat musializer-win64/ + Compress-Archive -Path musializer-win64 -DestinationPath musializer-win64.zip + - name: Upload release package + if: github.ref == 'refs/heads/main' && github.event_name == 'push' && matrix.hotreload == false + uses: actions/upload-artifact@v4 + with: + name: release-windows + path: musializer-win64.zip + release: + if: github.ref == 'refs/heads/main' && github.event_name == 'push' + needs: [macos, ubuntu, windows] + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Download release packages + uses: actions/download-artifact@v4 + with: + pattern: release-* + path: dist + merge-multiple: true + - name: Create GitHub release + uses: softprops/action-gh-release@v2 + with: + # Creates the tag on the pushed commit if it doesn't exist yet + tag_name: v0.${{ github.run_number }} + target_commitish: ${{ github.sha }} + files: dist/* + generate_release_notes: true