<commit_before>import {
  UPDATE_CONTROL_PAD_ARPEGGIATOR_IS_ON,
  UPDATE_CONTROL_PAD_ARPEGGIATOR_OCTAVES,
  UPDATE_CONTROL_PAD_INSTRUMENT,
  UPDATE_CONTROL_PAD_NO_SCALE,
  UPDATE_CONTROL_PAD_OCTAVE,
  UPDATE_CONTROL_PAD_PORTAMENTO,
  UPDATE_CONTROL_PAD_RANGE,
  UPDATE_CONTROL_PAD_SELECTED_ARPEGGIATOR_PATTERN
} from '../actions'
import {initialState as instrumentInitialState} from './instruments'

export const initialState = {
  arpeggiatorIsOn: true,
  arpeggiatorOctaves: 2,
  instrument: instrumentInitialState[2],
  noScale: false,
  octave: 0,
  portamento: false,
  range: 1,
  selectedArpeggiatorPattern: 'up and down'
}

export default (state = initialState, {type, payload}) => {
  switch (type) {
    case UPDATE_CONTROL_PAD_ARPEGGIATOR_IS_ON:
      return {...state, arpeggiatorIsOn: payload}
    case UPDATE_CONTROL_PAD_ARPEGGIATOR_OCTAVES:
      return {...state, arpeggiatorOctaves: payload}
    case UPDATE_CONTROL_PAD_INSTRUMENT: return {...state, instrument: payload}
    case UPDATE_CONTROL_PAD_NO_SCALE: return {...state, noScale: payload}
    case UPDATE_CONTROL_PAD_OCTAVE: return {...state, octave: payload}
    case UPDATE_CONTROL_PAD_PORTAMENTO: return {...state, portamento: payload}
    case UPDATE_CONTROL_PAD_RANGE: return {...state, range: payload}
    case UPDATE_CONTROL_PAD_SELECTED_ARPEGGIATOR_PATTERN:
      return {...state, selectedArpeggiatorPattern: payload}
    default: return state
  }
}
<commit_msg>feat(control-pad) arpeggiator off by default<commit_after>import {
  UPDATE_CONTROL_PAD_ARPEGGIATOR_IS_ON,
  UPDATE_CONTROL_PAD_ARPEGGIATOR_OCTAVES,
  UPDATE_CONTROL_PAD_INSTRUMENT,
  UPDATE_CONTROL_PAD_NO_SCALE,
  UPDATE_CONTROL_PAD_OCTAVE,
  UPDATE_CONTROL_PAD_PORTAMENTO,
  UPDATE_CONTROL_PAD_RANGE,
  UPDATE_CONTROL_PAD_SELECTED_ARPEGGIATOR_PATTERN
} from '../actions'
import {initialState as instrumentInitialState} from './instruments'

export const initialState = {
  arpeggiatorIsOn: false,
  arpeggiatorOctaves: 2,
  instrument: instrumentInitialState[2],
  noScale: false,
  octave: 0,
  portamento: false,
  range: 1,
  selectedArpeggiatorPattern: 'up and down'
}

export default (state = initialState, {type, payload}) => {
  switch (type) {
    case UPDATE_CONTROL_PAD_ARPEGGIATOR_IS_ON:
      return {...state, arpeggiatorIsOn: payload}
    case UPDATE_CONTROL_PAD_ARPEGGIATOR_OCTAVES:
      return {...state, arpeggiatorOctaves: payload}
    case UPDATE_CONTROL_PAD_INSTRUMENT: return {...state, instrument: payload}
    case UPDATE_CONTROL_PAD_NO_SCALE: return {...state, noScale: payload}
    case UPDATE_CONTROL_PAD_OCTAVE: return {...state, octave: payload}
    case UPDATE_CONTROL_PAD_PORTAMENTO: return {...state, portamento: payload}
    case UPDATE_CONTROL_PAD_RANGE: return {...state, range: payload}
    case UPDATE_CONTROL_PAD_SELECTED_ARPEGGIATOR_PATTERN:
      return {...state, selectedArpeggiatorPattern: payload}
    default: return state
  }
}

{'fraction_non_alphanumeric': 0.08664383561643836, 'fraction_numerical': 0.0027397260273972603, 'mean_word_length': 5.295258620689655, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '4306085', 'n_tokens_mistral': 1097, 'n_tokens_neox': 984, 'n_words': 198}