This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
runner "Octave Per Channel and Porta" | |
# surge-headless: 0.99.test-portamento-in-31.c3bc32b5 built: 2021-11-22 11:43:06 | |
Created surge with "/usr/share/surge-xt/" & "/home/cale/Documents/Surge XT" | |
WT/Patch = 614 & 2280 | |
Filters: Octave Per Channel and Porta | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
surge-testrunner is a Catch v2.13.7 host application. | |
Run with -? for options |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local edo = 31 -- How many subdivisions of the octave? This is used to interpret MIDI note numbers on the input side. | |
local bendrange = 4 -- How many semitones is the full range of the pitch bender (e.g. 4 semitones if it goes from -2 to 2) | |
local diapason = 440 -- What frequency is middle A tuned to? | |
local inputA = 2*edo + 23 -- Which input midi note is A? | |
local log2 = math.log(2) | |
function round(x) | |
return math.ceil(x-0.5) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE DefaultSignatures #-} | |
{-# LANGUAGE FunctionalDependencies #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
import Control.Monad.Trans.Class | |
import qualified Control.Monad.Trans.State as State | |
import Control.Monad.Trans.Identity (IdentityT) | |
import Control.Monad.Trans.Reader (ReaderT) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE GADTs #-} | |
import Reflex | |
import Data.Dependent.Map (DMap) | |
import qualified Data.Dependent.Map as DMap | |
import Data.Dependent.Sum (DSum(..)) | |
import Data.GADT.Compare | |
import Data.Functor.Compose | |
import Data.Functor.Identity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Control.Exception.IOException where | |
import Control.Exception | |
import System.IO.Error | |
newtype AlreadyExists = AlreadyExists IOException | |
deriving (Eq, Show) | |
instance Exception AlreadyExists where | |
toException (AlreadyExists e) = toException e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings #-} | |
import Control.Concurrent | |
import qualified Data.ByteString as BS | |
import qualified Data.ByteString.Char8 as BSC | |
import qualified Crypto.Hash.SHA1 as SHA1 | |
import Data.Char | |
import Control.Monad | |
import Data.List.Split | |
import Control.Parallel.Strategies | |
import Control.Concurrent.Chan |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE TypeFamilies #-} | |
data Nat = Z | S Nat | |
deriving (Eq, Ord, Show) | |
data SBool (b :: Bool) where | |
SFalse :: SBool False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Data.Aeson | |
import Data.Aeson.Types | |
import Data.Aeson.Parser | |
import qualified Data.Vector as V | |
import Data.Vector (Vector, (!?)) | |
import Control.Monad | |
newtype MovieIds = MovieIds [Integer] | |
deriving Show |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Data.Array | |
data Tree a = Tip | Branch a (Tree a) (Tree a) | |
deriving (Eq, Ord, Show) | |
myTree :: Tree Integer | |
myTree = | |
let ts = listArray (0,5) | |
[ Branch 0 (ts ! 1) (ts ! 2) | |
, Branch 1 (ts ! 3) (ts ! 4) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Control.Monad.Writer | |
import Data.Monoid | |
import Data.Map (Map) | |
import qualified Data.Map as Map | |
import Data.List | |
import qualified Data.MemoCombinators as M | |
import Numeric | |
-- Hacky monad of probability distributions because I can't be bothered finding a package | |
type Prob a = WriterT (Product Rational) [] a |
NewerOlder