<commit_before>#include <avr/io.h>
#include <avr/Interrupt.h>
#include <stdlib.h>
#include <string.h>

#ifndef CQ_INPUT_H_
#define CQ_INPUT_H_

enum EditMode {NORMAL, SELECT, SCALE, PATTERN};

#define CHG_VAL_FLAG_STEP_FILL 0
#define CHG_VAL_FLAG_STEP_LENGTH 1
#define CHG_VAL_FLAG_STEP_ROT 2
#define CHG_VAL_FLAG_STEP_RAND 3
#define CHG_VAL_FLAG_SCALE_SELECT 4
#define CHG_VAL_FLAG_SCALE_SHIFT 5
#define CHG_VAL_FLAG_SCALE_PATTERN 6
#define CHG_VAL_FLAG_SCALE_TRANSPOSE 7
#define CHG_VAL_FLAG_SCALE_RANGE 8
#define CHG_VAL_FLAG_SCALE_PAT_RAND 9
#define CHG_VAL_FLAG_SLIDE 10
#define CHG_VAL_FLAG_SWING 11

#define KNOB_VALUES_SIZE 12

extern volatile enum EditMode edit_mode;

enum RecMode {STOP, REC, PLAY};
extern volatile enum RecMode rec_mode;

enum FuncMode {NONE, FUNC, HID};
extern volatile enum FuncMode func_mode;

typedef struct {
  uint8_t rec;   // on recording
  uint8_t start; // on sequence running
  uint8_t func;   // on sub function
  uint8_t hid;   // on hidden function
  uint8_t func_lock; // on sub function lock
  uint8_t data;
} ControllerState;

enum FuncMode get_func_mode();

// scale most lo-bit = C, most high-bit = B
// 0x11111111 -> BAG(F#)FEDC
// scale value is 8bit boolean field.
typedef union {
  uint8_t values[12];
  struct {
    uint8_t step_fill;<commit_msg>change knob value history size<commit_after>#include <avr/io.h>
#include <avr/Interrupt.h>
#include <stdlib.h>
#include <string.h>

#ifndef CQ_INPUT_H_
#define CQ_INPUT_H_

enum EditMode {NORMAL, SELECT, SCALE, PATTERN};

#define CHG_VAL_FLAG_STEP_FILL 0
#define CHG_VAL_FLAG_STEP_LENGTH 1
#define CHG_VAL_FLAG_STEP_ROT 2
#define CHG_VAL_FLAG_STEP_RAND 3
#define CHG_VAL_FLAG_SCALE_SELECT 4
#define CHG_VAL_FLAG_SCALE_SHIFT 5
#define CHG_VAL_FLAG_SCALE_PATTERN 6
#define CHG_VAL_FLAG_SCALE_TRANSPOSE 7
#define CHG_VAL_FLAG_SCALE_RANGE 8
#define CHG_VAL_FLAG_SCALE_PAT_RAND 9
#define CHG_VAL_FLAG_SLIDE 10
#define CHG_VAL_FLAG_SWING 11

#define KNOB_VALUES_SIZE 8

extern volatile enum EditMode edit_mode;

enum RecMode {STOP, REC, PLAY};
extern volatile enum RecMode rec_mode;

enum FuncMode {NONE, FUNC, HID};
extern volatile enum FuncMode func_mode;

typedef struct {
  uint8_t rec;   // on recording
  uint8_t start; // on sequence running
  uint8_t func;   // on sub function
  uint8_t hid;   // on hidden function
  uint8_t func_lock; // on sub function lock
  uint8_t data;
} ControllerState;

enum FuncMode get_func_mode();

// scale most lo-bit = C, most high-bit = B
// 0x11111111 -> BAG(F#)FEDC
// scale value is 8bit boolean field.
typedef union {
  uint8_t values[12];
  struct {
    uint8_t step_fill;
{'fraction_non_alphanumeric': 0.07656967840735068, 'fraction_numerical': 0.027182235834609495, 'mean_word_length': 5.062645011600928, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '3890824', 'n_tokens_mistral': 1095, 'n_tokens_neox': 1019, 'n_words': 277}