com.sonosthesia.envelope
v1.12.0
Published
Sonosthesia unity envelope
Downloads
104
Readme
com.sonosthesia.envelope
Envelope primitives and utilities for the Sonosthesia framework. Provides reusable envelope implementations (ADSR and variants, animation-curve, constant), runtime factories, and editor tooling so audio/visual affordances can stay in sync with timing and easing data.
Envelope primitives
IEnvelopeexposes duration, initial/final values, and anEvaluate(time)API for any time-based curve you want to drive. IEnvelope.csEnvelopePhasecouples anEaseTypewith a duration; phased envelopes compose phases into A, AHR, ADSR, ADS, and SR shapes for common attack/decay workflows. PhasedEnvelope.cs- Additional implementations cover Unity animation curves, constant values, and
WarpedEnvelopeto scale time and amplitude without rewriting the source envelope. AnimationCurveEnvelope.cs ConstantEnvelope.cs WarpedEnvelope.cs
Configuration and factories
EnvelopeSettingsselects an envelope type (phased, curve, constant, or custom factory), exposes helpers to build ADSR/AHR/ADS/SR presets, and includes an extension that constructs the runtime envelope on demand. EnvelopeSettings.csEnvelopeFactoryis aScriptableObjectwrapper aroundEnvelopeSettingsso scenes and prefabs can instantiate envelopes at runtime; legacyEnvelopeBuildercomponents remain for backward compatibility. EnvelopeFactory.cs EnvelopeBuilder.cs
Editor tooling
- Custom property drawers render envelope settings with context-aware visibility and compact phase editors, keeping inspector layouts tidy when switching between phased/curve/constant/custom modes. EnvelopeSettingsDrawer.cs EnvelopePhaseDrawer.cs
Usage in dependent packages
com.sonosthesia.interactionusesEnvelopeSettingsfor interactive envelopes and triggers, warping attack/release timing per interaction and optionally filtering via One Euro smoothing. IInteractiveEnvelopeSettings.cs IInteractiveTriggerSettings.cscom.sonosthesia.triggerbuilds trigger playback envelopes from extracted values (attack/sustain/release) before driving signal-based trigger controllers. SignalTriggerConfiguration.cscom.sonosthesia.fmodinteractionfeeds interactive envelopes into FMOD emitter configurations so volume/excitation/body parameters follow event-driven curves rather than static values. FMODEmitterConfiguration.cscom.sonosthesia.deforminteractionandcom.sonosthesia.collideextend the interactive envelope settings to modulate mesh noise, falloff, and collision responses with ADSR-style curves per event type. MeshNoiseConfiguration.cs CollidePeakConfiguration.cs
