{"id":21152170,"url":"https://github.com/deckarep/zigualizer","last_synced_at":"2025-05-07T04:06:39.706Z","repository":{"id":263313436,"uuid":"889744582","full_name":"deckarep/zigualizer","owner":"deckarep","description":"Zigualizer: A music visualizer built with Zig, powered by the FFT algorithm.","archived":false,"fork":false,"pushed_at":"2024-11-19T22:12:41.000Z","size":9397,"stargazers_count":29,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-07T04:06:32.903Z","etag":null,"topics":["fft","music","raylib","spectrum-analyzer","visualizer","zig","zig-package","ziglang"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deckarep.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-17T05:34:00.000Z","updated_at":"2025-04-03T15:55:29.000Z","dependencies_parsed_at":"2024-11-17T20:17:51.361Z","dependency_job_id":"31c9f7ee-b3b0-4866-9394-649924ffba3c","html_url":"https://github.com/deckarep/zigualizer","commit_stats":null,"previous_names":["deckarep/zigualizer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deckarep%2Fzigualizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deckarep%2Fzigualizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deckarep%2Fzigualizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deckarep%2Fzigualizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deckarep","download_url":"https://codeload.github.com/deckarep/zigualizer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252810273,"owners_count":21807759,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fft","music","raylib","spectrum-analyzer","visualizer","zig","zig-package","ziglang"],"created_at":"2024-11-20T10:35:49.181Z","updated_at":"2025-05-07T04:06:39.682Z","avatar_url":"https://github.com/deckarep.png","language":"C","readme":"# zigualizer\nZigualizer: A music visualizer built with Zig, powered by the FFT algorithm.\n[Click here](https://youtu.be/6h9Bty-wdMA) for a demo on YouTube!\n\n![](screenshot.png)\n\n## Details\nThis implementation was originally based on the [Musializer project by @Tsoding](https://github.com/tsoding/musializer/blob/master/src/plug.c).\nThis version as it stands has been tested to work with Raylib 5.0.\nI have modified this version to be backed by a generic circular buffer over a \nfixed size array. Additionally, I am leveraging comptime in a few spots to\ngenerate some static windowing functions.\n\n## Raylib integration\nFor a more thorough example see raylib.zig in the examples/ folder.\nIntegration is a 4-step process (aside from music stream code).\n\n```zig\n// 1. Import\nconst fft = @import(\"zigualizer\");\n\n// 2. Init\nfft.FFT_Analyzer.reset();\n\n// After loading up a Raylib Music stream.\ntrack = c.LoadMusicStream(pathToTrack);\ndefer c.UnloadMusicStream(track);\n\n// 3. Attach\nc.AttachAudioStreamProcessor(track.stream, fft.FFT_Analyzer.fft_process_callback);\nc.PlayMusicStream(track);\n\n// In your update loop\nfn update() void {\n    c.UpdateMusicStream(track);\n    // 4. Analyze\n    frames = fft.FFT_Analyzer.analyze(c.GetFrameTime());\n}\n\n// In your draw loop render the FFT however you like!\nfn draw() void {\n    c.BeginDrawing();\n    defer c.EndDrawing();\n    c.ClearBackground(c.BLACK);\n    \n    // 5. Draw\n    renderFFT(400, 200);\n}\n```\n\n## Building the examples\n```sh\n# Run the Raylib demo.\nzig build -Dexample-name=raylib.zig \u0026\u0026 zig-out/example/raylib\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeckarep%2Fzigualizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeckarep%2Fzigualizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeckarep%2Fzigualizer/lists"}