Skip to content

Instantly share code, notes, and snippets.


Justus Sagemüller leftaroundabout

  • Høgskulen på Vestlandet
  • Bergen
View GitHub Profile
View Contours.hs
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
View StaccatoEnvelopes.hs
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
View ParticleRainbow.hs
import Diagrams.Prelude
import Diagrams.Backend.Cairo
import Data.Colour.RGBSpace.HSV
import Data.Colour.SRGB.Linear
import Data.Numbers.Primes
import Control.Monad
View DistortionVisualise.hs
import Graphics.Dynamic.Plot.R2
import Data.Function
main :: IO ()
main = do
plotWindow $
[ plotLatest
[ 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

View FiniteCategories.hs
{-# LANGUAGE TemplateHaskell, QuasiQuotes #-}
{-# LANGUAGE DataKinds, KindSignatures #-}
{-# LANGUAGE ScopedTypeVariables, UnicodeSyntax #-}
{-# LANGUAGE TypeFamilies, GADTs #-}
{-# LANGUAGE ConstraintKinds #-}
import Data.Singletons.TH --
import Data.Singletons (sing, Sing, SingI)
import Control.Category.Constrained (Category(..)) --
View hs-memoised-splines.hs
{-# 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 / Main.hs
Last active August 16, 2020 20:06
View Main.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
View ObjIndexedCategory.hs
#!/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
View MoonEscape.hs
{-# 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