{"id":32443514,"url":"https://github.com/sha5b/m5stack-dedenoise-mashine","last_synced_at":"2026-05-08T03:42:30.006Z","repository":{"id":320438024,"uuid":"1082106486","full_name":"sha5b/M5Stack-DeDeNoise-Mashine","owner":"sha5b","description":"A Noise Generator for M5Stack Fire","archived":false,"fork":false,"pushed_at":"2025-10-23T18:55:22.000Z","size":48589,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-23T20:45:54.850Z","etag":null,"topics":["arduino","eps32","m5stack","m5stack-fire","oscilloscope","platformio","sound","soundgenerator"],"latest_commit_sha":null,"homepage":"https://variable.gallery","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/sha5b.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-23T18:38:27.000Z","updated_at":"2025-10-23T19:03:06.000Z","dependencies_parsed_at":"2025-10-25T05:30:36.328Z","dependency_job_id":null,"html_url":"https://github.com/sha5b/M5Stack-DeDeNoise-Mashine","commit_stats":null,"previous_names":["sha5b/m5stack-dedenoise-mashine"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/sha5b/M5Stack-DeDeNoise-Mashine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sha5b%2FM5Stack-DeDeNoise-Mashine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sha5b%2FM5Stack-DeDeNoise-Mashine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sha5b%2FM5Stack-DeDeNoise-Mashine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sha5b%2FM5Stack-DeDeNoise-Mashine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sha5b","download_url":"https://codeload.github.com/sha5b/M5Stack-DeDeNoise-Mashine/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sha5b%2FM5Stack-DeDeNoise-Mashine/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281051335,"owners_count":26435741,"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","status":"online","status_checked_at":"2025-10-26T02:00:06.575Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["arduino","eps32","m5stack","m5stack-fire","oscilloscope","platformio","sound","soundgenerator"],"created_at":"2025-10-26T03:01:20.614Z","updated_at":"2026-05-08T03:42:29.999Z","avatar_url":"https://github.com/sha5b.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# M5Stack-Fire Noise Synth \u0026 Visualizer \n\nA handheld chaos machine that turns your M5Stack Fire into a pocket-sized noise lab, because silence is overrated and your neighbors had it too easy anyway.\n\n## Features\n- **46 sound modes**: White/Pink/Brown/Blue/Violet noises, classic waveforms, Shepard tones (up/down), FM/AM tricks, plucked strings, modal drums, granular, supersaw, PWM, ring-mod, chorus-ish, formants, sync, super-square, plus a grab bag of FX like bitcrush, phaser-ish comb, stutter/glitch, Doppler, gated reverb, aliasing buzz, etc. See `src/types.cpp` and `include/types.h`.\n- **Realtime oscilloscope**: Visualizes the actual DAC waveform in the rectangle region on-screen.\n- **Shuffle mode**: Auto-hops tracks on a timer so you can pretend it’s generative art and not button mashing.\n- **No-pop DAC handling**: Starts/stops the speaker more politely than your average Bluetooth speaker.\n\n## Demos\n- Short handheld clips of the app running on M5Stack Fire.\n\nNote: GitHub does not render inline videos in README. The demo files are in `static/`. Use these links to watch them:\n\n\n\n\u003cvideo src=\"static/video_2025-10-23_20-40-14.webm\" width=\"320\" height=\"240\" controls\u003e\u003c/video\u003e\n\u003cvideo src=\"static/video_2025-10-23_20-40-28.webm\" width=\"320\" height=\"240\" controls\u003e\u003c/video\u003e\n\n\n## Hardware\n- **Board**: M5Stack Fire (`board = m5stack-fire`)\n- **Audio**: On-board speaker via DAC1 `GPIO25` (`AUDIO_DAC_PIN = 25`)\n- **Display**: Built-in TFT, landscape rotation\n\nKey constants are in `include/config.h`:\n- **`SAMPLE_RATE_HZ = 11025`**\n- **`AUDIO_DAC_PIN = 25`**\n- **`TRACK_COUNT = 46`**\n- **Visual area**: `NOISE_W = 280`, `NOISE_H = 160`, positioned at `(NOISE_X, NOISE_Y)`\n- **Frame timing**: `FRAME_INTERVAL_MS = 67`\n- **Shuffle**: `SHUFFLE_INTERVAL_MS = 12000`\n\n## Build and Upload (PlatformIO)\n- Uses Arduino framework and `M5Stack` library.\n- Config: See `platformio.ini` (`[env:m5stack-fire]`, `platform = espressif32`, `framework = arduino`, `lib_deps = m5stack/M5Stack@^0.4.3`, `monitor_speed = 115200`).\n\nSteps:\n1. Install VS Code + PlatformIO.\n2. Connect the M5Stack Fire via USB. Select the correct serial port if needed.\n3. Open this folder (`m5stack-f25`) in VS Code.\n4. Build: PlatformIO: Build.\n5. Upload: PlatformIO: Upload.\n6. (Optional) Open Serial Monitor at 115200 baud to see logs.\n\n## Run/Controls\n- On boot, the app shows track info and a waveform area.\n- Buttons (printed on screen as a reminder):\n  - **A**: short press → previous track. Hold → volume down (repeats).\n  - **B**: short press → play/pause. Long press (~2s) → toggle Shuffle.\n  - **C**: short press → next track. Hold → volume up (repeats).\n- Current track name, shuffle state, and volume percent show in the header.\n\n## What you’re seeing/hearing\n- **Audio task**: `src/audio_synthesis.cpp` runs on core 1 and writes 8-bit samples to DAC at `SAMPLE_RATE_HZ`.\n- **Waveform**: `src/visual_rendering.cpp` reads a ring buffer (`VIS_RING_SIZE = 1024`) to draw the real output as an oscilloscope.\n- **Track mapping**: `src/types.cpp:getCurrentNoiseType()` indexes into `include/types.h:NoiseType` (total `TRACK_COUNT`). Display names: `getNoiseTypeName()`.\n- **Gain normalization**: `getGainForType()` balances perceived loudness per mode; master gain is adjustable via A/C holds.\n\n## Adding new sounds\n- Add a new enum to `include/types.h:NoiseType`.\n- Map it to a track index and name in `src/types.cpp` (`getCurrentNoiseType`, `getNoiseTypeName`, `getGainForType`).\n- Implement synthesis in `src/audio_synthesis.cpp` or extend `src/audio_extras.cpp`. If using extras, wire in via `isExtraType()` and `nextAudioSampleExtra()`.\n- The UI will automatically show your new mode when its track is selected.\n\n## Folder layout\n- **`src/`**: `main.cpp` (UI/input), `audio_synthesis.cpp` (audio), `visual_rendering.cpp` (oscilloscope), `types.cpp` (track map), `audio_extras.cpp` (additional generators).\n- **`include/`**: Headers (`config.h`, `types.h`, etc.).\n- **`platformio.ini`**: Build target and dependencies.\n\n## Troubleshooting\n- **No sound**: Ensure it’s a Fire (with speaker amp) and the device isn’t muted at OS level. Try volume holds (A to decrease, C to increase). Confirm DAC is `GPIO25`.\n- **Upload issues**: Select the correct COM port in PlatformIO. Press and hold the reset/boot combo on the M5 if necessary.\n- **Crackles at start/stop**: The code soft-lands the DAC, but tiny pops can happen. Let it settle a second after play/pause.\n- **LCD glitches**: Keep default rotation and let the app paint the oscilloscope. Frame pacing is ~15 FPS (`FRAME_INTERVAL_MS = 67`).\n\n## Safety notes (seriously)\n- Some modes get bright and/or piercing (e.g., near-Nyquist tones). Don’t crank it into headphones. Protect your hearing.\n- Infrasound and thump modes are for fun, not medical therapy.\n\n## License\nMIT License. See [LICENSE](./LICENSE) for full text.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsha5b%2Fm5stack-dedenoise-mashine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsha5b%2Fm5stack-dedenoise-mashine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsha5b%2Fm5stack-dedenoise-mashine/lists"}