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

Ness.Guitar

Synopsis

Documentation

Instrument

data String Source #

string_def (array) defines the parameters for each string of the guitar. This is a 2-dimensional array with a row for each string. Each row contains 7 items: length in metres, Young’s modulus, tension, radius, density, T60 at 0Hz, T60 at 1000Hz.

Constructors

String 

Fields

Instances

Instances details
Show String Source # 
Instance details

Defined in Ness.Guitar

Eq String Source # 
Instance details

Defined in Ness.Guitar

Methods

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

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

Ord String Source # 
Instance details

Defined in Ness.Guitar

data Material Source #

Constructors

Material 

Fields

Instances

Instances details
Show Material Source # 
Instance details

Defined in Ness.Guitar

Eq Material Source # 
Instance details

Defined in Ness.Guitar

Ord Material Source # 
Instance details

Defined in Ness.Guitar

data Output Source #

output_def (array) defines the locations of the outputs. This is a 2-dimensional array with a row for each output. Each row contains 2 items: the index of the string from which the output should be taken (1-based), and the distance along the string (normalised to the range 0-1).

Constructors

Output 

Fields

Instances

Instances details
Show Output Source # 
Instance details

Defined in Ness.Guitar

Eq Output Source # 
Instance details

Defined in Ness.Guitar

Methods

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

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

Ord Output Source # 
Instance details

Defined in Ness.Guitar

data Backboard Source #

backboard (array) defines the shape of the backboard. This is a 3 element array; the elements (which should be negative) define a quadratic function describing the shape of the backboard.

Where x is length: a + bx + bx^2 All should be negative or zero (i.e., the backboard is under the strings). E.g. -0.001 -0.000 -0.0002

Constructors

Backboard 

Fields

Instances

Instances details
Show Backboard Source # 
Instance details

Defined in Ness.Guitar

Eq Backboard Source # 
Instance details

Defined in Ness.Guitar

Ord Backboard Source # 
Instance details

Defined in Ness.Guitar

data Fret Source #

Constructors

Fret 

Instances

Instances details
Show Fret Source # 
Instance details

Defined in Ness.Guitar

Methods

showsPrec :: Int -> Fret -> ShowS #

show :: Fret -> String #

showList :: [Fret] -> ShowS #

Eq Fret Source # 
Instance details

Defined in Ness.Guitar

Methods

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

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

Ord Fret Source # 
Instance details

Defined in Ness.Guitar

Methods

compare :: Fret -> Fret -> Ordering #

(<) :: Fret -> Fret -> Bool #

(<=) :: Fret -> Fret -> Bool #

(>) :: Fret -> Fret -> Bool #

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

max :: Fret -> Fret -> Fret #

min :: Fret -> Fret -> Fret #

data Barrier Source #

barrier_params_def (array) specifies 5 basic parameters for the barrier (fret and backboard) collisions. The parameters are: K, alpha, beta, number of iterations for Newton solver, and tolerance for Newton solver.

E.g. 1e10 1.3 10

Constructors

Barrier 

Fields

  • bK :: Double

    stiffness (normally a high number, like 1e10, or 1e13

  • bAlpha :: Double

    stiffness exponent (small number, usually between 1 and 3)

  • bBeta :: Double

    loss parameter (positive or zero...bigger means more loss)

  • bSolver :: Solver
     

Instances

Instances details
Show Barrier Source # 
Instance details

Defined in Ness.Guitar

Eq Barrier Source # 
Instance details

Defined in Ness.Guitar

Methods

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

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

Ord Barrier Source # 
Instance details

Defined in Ness.Guitar

data FingerParams Source #

Constructors

FingerParams 

Fields

  • fMass :: Kg
     
  • fStiffness :: Double

    Stiffness. A big number, like 1e7, usually... tells you the hardness of the finger.

  • fExponent :: Double

    Exponent, should be between 1-3.

  • fLoss :: Double

    Loss. 0 means lossless, greater than zero, means lossy. Usually 1-100 are good values.

data Solver Source #

Constructors

Solver 

Instances

Instances details
Show Solver Source # 
Instance details

Defined in Ness.Guitar

Eq Solver Source # 
Instance details

Defined in Ness.Guitar

Methods

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

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

Ord Solver Source # 
Instance details

Defined in Ness.Guitar

type StringIndex = Int Source #

1-based, I think.

data Connection Source #

ssconnect_def (array) defines the parameters for each connection between strings. This is a 2-dimensional array with a row for each connection. Each row contains 9 items: the mass, frequency, loss parameter, collision exponent, rattling distance, index of first string, connection point on first string (0-1), index of second string, connection point on second string. If the second string index is 0, the connection is to a single string only. If multiple connections are defined connecting to the same point on a string, the latter one will be automatically removed as this is not currently supported.

Instances

Instances details
Show Connection Source # 
Instance details

Defined in Ness.Guitar

Eq Connection Source # 
Instance details

Defined in Ness.Guitar

Ord Connection Source # 
Instance details

Defined in Ness.Guitar

Score

data Score Source #

Constructors

Score 

Fields

Instances

Instances details
Show Score Source # 
Instance details

Defined in Ness.Guitar

Methods

showsPrec :: Int -> Score -> ShowS #

show :: Score -> String #

showList :: [Score] -> ShowS #

Eq Score Source # 
Instance details

Defined in Ness.Guitar

Methods

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

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

data Note Source #

Instances

Instances details
Show Note Source # 
Instance details

Defined in Ness.Guitar

Methods

showsPrec :: Int -> Note -> ShowS #

show :: Note -> String #

showList :: [Note] -> ShowS #

Eq Note Source # 
Instance details

Defined in Ness.Guitar

Methods

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

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

data Strike Source #

Constructors

Strike 
Pluck 

Instances

Instances details
Show Strike Source # 
Instance details

Defined in Ness.Guitar

Eq Strike Source # 
Instance details

Defined in Ness.Guitar

Methods

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

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

data Finger Source #

Instances

Instances details
Show Finger Source # 
Instance details

Defined in Ness.Guitar

Eq Finger Source # 
Instance details

Defined in Ness.Guitar

Methods

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

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

render util

array2 :: Text -> [[Double]] -> Text Source #

scalar :: Render a => Text -> a -> Text Source #

instrument util

hexArea :: Floating a => a -> a Source #