<commit_before>module CircleOfFifths exposing (chordCount, view)

import Chord exposing (Chord)
import Colour
import CustomEvents exposing (onLeftDown, onKeyDown)
import IdChord exposing (IdChord)
import Name
import Player exposing (PlayStatus)

import Html exposing (Html)
import Html.Attributes exposing (attribute, style)
import Svg exposing (Svg, svg, defs, linearGradient, path, text_, rect)
import Svg.Attributes exposing
  ( width, height, viewBox
  , d, fill, opacity
  , stroke, strokeWidth, strokeLinejoin, strokeDasharray, strokeOpacity
  , x1, y1, x2, y2
  , textAnchor
  )

chordCount : Int
chordCount = 24

idByRoot : Int -> Chord -> IdChord
idByRoot firstId chord =
  { id = firstId + chord.root
  , chord = chord
  }

view : Int -> PlayStatus -> Html IdChord.Msg
view key playStatus =
  let
    rInner = 100
  in let
    rOuter = 247.5
  in let
    rMid = areaAverage 100 247.5
  in let
    majorChords =
      List.map
        ( idByRoot 0 <<
            Chord [ 4, 7 ] <<
            (\i -> (9 + key + 7 * i) % 12)
        )
        (List.range 0 11)
  in let
    minorChords =
      List.map
        ( idByRoot 12 <<
            Chord [ 3, 7 ] <<
            (\i -> (key + 7 * i) % 12)
        )
        (List.range 0 11)
  in let
    stopButtonId =
      if playStatus.stoppable then playStatus.active else -1
  in
    Html.span
      [ style
          [ ( "position", "relative" )
          , ( "display", "inline-block" )<commit_msg>fix circle of fifths<commit_after>module CircleOfFifths exposing (chordCount, view)

import Chord exposing (Chord)
import Colour
import CustomEvents exposing (onLeftDown, onKeyDown)
import IdChord exposing (IdChord)
import Name
import Player exposing (PlayStatus)

import Html exposing (Html)
import Html.Attributes exposing (attribute, style)
import Svg exposing (Svg, svg, defs, linearGradient, path, text_, rect)
import Svg.Attributes exposing
  ( width, height, viewBox
  , d, fill, opacity
  , stroke, strokeWidth, strokeLinejoin, strokeDasharray, strokeOpacity
  , x1, y1, x2, y2
  , textAnchor
  )

chordCount : Int
chordCount = 24

idByRoot : Int -> Chord -> IdChord
idByRoot firstId chord =
  { id = firstId + chord.root
  , chord = chord
  }

view : Int -> PlayStatus -> Html IdChord.Msg
view key playStatus =
  let
    rInner = 100
  in let
    rOuter = 247.5
  in let
    rMid = areaAverage 100 247.5
  in let
    majorChords =
      List.map
        ( idByRoot 0 <<
            Chord [ 4, 7 ] <<
            (\i -> (key + 7 * i) % 12)
        )
        (List.range 0 11)
  in let
    minorChords =
      List.map
        ( idByRoot 12 <<
            Chord [ 3, 7 ] <<
            (\i -> (9 + key + 7 * i) % 12)
        )
        (List.range 0 11)
  in let
    stopButtonId =
      if playStatus.stoppable then playStatus.active else -1
  in
    Html.span
      [ style
          [ ( "position", "relative" )
          , ( "display", "inline-block" )
{'fraction_non_alphanumeric': 0.10010284538909839, 'fraction_numerical': 0.02811107302022626, 'mean_word_length': 2.3386727688787183, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5180033', 'n_tokens_mistral': 1071, 'n_tokens_neox': 966, 'n_words': 307}