[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-114927":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":13,"contributorsCount":13,"subscribersCount":13,"size":13,"stars1d":14,"stars7d":15,"stars30d":15,"stars90d":13,"forks30d":13,"starsTrendScore":16,"compositeScore":17,"rankGlobal":10,"rankLanguage":10,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":10,"pushedAt":30,"updatedAt":31,"readmeContent":32,"aiSummary":33,"trendingCount":13,"starSnapshotCount":13,"syncStatus":34,"lastSyncTime":35,"discoverSource":36},114927,"RainGen-RainGenerator","AhmadHassan-BTed\u002FRainGen-RainGenerator","AhmadHassan-BTed","This repository will be used to develop a rain generator, actually it use white noises to simulate wind and have an integrated thunderstorm simulator.","",null,"Python",1618,0,1,13,6,57.8,"MIT License",false,"main",true,[23,24,25,26,27,28,29],"asmr","audio-generator","rain-generator","rain-maker","rainfall","thunderbolt","thunderstorm","2026-11-17 22:06:30","2026-11-23 17:53:14","# RainGeneratorPy · raingen\n\n**Weather you can direct.**\n\nDescribe the weather the way you would experience it (heavy rain, a gusty westerly, a storm 3 km away, you're in a tent) and get endless, never-repeating, studio-grade sound that you fully own: as a file, as separate stems, as surround or ambisonics, or live.\n\n`raingen` is a physics-driven weather and environment sound engine. Rain is built from drop-size distributions striking real materials, wind is heard through the trees, wires and gaps it excites, thunder comes from a lightning-shaped source that is heard at the speed of sound for the air temperature, and shelters, rooms and the aftermath (drips, gutters, wet ground) change everything the way they do outside. Every render is a pure function of **scene + seed + engine version**, so a 10-hour storm can be shared as a 400-byte scene file and reproduced exactly.\n\n- **Website with a live in-browser demo:** \u003Chttps:\u002F\u002Fahmadhassan-bted.github.io\u002FRainGen-RainGenerator\u002F>\n- **4D Environment Composer:** \u003Chttps:\u002F\u002Fahmadhassan-bted.github.io\u002FRainGen-RainGenerator\u002Fstudio\u002F>\n- **The plan, the science and the roadmap:** [docs\u002FMASTER_PLAN.md](docs\u002FMASTER_PLAN.md)\n\n> **Project status: alpha.** This repository holds the Python reference implementation of the engine (`raingen\u002F`) and the classic pygame simulator (`rain_generator\u002F`). The engine is new prototype code: treat its sound and numbers as unverified until the Phase 0\u002F1 tests and listening checks in the plan are done. A Rust real-time core, DAW\u002Fgame plugins and native apps are on the roadmap, not in this repository yet.\n\n---\n\n## Quick start\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FAhmadHassan-BTed\u002FRainGen-RainGenerator.git\ncd RainGen-RainGenerator\npip install -e \".[audio]\"          # numpy + scipy, plus sounddevice\u002Fsoundfile for playback and FLAC\n\nraingen render \"rain on a tin roof, wind 30 km\u002Fh from the west, distant thunder\" --minutes 2 --out cabin.wav\nraingen play tent-in-a-storm       # real time; Ctrl+C stops\nraingen presets --tag sleep\n```\n\nPython 3.10+ is required. The core needs only NumPy and SciPy; everything else is an optional extra:\n\n| Extra | Installs | For |\n|---|---|---|\n| `audio` | sounddevice, soundfile | real-time playback, FLAC export |\n| `yaml` | pyyaml | `.yaml` scene files |\n| `osc` | python-osc | OSC control of the live engine |\n| `sofa` | h5py | your own HRTFs from SOFA (AES69) files |\n| `app` | pygame | the classic visual simulator |\n| `native` | raingen-native | the Rust core: every generator live, on all cores, with its own audio output |\n| `all` | everything above except `native` | |\n\nNative core: `pip install \"rain-generator[native]\"` (prebuilt abi3 wheels for Linux, Windows and macOS).\nFrom source (Rust toolchain): `pip install maturin && cd native && maturin develop --release`.\nIt is used automatically when installed; `RAINGEN_NATIVE=0` (or `native=False`) selects the Python generators.\n\n## Python API\n\n```python\nimport raingen as rg\n\n# Plain words -> file (streams to disk, any length). Returns a report dict with a readable str().\nreport = rg.render(\"heavy rain on a tent, gusty, thunder 3 km to the north-west\",\n                   minutes=60, out=\"tent.flac\", destination=\"youtube\")\nprint(report)          # path, integrated LUFS, true peak, markers, what the parser understood\n\n# Presets and human units\nscene = rg.preset(\"tent-in-a-storm\")\nscene.weather.precipitation.rate_mm_h = 8          # mm\u002Fh\nscene.weather.wind.speed_mps = rg.beaufort(5)      # force 5, fresh breeze\nscene.weather.wind.from_deg = 270                  # meteorological \"from\", degrees true\nscene.weather.thunder.distance_km = 3              # about 8.7 s flash-to-bang at 20 °C\nprint(scene.describe())                            # \"What am I hearing?\"\nscene.save(\"my_tent.json\")\n\n# Render, with stems (UCS names), captions and timecode\nscene.render(minutes=10, out=\"tent_stems\u002F\", stems=True, captions=True,\n             destination=\"post_stems\", layout=\"5.1\", start_tc=\"01:00:00:00\")\n\n# Variations for a sound library or a game: derived seeds + small realistic jitter\nfor v in scene.variations(20):\n    v.render(seconds=90, out=\"library\u002F\")\n\n# Real time (reduced level of detail); set() is thread-safe and glides like the real thing\nwith rg.Engine(scene, layout=\"binaural\") as eng:\n    eng.set(\"weather.wind.speed_mps\", \"force 7\", ramp=2.0)\n    eng.set(\"place.shelter\", \"car\")                 # structural changes crossfade\n    eng.run(seconds=30)\n\n# Weather from elsewhere\nrg.scene_from_metar(\"KJFK 121755Z 21016G24KT 1SM +TSRA BR BKN015CB 18\u002F17 A2990\")\nrg.scene_from_live(\"Bergen, Norway\")               # Open-Meteo; coordinates rounded to 0.1°\n```\n\nAnything that names a scene accepts a `Scene`, a `.json`\u002F`.yaml` scene file, a preset name, a METAR report or plain words.\n\n## Command line\n\n| Command | What it does |\n|---|---|\n| `raingen render WHAT --minutes 10 --out x.flac --destination youtube` | Render to WAV\u002FBWF (RF64 above 4 GB) or FLAC; `--stems`, `--captions [srt vtt csv edl]`, `--layout`, `--seed`, `--mode`, `--timecode` |\n| `raingen variations WHAT --count 20 --out-dir lib\u002F` | N derived variations, UCS-named (`--scenes-only` writes scene files) |\n| `raingen presets [--tag sleep] [-v]` | List the scene presets |\n| `raingen metar \"RAW\" [--minutes 5 --out x.wav \\| --play]` | Scene from a METAR: print, render or play |\n| `raingen live --place NAME \\| --lat X --lon Y \\| --station ICAO [--play \\| --out x.wav]` | Scene from the current weather |\n| `raingen play WHAT [--layout binaural] [--osc 9000]` | Real-time playback, events printed as captions |\n| `raingen scene WHAT [--out scene.json] [--describe]` | Convert text \u002F preset \u002F METAR to a scene file |\n| `raingen manifest --format json-schema\\|osc\\|wwise\\|fmod\\|markdown\\|json` | Export the parameter manifest |\n| `raingen lint-claims FILE...` | Check copy for health claims (exit 1 on errors) |\n| `raingen destinations` | Loudness targets per delivery destination |\n\n`python -m raingen ...` works too. Several words need no quotes: `raingen render heavy rain on a car roof --minutes 5`.\n\n## Controls: one set of parameters, four tiers\n\nEvery parameter has one canonical id, a human unit, a range, a smoothing time and an OSC address, all generated from one manifest (`raingen manifest`).\n\n| Tier | Who it is for | Parameters |\n|---|---|---|\n| 0 · Vibe | Everyone | `vibe.intensity`, `vibe.closeness`, `vibe.wildness`, volume, sleep timer, `mode` (sleep, focus, relax, ASMR) |\n| 1 · Weather | Listeners and creators | precipitation type, amount (mm\u002Fh), drop character, showers, hail size; wind speed (Beaufort), direction, gusts; thunder distance, bearing, approach, flash rate; temperature, humidity, pressure, time of day, storm arc |\n| 2 · Place & Listener | Sound designers | place, shelter (open, tree, umbrella, tent, porch, car, room, attic, cave, underpass), surfaces, vegetation, ground, biophony region, traffic, window opening; listener height, heading, position, output layout |\n| 3 · Engineer | Studios and researchers | drop-size distribution (μ, Dm, Nw, size limits), water quality, turbulence, integral time, stroke energy, cloud-to-ground share, roughness length, latitude, HRTF, destination, stems |\n\nHigher tiers never fight lower ones: each parameter is Auto, Offset (\"real weather, but cozier\") or Pinned, and automation lanes win over both.\n\n## Presets\n\n| Preset | Title |\n|---|---|\n| `steady-rain-leaves-night` | Steady rain on leaves, night (default) |\n| `tin-roof-cabin-storm` | Tin-roof cabin in a storm |\n| `tent-in-a-storm` | Tent in a storm |\n| `car-in-a-thunderstorm` | Car in a thunderstorm |\n| `umbrella-city-street` | Umbrella on a city street |\n| `porch-summer-thunderstorm` | Porch, summer thunderstorm |\n| `tokyo-night-alley` | Tokyo night alley |\n| `tropical-monsoon-veranda` | Tropical monsoon veranda |\n| `scottish-highland-drizzle` | Scottish highland drizzle |\n| `conifer-forest-gale` | Conifer forest in a gale |\n| `desert-flash-storm` | Desert flash storm |\n| `coastal-squall` | Coastal squall |\n| `attic-tin-roof` | Attic under a tin roof |\n| `window-rain-bedroom` | Rain on the bedroom window (Sleep mode) |\n| `focus-steady-roof` | Focus: steady rain on the roof |\n| `asmr-umbrella-close` | ASMR: umbrella, close |\n| `after-the-storm-drips` | After the storm: drips |\n| `first-fat-drops` | First fat drops |\n| `hailstorm-car` | Hailstorm on a car |\n| `sleet-city` | Sleet in the city |\n| `snow-hush-forest` | Snow hush in the forest |\n| `freezing-rain-ice` | Freezing rain and ice |\n| `wind-only-ridge` | Wind on the ridge |\n| `cricket-warm-night-rain` | Crickets and warm night rain |\n| `lake-rain-plinks` | Rain on a still lake |\n| `farm-barn-downpour` | Barn door downpour |\n| `underpass-shelter` | Under the underpass |\n| `jungle-dawn-rain` | Jungle dawn rain |\n\nPresets carry tags in four families (`weather:`, `place:`, `mood:`, `use:`); filter with `raingen presets --tag film`.\n\n## Delivery destinations\n\n| Destination | Integrated loudness | True peak | Notes |\n|---|---|---|---|\n| `raw` | not normalised | (safety limit −0.3 dBTP for integer PCM) | calibrated engine level, 1.0 = 94 dB SPL |\n| `youtube` | −14 LUFS | −1 dBTP | YouTube's figure is unofficial |\n| `spotify` | −14 LUFS | −1 dBTP | FLAC |\n| `apple_music` | −16 LUFS | −1 dBTP | unofficial |\n| `podcast` | −16 LKFS | −1 dBTP | Apple Podcasts |\n| `sleep` | −27 LUFS | −1 dBTP | quiet bed, small loudness range |\n| `broadcast_eu` | −23 LUFS | −1 dBTP | EBU R128, BWF with bext loudness |\n| `streaming_broadcaster` | −18 LUFS | −1 dBTP | EBU R128 s2 |\n| `broadcast_us` | −24 LKFS | −2 dBTP | ATSC A\u002F85 |\n| `post_stems` | not normalised | −2 dBTP | film\u002FTV stems keep calibrated relative levels |\n| `game` | not normalised | −1 dBTP | for middleware mixing |\n| `vr` | not normalised | −1 dBTP | first-order AmbiX (W, Y, Z, X) |\n\nNormalisation is two-pass without temporary files: the render is deterministic, so pass 1 only measures integrated loudness (ITU-R BS.1770-5) and pass 2 renders again with the exact gain, followed by an 8× oversampled true-peak limiter and TPDF dither. Output layouts: `stereo`, `binaural`, `5.1`, `7.1`, `7.1.4`, `foa`, `hoa3`, `mono`.\n\n## Architecture\n\n```\nScene (human units, JSON\u002FYAML)  + timeline automation + Auto\u002FOffset\u002FPinned overrides\n  → World.step()          drop-size distribution, five acoustic drop classes, Kaimal gusts,\n                          storm cells and arcs, wetness\u002Fpuddle\u002Fcanopy stores, day\u002Fnight, stability\n  → Generators            rain patches (modal + granular level of detail), diffuse bed, drips,\n                          gutters, hail, snow, wind, vegetation, aeolian tones, thunder,\n                          biophony, traffic, car wipers\n  → Encoder               3rd-order ambisonics (AmbiX) bus per stem, spread and decorrelation\n  → Shelter + room        envelope transmission loss (mass law + leaks), SH-domain FDN reverb\n  → Decoder               stereo · binaural (HRTF) · 5.1 · 7.1.4 (AllRAD) · FOA\u002FHOA · mono\n  → Master                Keep-it-soothing governor (wellness modes) · gain · true-peak limiter\n  → Writers               streaming BWF\u002FRF64 with bext + iXML (scene, seed, engine version), FLAC,\n                          UCS file names, SRT\u002FVTT\u002FCSV\u002FEDL captions and cue sheets\n```\n\n| Package | Contents |\n|---|---|\n| `raingen.core` | constants, counter-based random streams (Philox keyed by layer name), shared data types |\n| `raingen.scene` | scene schema, units, parameter manifest, parameter graph, vibe macros, presets, text and METAR parsers, timeline |\n| `raingen.physics` | drop-size distributions and fall speeds, ISO 9613-1 air absorption, ground and refraction, wind and gusts, wetness and drips, storm system, world, layout |\n| `raingen.synth` | materials, kernels (impact, bubble, modal), event processes, rain, wind, vegetation, aeolian, thunder, biophony, places and shelters |\n| `raingen.spatial` | spherical harmonics, encoder, decoders, built-in spherical-head HRTF and SOFA loading |\n| `raingen.master` | BS.1770-5 loudness meter, true-peak limiter, dither, destinations |\n| `raingen.io` | streaming WAV\u002FRF64\u002FFLAC writers, UCS naming, captions |\n| `raingen.live`, `raingen.control`, `raingen.wellness` | live weather providers, OSC, wellness modes, dose meter, claims linter |\n| `raingen.render`, `raingen.engine`, `raingen.api`, `raingen.cli` | offline renderer, real-time engine, public API, command line |\n| `site\u002F` | the website: landing page, browser engine and 4D Composer (JavaScript \u002F Web Audio), published to GitHub Pages |\n\nAll randomness comes from `RngFactory.get(layer, block)`, so adding a sound layer never changes any other layer, and the same scene and seed render the same audio on the same build.\n\n## The classic simulator (v2)\n\nThe original pygame visual simulator still works and now renders its audio exports through raingen:\n\n```bash\npip install -e \".[app,audio]\"\npython -m rain_generator --preset thunderstorm --fullscreen\npython thunderstorm_simulator.py --duration 120 --export storm.wav --preset thunderstorm\n```\n\nPresets `drizzle`, `steady`, `thunderstorm`, `gale` and `cozy` map onto raingen presets. Keys: `F`\u002F`F11` fullscreen, `Space` pause, `M` mute, `G` audio export, `H` HUD, `L` lightning, `1`–`5` presets, `S`\u002F`Tab` mixer, `?` help, `Esc` close\u002Fexit.\n\n## Wellness, honestly\n\nSleep, Focus, Relax and ASMR modes shape the sound with a \"Keep it soothing\" governor (no sudden loud events, a darker tilt, gentle timers). They are made to help you relax, focus and keep a bedtime routine. raingen makes no health claims, and the repository ships a claims linter (`raingen lint-claims`) that keeps its copy that way.\n\n## Licence\n\nMIT. See [LICENSE](LICENSE).\n","RainGen 是一个基于物理建模的环境音效生成引擎，用于合成高保真、可复现的雨声、风声与雷暴声景。它通过模拟雨滴尺寸分布撞击真实材质、风流经缝隙与植被的湍流噪声、以及符合声速传播规律的闪电声源，支持场景描述驱动（如“帐篷中暴雨”）、多声道\u002F全景声输出、分轨渲染及实时播放。所有音频均由场景参数、随机种子和引擎版本唯一确定，确保可重现性。适用于ASMR创作、游戏音效设计、影视后期拟音、冥想\u002F助眠内容制作及环境声学研究等需要可控、无版权风险自然声的场景。",2,"2026-11-24 04:49:46","CREATED_QUERY"]