Skip to content

Instantly share code, notes, and snippets.

View leftaroundabout's full-sized avatar

Justus Sagemüller leftaroundabout

  • KTH Royal Institute of Technology
  • Stockholm
View GitHub Profile
import Codec.Picture
import qualified Diagrams.Prelude as Dia
import Diagrams.Prelude ((^&))
import qualified Diagrams.Backend.Cairo as Dia
type ℝ = Double
horizContourLine ::
((ℝ,ℝ) -> ℝ) -- ^ The topography/height function
-> (ℝ,ℝ) -- ^ x-interval on which to render the path
import Graphics.Dynamic.Plot.R2
import Data.Function
type Time = Double
type Duration = Time
type RMS = Double
pianoShape :: Duration -> Time -> RMS
pianoShape len t
| t<0 = 0
import Diagrams.Prelude
import Diagrams.Backend.Cairo
import Data.Colour.RGBSpace.HSV
import Data.Colour.SRGB.Linear
import Data.Numbers.Primes
import Control.Monad
import Graphics.Dynamic.Plot.R2
import Data.Function
main :: IO ()
main = do
plotWindow $
[ plotLatest
[plotMultiple
[ signalPlot (fmap (*μ) $ initSignal) & legendName "clean"

Well, ultimately music is always subjective. You can't really argue with someone who likes some particular music – they like what they like, and it would be dogmatism to condemn some composition just because it violates the theoretical frameworks that you happen to know.

That said, I personally would probably agree with your assessment. I don't think much of music that's just too arbitrary – not because it's bad to violate the standard theory, but because music should have a purpose. This is regardless of whether that purpose can be explained within Common Practice theory, with deliberately violating the common rules, with providing a completely new theoretical framework, or something else.

In other words, “Why it couldn't go there anyways?” is just not the right question to ask to rebut criticism. The right rebuttal is to give a reason why it would go there.

If he picked that particular harmony for a reason – whatever reason – then there's that. In doubt, the reason could simply be “I li

{-# LANGUAGE TemplateHaskell, QuasiQuotes #-}
{-# LANGUAGE DataKinds, KindSignatures #-}
{-# LANGUAGE ScopedTypeVariables, UnicodeSyntax #-}
{-# LANGUAGE TypeFamilies, GADTs #-}
{-# LANGUAGE ConstraintKinds #-}
import Data.Singletons.TH -- http://hackage.haskell.org/package/singletons-2.7/
import Data.Singletons (sing, Sing, SingI)
import Control.Category.Constrained (Category(..)) -- http://hackage.haskell.org/package/constrained-categories-0.4.1.0
{-# LANGUAGE OverloadedLists #-}
import qualified Data.Vector.Unboxed as VU
import Data.Vector.Unboxed (Vector, (!))
import Data.MemoTrie (memo2)
import Graphics.Dynamic.Plot.R2
import Text.Printf
newtype Knots = Knots {getIncreasingKnotsSeq :: Vector Double}
@leftaroundabout
leftaroundabout / Main.hs
Last active August 16, 2020 20:06
ContinAbsvalParametrisation.hs
import Graphics.Dynamic.Plot.R2
import Data.Semigroup
import Control.Monad (join)
f, g :: Double -> Double
g t = t^2
f t
| t<0 = -t^2
| otherwise = t^2
#!/usr/bin/env stack
{- stack --resolver lts-12.0 runghc -}
{-# LANGUAGE TypeFamilies, FlexibleInstances #-}
{-# LANGUAGE DataKinds, PolyKinds, KindSignatures, TypeInType #-}
{-# LANGUAGE AllowAmbiguousTypes, TypeApplications, GADTs #-}
import Prelude hiding ((.), id)
import qualified Prelude
import Data.Kind
{-# LANGUAGE TypeFamilies, FlexibleContexts #-}
import Math.LinearMap.Category
import Data.VectorSpace
import Linear.V3
import Data.AffineSpace
import Control.Arrow
import Data.Semigroup
import qualified Diagrams.Prelude as Dia
import Graphics.Dynamic.Plot.R2