Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
- addDynamics :: ToMusicCore a => Music a -> DynamicsMap -> MusicCore
- dyn :: ToMusicCore a => Music a -> MusicCore
- sinTimeDynamics :: DynamicsMap
- sinPitchDynamics :: DynamicsMap
- expPitchDynamics :: DynamicsMap
- type DynamicsMap = Double -> Double -> Double
Documentation
addDynamics :: ToMusicCore a => Music a -> DynamicsMap -> MusicCore Source #
Adds Dynamic
to all notes in the given Music
using the given DynamicsMap
dyn :: ToMusicCore a => Music a -> MusicCore Source #
Adds Dynamic
to all notes in the given Music
using expPitchDynamics
.
sinTimeDynamics :: DynamicsMap Source #
Returns a dynamic between 25% and 75% volume, based on one full sine oscillation
sinPitchDynamics :: DynamicsMap Source #
Returns a dynamic between 0% and 100% volume, based on one full sine oscillation. Note that this sounds ridiculous
expPitchDynamics :: DynamicsMap Source #
Returns a dynamic between 0% and 100% volume, based on the exponential quantile function and the relative pitch height of the note in the cluster.
type DynamicsMap Source #
= Double | Time location of note in cluster, in range [0,1]. |
-> Double | Pitch location in cluster, in range [0,1]. |
-> Double | Volume of the note, in range [0,1]. |
Gets the time of the note within its cluster as a Double in the range [0,1] (where 0 represents that the note is at the start of the cluster, and 1 that it's at the end of the cluster) and the pitch of the note within the cluster (where 0 represents the lowest note in the cluster and 1 the highest note in the cluster) and returns another Double in the range [0,1] that represents how loud the note should be played, where 0 is as soft as possible (but not silent!) and 1 is as loud as possible.