Expand description
§garjan — Environmental and Nature Sound Synthesis
garjan (Sanskrit: roar / thunder) provides procedural synthesis of environmental and nature sounds: weather, impacts, surfaces, fluids, fire, and ambient textures. All sounds are generated from physical models — no samples, no assets, pure math.
§Architecture
Environment (weather, terrain, materials)
|
v
Source Generators ─────────────────── Output
Weather: rain, thunder, wind (samples)
Impact: footsteps, crashes, cracks
Surface: rustling, scraping, rolling
Fluid: water flow, drips, splashes
Fire: crackle, roar, hiss
Ambient: room tone, forest, city§Key Concepts
- Source: A physical sound generator (rain drop, thunder bolt, wind gust)
- Material: Surface properties affecting impact/contact sounds (wood, metal, stone, earth)
- Weather: Atmospheric conditions driving weather sounds (rain intensity, wind speed, storm distance)
- Texture: Continuous ambient sound layer (forest background, city hum, ocean surf)
§Quick Start
use garjan::prelude::*;
// Synthesize a thunderclap 2km away
let mut thunder = Thunder::new(2000.0, 44100.0).unwrap();
let samples = thunder.synthesize(3.0).unwrap();
// Generate rain at medium intensity
let mut rain = Rain::new(RainIntensity::Moderate, 44100.0).unwrap();
let samples = rain.synthesize(5.0).unwrap();§Feature Flags
| Feature | Default | Description |
|---|---|---|
std | Yes | Standard library support. Disable for no_std + alloc |
naad-backend | Yes | Use naad crate for oscillators and filters |
logging | No | Structured tracing via the tracing crate |
Modules§
- aero
- Shared types for aerodynamic sound synthesis.
- bridge
- Science crate bridges — convert physical simulation outputs to garjan parameters.
- bubble
- Bubble synthesis: underwater, boiling, viscous, pouring.
- builder
- Builder pattern constructors for synthesizers with complex configuration.
- cloth
- Cloth flapping synthesis: flags, capes, sails, tarps.
- contact
- Shared types for contact and surface sound synthesis.
- creak
- Creak synthesis: doors, hinges, rope, wood stress.
- creature
- Shared types for creature and fluid sound synthesis.
- error
- Error types for the garjan crate.
- fire
- Fire sound synthesis: crackle, roar, hiss.
- foliage
- Foliage synthesis: leaf rustle, grass swish, branch snap.
- footstep
- Footstep synthesis: terrain-aware step sequences.
- friction
- Friction synthesis: scraping, sliding, grinding.
- impact
- Impact and contact sound synthesis.
- insect
- Insect sound synthesis: wing buzz, chirping, cicada drone.
- integration
- Integration APIs for downstream consumers (soorat rendering). Integration APIs for downstream consumers.
- lod
- Level of Detail (LOD) for synthesis quality scaling.
- material
- Surface material properties affecting impact and contact sounds.
- modal
- Modal synthesis engine: bank of damped complex resonators.
- precipitation
- Extended precipitation synthesis: hail, snow, surface-dependent rain.
- prelude
- Convenience re-exports for common usage.
- rolling
- Rolling synthesis: ball, wheel, boulder, barrel on surfaces.
- surf
- Surf zone synthesis: breaking waves with approach, crash, and wash phases.
- texture
- Ambient texture synthesis: continuous environmental backgrounds.
- underwater
- Underwater ambience synthesis.
- voice
- Voice management: priority-based polyphony with voice stealing.
- water
- Water sound synthesis: streams, drips, splashes, waves.
- weather
- Weather sound synthesis: rain, thunder, wind.
- whistle
- Wind whistle synthesis: air through gaps, pipes, bottles, wires.
- whoosh
- Whoosh synthesis: object pass-by and swing sounds.
- wingflap
- Bird wing flap synthesis: aerodynamic displacement sounds.