Karya, built on 2022-03-21T01:30:44 (patch 89d1651424c35e564138d93424a157ff87457245)
Safe HaskellSafe-Inferred

Synth.Shared.Thru

Description

This has the protocol to talk to a running play_cache and tell it to play samples in realtime. This is for the audio preview aka "MIDI thru" feature for im. Since each im patch may respond in its own way to a Note, this relies on the patch itself exporting a ThruFunction to find the appropriate sample.

This used to use OSC, but it turned out OSC wasn't really getting me anything, and its restrictions were troublesome, so now it's a custom format as emitted by serialize.

Synopsis

Documentation

type ThruFunction = [Note] -> Either Error Message Source #

This is a specialized version of ThruFunction. Being more specialized means I don't have to directly depend on Cmd.Cmd from here.

data Note Source #

Instances

Instances details
Show Note Source # 
Instance details

Defined in Synth.Shared.Thru

Methods

showsPrec :: Int -> Note -> ShowS #

show :: Note -> String #

showList :: [Note] -> ShowS #

data Message Source #

Constructors

Plays [Play] 
Stop 

Instances

Instances details
Show Message Source # 
Instance details

Defined in Synth.Shared.Thru

data Play Source #

Constructors

Play 

Fields

Instances

Instances details
Show Play Source # 
Instance details

Defined in Synth.Shared.Thru

Methods

showsPrec :: Int -> Play -> ShowS #

show :: Play -> String #

showList :: [Play] -> ShowS #

Eq Play Source # 
Instance details

Defined in Synth.Shared.Thru

Methods

(==) :: Play -> Play -> Bool #

(/=) :: Play -> Play -> Bool #