Karya, built on 2020-11-26T21:03:17 (patch 23b5be2d53a9e8e7d6136cda5aae2849abe5cded)
Safe HaskellNone

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
Eq String # 
Instance details

Defined in Ness.Guitar

Methods

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

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

Ord String # 
Instance details

Defined in Ness.Guitar

Show String # 
Instance details

Defined in Ness.Guitar

data Material Source #

Constructors

Material 

Fields

Instances

Instances details
Eq Material # 
Instance details

Defined in Ness.Guitar

Ord Material # 
Instance details

Defined in Ness.Guitar

Show Material # 
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
Eq Output # 
Instance details

Defined in Ness.Guitar

Methods

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

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

Ord Output # 
Instance details

Defined in Ness.Guitar

Show Output # 
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
Eq Backboard # 
Instance details

Defined in Ness.Guitar

Ord Backboard # 
Instance details

Defined in Ness.Guitar

Show Backboard # 
Instance details

Defined in Ness.Guitar

data Fret Source #

Constructors

Fret 

Instances

Instances details
Eq Fret # 
Instance details

Defined in Ness.Guitar

Methods

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

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

Ord Fret # 
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 #

Show Fret # 
Instance details

Defined in Ness.Guitar

Methods

showsPrec :: Int -> Fret -> ShowS #

show :: Fret -> String #

showList :: [Fret] -> ShowS #

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
Eq Barrier # 
Instance details

Defined in Ness.Guitar

Methods

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

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

Ord Barrier # 
Instance details

Defined in Ness.Guitar

Show Barrier # 
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
Eq Solver # 
Instance details

Defined in Ness.Guitar

Methods

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

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

Ord Solver # 
Instance details

Defined in Ness.Guitar

Show Solver # 
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
Eq Connection # 
Instance details

Defined in Ness.Guitar

Ord Connection # 
Instance details

Defined in Ness.Guitar

Show Connection # 
Instance details

Defined in Ness.Guitar

Score

data Score Source #

Constructors

Score 

Fields

Instances

Instances details
Eq Score # 
Instance details

Defined in Ness.Guitar

Methods

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

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

Show Score # 
Instance details

Defined in Ness.Guitar

Methods

showsPrec :: Int -> Score -> ShowS #

show :: Score -> String #

showList :: [Score] -> ShowS #

data Note Source #

Instances

Instances details
Eq Note # 
Instance details

Defined in Ness.Guitar

Methods

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

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

Show Note # 
Instance details

Defined in Ness.Guitar

Methods

showsPrec :: Int -> Note -> ShowS #

show :: Note -> String #

showList :: [Note] -> ShowS #

data Strike Source #

Constructors

Strike 
Pluck 

Instances

Instances details
Eq Strike # 
Instance details

Defined in Ness.Guitar

Methods

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

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

Show Strike # 
Instance details

Defined in Ness.Guitar

data Finger Source #

Instances

Instances details
Eq Finger # 
Instance details

Defined in Ness.Guitar

Methods

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

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

Show Finger # 
Instance details

Defined in Ness.Guitar

render util

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

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

instrument util

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