WAGS.Control.Types
- Package
- purescript-wags
- Repository
- mikesol/purescript-wags
#FrameT Source
newtype FrameT (env :: Type) (audio :: Type) (engine :: Type) (proof :: Type) (m :: Type -> Type) (res :: Type) (iu :: Universe) (ou :: Universe) (a :: Type)Represents a single frame of an audio scene. Conceptually, this is a snapshot in time of audio.
env: The outside environment influencing audio. Contains things like mouse clicks, the current time, and MIDI events.audio: The audio context. This isUnitwhen testing andFFIAudiowhen rendering actual audio.engine: The type output by the audio rendering engine. This isInstructionwhen testing andEffect Unitwhen rendering actual audio.proof: A proof term representing the current moment in time.proofis a type-safe way to make sure that a frame at timenis not composed (ie via bind) with a frame at timen + 1.m: The underlying monad in which the information of the frame lies. Usually this isThunkablebut can also beIdentityorAffdepending on your use case.res: A monoid containing a residual from the audio computation. Use this if you need to pass computations from an audio graph to downstream consumers. In general, it is best if computations happen before audio graph rendering, so it's best to useresonly in cases where a computation is dependent on values that can only be calculated in the audio-graph, ie scheduling based on the audio clock.iu: The inputUniverse, meaning the state of the frame before a computation.ou: The outputUniverse, meaning the state of the frame after a computation.a: The term within the frame. This is often some form of accumulator that represents an evolving state over time.
NB:
FrameTdoes not implementIxApplicativebecause we never want to be able to pull aproofterm out of thin air. It does, however, have abindoperation inWAGS.Control.Qualifiedthat can is used for rebindabledonotation in all of the tests and examples.
Instances
#AudioState Source
type AudioState env audio engine proof m res a = (MemoizedStateT proof (AudioState' env audio engine res) m) aType used for the internal representation of the current audio state.
#InitialUniverse Source
type InitialUniverse = UniverseC D0 InitialGraph Z SkolemListNilThe Universe at which any scene starts.
#InitialFrameT Source
type InitialFrameT env audio engine m res a = FrameT env audio engine Frame0 m res InitialUniverse InitialUniverse aThe FrameT at which any scene starts.
#InitialFrame Source
type InitialFrame env audio engine a = Frame env audio engine Frame0 InitialUniverse InitialUniverse aThe Frame at which any scene starts.
#Universe' Source
type Universe' currentIndex graph cb = UniverseC currentIndex graph cb SkolemListNilA type constructor for a graph with no changes and no skolems
#oneFrameT' Source
oneFrameT' :: forall env audio engine proofA m res. Monad m => SceneT env audio engine proofA m res -> env -> (forall proofB. m ((Map Int AnAudioUnit) /\ (Map Int (Set Int)) /\ (Array (audio -> engine)) /\ res /\ (SceneT env audio engine proofB m res)))This represents the output of oneFrameT as a tuple instead of a record.
#unsafeUnframe Source
unsafeUnframe :: forall env audio engine proof m res iu ou a. FrameT env audio engine proof m res iu ou a -> AudioState env audio engine proof m res a"For office use only" way to access the innards of a frame. Obliterates type safety. Use at your own risk.
#unsafeFrame Source
unsafeFrame :: forall env audio engine proof m res iu ou a. AudioState env audio engine proof m res a -> FrameT env audio engine proof m res iu ou a"For office use only" way to construct a frame. Obliterates type safety. Use at your own risk.
- Modules
- FRP.
Event. MIDI - WAGS.
Change - WAGS.
Connect - WAGS.
Control. Functions - WAGS.
Control. MemoizedState - WAGS.
Control. Qualified - WAGS.
Control. Thunkable - WAGS.
Control. Types - WAGS.
Create - WAGS.
Cursor - WAGS.
Debug - WAGS.
Destroy - WAGS.
Disconnect - WAGS.
Graph. Constructors - WAGS.
Graph. Decorators - WAGS.
Graph. Getter - WAGS.
Graph. Optionals - WAGS.
Graph. Parameter - WAGS.
Interpret - WAGS.
Move - WAGS.
MoveNode - WAGS.
Rebase - WAGS.
Rendered - WAGS.
Run - WAGS.
Universe. AudioUnit - WAGS.
Universe. Bin - WAGS.
Universe. BinN - WAGS.
Universe. EdgeProfile - WAGS.
Universe. Graph - WAGS.
Universe. Node - WAGS.
Universe. Skolems - WAGS.
Universe. Universe - WAGS.
Util - WAGS.
Validation