#ifndef _Controller_H
#define _Controller_H

#include "TimTypes.h"

struct Controller
{
	struct
	{
		// Do not change the 4 first items (LDM)
		int32_t    min;   // minimum allowed value
		int32_t    max;   // maximum allowed value
		int32_t    start; // permanent value (affected by permanent effects)
		int32_t    delta; // value delta (frame transient effects)
		int32_t    offset;// permanent delta (reset with new note)
		int32_t    final; // goal value for portamento
	} value;
	uint32_t   portamento_speed; // portamento speed
	uint32_t   slide_speed;      // slide speed
	uint32_t   slide_speed2;     // slide speed2
	uint32_t   slowslide_speed;  // slow slide step
	uint32_t   vibrato_pos;      // vibrato, current pos in envelope
	uint32_t   vibrato_depth;    // vibrato depth
	uint8_t    vibrato_speed;    // vibrato speed
	uint8_t    vibrato_type;     // vibrato type
	uint8_t    vibrato_strength; // vibrato multiplier
	uint8_t    last_slide_effect;// last slide effect1 used
	uint32_t   autoslide;        // autoslide effect & speed
};

#endif
