type Request = {
  temperature: number;
  bias: { [key: string]: number };
  stopCondition: string;
  minPolyphony: number;
  maxPolyphony: number;
  dists?: boolean;
};

export const defaultRequest: Request = {
  temperature: 0.6,
  bias: { ['pitch >= 1000']: -1000 },
  // this still needs to be adjustable
  stopCondition: 'error || beat >= 16 || (steps >= 4 && (beat >= 4 || maxProbability < 0.2))',
  minPolyphony: 1,
  maxPolyphony: 4,
  dists: false,
};

export const bassRequest: Request = {
  ...defaultRequest,
  maxPolyphony: 1,
  bias: { 'pitch > 40': -8, 'pitch >= 1000': -1000 },
};

export const melodyRequest: Request = {
  ...defaultRequest,
  maxPolyphony: 1,
  bias: { 'pitch < 50': -8, 'pitch >= 1000': -1000 },
};

export const chordsRequest: Request = {
  ...defaultRequest,
  minPolyphony: 3,
  bias: { 'pitch >= 1000': -1000 },
};

export const drumsRequest: Request = {
  ...defaultRequest,
  bias: { 'pitch < 1000': -1000 },
};
