Safe Haskell | Safe-Inferred |
---|
Synopsis
- steel :: Material
- gold :: Material
- uranium :: Material
- nylon :: Material
- hemp :: Material
- bronze :: Material
- silk :: Material
- renderAll :: SamplingRate -> (Instrument, Score) -> (Text, Text)
- verify :: Instrument -> [Text]
- data String = String {}
- type StringName = Text
- data Material = Material {}
- renderStrings :: [String] -> Text
- data Output = Output {}
- renderOutputs :: [(StringIndex, Output)] -> Text
- data Backboard = Backboard {}
- renderBackboard :: Backboard -> Text
- data Fret = Fret {}
- renderFrets :: [Fret] -> Text
- data Barrier = Barrier {}
- renderBarrier :: Barrier -> Text
- data FingerParams = FingerParams {}
- renderFingerParams :: FingerParams -> Text
- data Solver = Solver {
- nIterations :: Int
- nTolerance :: Double
- type StringIndex = Int
- data Connection = Connection {
- cMass :: Double
- cFrequency :: Double
- cLoss :: Double
- cCollisionExponent :: Double
- cRattlingDistance :: Meters
- cString1 :: (StringIndex, Location)
- cString2 :: (StringIndex, Location)
- renderConnections :: [Connection] -> Text
- data Instrument = Instrument {
- iName :: Text
- iStrings :: [String]
- iFrets :: [Fret]
- iBarrier :: Barrier
- iBackboard :: Backboard
- iFingerParams :: FingerParams
- iNormalizeOutputs :: Bool
- iSolver :: Solver
- iConnections :: [Connection]
- renderInstrument :: SamplingRate -> Instrument -> Text
- data Score = Score {}
- renderScore :: [String] -> Score -> Text
- data Note = Note {}
- renderNotes :: (StringName -> StringIndex) -> [Note] -> Text
- data Strike
- data Finger = Finger {}
- renderFingers :: (StringName -> StringIndex) -> [Finger] -> Text
- array :: Text -> [Double] -> Text
- array2 :: Text -> [[Double]] -> Text
- scalar :: Render a => Text -> a -> Text
- makeFrets :: Meters -> Pitch.NoteNumber -> [Pitch.NoteNumber] -> [Fret]
- pitchLocation :: Pitch.NoteNumber -> Pitch.NoteNumber -> Location
- sActualNn :: String -> Pitch.NoteNumber
- freq :: Double -> Double
- tensionKgToN :: Double -> Double
- hexArea :: Floating a => a -> a
- freqStiffness :: Double -> Double
- moiCircle :: Double -> Double
- moiHex :: Double -> Double
Documentation
renderAll :: SamplingRate -> (Instrument, Score) -> (Text, Text) Source #
verify :: Instrument -> [Text] Source #
Instrument
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.
String | |
|
type StringName = Text Source #
renderStrings :: [String] -> Text 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).
renderOutputs :: [(StringIndex, Output)] -> Text 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
renderBackboard :: Backboard -> Text Source #
renderFrets :: [Fret] -> Text 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
renderBarrier :: Barrier -> Text Source #
data FingerParams Source #
Instances
Show FingerParams Source # | |
Defined in Ness.Guitar showsPrec :: Int -> FingerParams -> ShowS # show :: FingerParams -> String # showList :: [FingerParams] -> ShowS # | |
Eq FingerParams Source # | |
Defined in Ness.Guitar (==) :: FingerParams -> FingerParams -> Bool # (/=) :: FingerParams -> FingerParams -> Bool # | |
Ord FingerParams Source # | |
Defined in Ness.Guitar compare :: FingerParams -> FingerParams -> Ordering # (<) :: FingerParams -> FingerParams -> Bool # (<=) :: FingerParams -> FingerParams -> Bool # (>) :: FingerParams -> FingerParams -> Bool # (>=) :: FingerParams -> FingerParams -> Bool # max :: FingerParams -> FingerParams -> FingerParams # min :: FingerParams -> FingerParams -> FingerParams # |
Solver | |
|
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.
Connection | |
|
Instances
Show Connection Source # | |
Defined in Ness.Guitar showsPrec :: Int -> Connection -> ShowS # show :: Connection -> String # showList :: [Connection] -> ShowS # | |
Eq Connection Source # | |
Defined in Ness.Guitar (==) :: Connection -> Connection -> Bool # (/=) :: Connection -> Connection -> Bool # | |
Ord Connection Source # | |
Defined in Ness.Guitar compare :: Connection -> Connection -> Ordering # (<) :: Connection -> Connection -> Bool # (<=) :: Connection -> Connection -> Bool # (>) :: Connection -> Connection -> Bool # (>=) :: Connection -> Connection -> Bool # max :: Connection -> Connection -> Connection # min :: Connection -> Connection -> Connection # |
renderConnections :: [Connection] -> Text Source #
data Instrument Source #
Instrument | |
|
Instances
Show Instrument Source # | |
Defined in Ness.Guitar showsPrec :: Int -> Instrument -> ShowS # show :: Instrument -> String # showList :: [Instrument] -> ShowS # | |
Eq Instrument Source # | |
Defined in Ness.Guitar (==) :: Instrument -> Instrument -> Bool # (/=) :: Instrument -> Instrument -> Bool # | |
Ord Instrument Source # | |
Defined in Ness.Guitar compare :: Instrument -> Instrument -> Ordering # (<) :: Instrument -> Instrument -> Bool # (<=) :: Instrument -> Instrument -> Bool # (>) :: Instrument -> Instrument -> Bool # (>=) :: Instrument -> Instrument -> Bool # max :: Instrument -> Instrument -> Instrument # min :: Instrument -> Instrument -> Instrument # |
renderInstrument :: SamplingRate -> Instrument -> Text Source #
Score
renderNotes :: (StringName -> StringIndex) -> [Note] -> Text Source #
renderFingers :: (StringName -> StringIndex) -> [Finger] -> Text Source #
render util
instrument util
makeFrets :: Meters -> Pitch.NoteNumber -> [Pitch.NoteNumber] -> [Fret] Source #
sActualNn :: String -> Pitch.NoteNumber Source #
tensionKgToN :: Double -> Double Source #
freqStiffness :: Double -> Double Source #