<commit_before>
{-# LANGUAGE DeriveDataTypeable         #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TypeFamilies               #-}

------------------------------------------------------------------------------------
-- |
-- Copyright   : (c) <NAME> 2012
--
-- License     : BSD-style
--
-- Maintainer  : <EMAIL>
-- Stability   : experimental
-- Portability : non-portable (TF,GNTD)
--
-- A basic music representation.
--
-------------------------------------------------------------------------------------

module Music.Prelude.Standard (
        module Music.Score,
        module Music.Pitch,
        module Music.Dynamics,
        module Music.Parts,
        Note,
        asScore,
        asVoice,
        asTrack,
        asNote,
        open,
        play,
        openAndPlay
  ) where

import           Data.Default
import           Data.Typeable

import           Music.Dynamics
import           Music.Parts
import           Music.Pitch
import           Music.Score             hiding (Fifths, Interval, Note, Part,
                                          Pitch, pitch)

import           Music.Prelude.Instances ()

asNote :: Note -> Note
asNote = id

asScore :: Score Note -> Score Note
asScore = id

asVoice :: Voice Note -> Voice Note
asVoice = id

asTrack :: Track Note -> Track Note
asTrack = id

-- newtype BasicPart = BasicPart { getBasicPart :: Integer }
--     deriving (Eq, Ord, Num, Integral, Real, Enum, Typeable)
--
-- instance Default BasicPart where def = BasicPart 0
-- instance Show BasicPart where
--     show _ = ""

type Note = (PartT Part
    -- (TremoloT
      -- (TextT
        -- (ArticulationT
          -- (HarmonicT
            -- (TieT
              -- (SlideT
                -- (DynamicT
                  [
                    StandardPitch]) --)))))))
type StandardPitch = Music.Pitch.Pitch
-- data StandardPitch = StandardPitch Music.Pitch.Pitch
    -- deriving (HasMidi, HasLilypond, HasMusicXml, HasPitch)


open          = openLilypond . asScore
play          = error "Not implemented: play"
openAndPlay x = open x >> play x
<commit_msg>Restore standard prelude (except dynamics and articulation)<commit_after>
{-# LANGUAGE DeriveDataTypeable         #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TypeFamilies               #-}

------------------------------------------------------------------------------------
-- |
-- Copyright   : (c) <NAME> 2012
--
-- License     : BSD-style
--
-- Maintainer  : <EMAIL>
-- Stability   : experimental
-- Portability : non-portable (TF,GNTD)
--
-- A basic music representation.
--
-------------------------------------------------------------------------------------

module Music.Prelude.Standard (
        module Music.Score,
        module Music.Pitch,
        module Music.Dynamics,
        module Music.Parts,
        Note,
        asScore,
        asVoice,
        asTrack,
        asNote,
        open,
        play,
        openAndPlay
  ) where

import           Data.Default
import           Data.Typeable

import           Music.Dynamics
import           Music.Parts
import           Music.Pitch
import           Music.Score             hiding (Fifths, Interval, Note, Part,
                                          Pitch, pitch)

import           Music.Prelude.Instances ()

asNote :: Note -> Note
asNote = id

asScore :: Score Note -> Score Note
asScore = id

asVoice :: Voice Note -> Voice Note
asVoice = id

asTrack :: Track Note -> Track Note
asTrack = id

-- newtype BasicPart = BasicPart { getBasicPart :: Integer }
--     deriving (Eq, Ord, Num, Integral, Real, Enum, Typeable)
--
-- instance Default BasicPart where def = BasicPart 0
-- instance Show BasicPart where
--     show _ = ""

type Note = (PartT Part
    (TremoloT
      (TextT
        -- (ArticulationT
          (HarmonicT
            (TieT
              (SlideT
                -- (DynamicT
                  [
                    StandardPitch])))))) -- ))

type StandardPitch = Music.Pitch.Pitch
-- data StandardPitch = StandardPitch Music.Pitch.Pitch
    -- deriving (HasMidi, HasLilypond, HasMusicXml, HasPitch)


open          = openLilypond . asScore
play          = error "Not implemented: play"
openAndPlay x = open x >> play x

{'fraction_non_alphanumeric': 0.17456947393253125, 'fraction_numerical': 0.0023590469450342063, 'mean_word_length': 1.4036281179138321, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1052051', 'n_tokens_mistral': 1177, 'n_tokens_neox': 1152, 'n_words': 312}