--- OLD, NEEDS REWRITE ---

Mammad 1/25/20 -- WIP

Lila Console Interface

Objectives: 

	- Separate the Lila engine from the performance console(s).
	- Give visibility of inner workings of Lila.
	- Augment performance actions.
	- Define midi actions.

Principles
	- LCI is meant for just that, interfacing with a console abstraction.
	  It should not be considered a concrete implementation of any core Lila capability.

Naming Scheme:

	<feed>_<section>_<event>[_<channel>]

Feeds:

	- In: from Lila to Console (prefix CI_)
	- Out: from Console to Lila (prefix CO_)

Sections:

	- Input section (prefix Input_)
	- Master section (prefix Master_)
	- Sync section (prefix Sync_)
	- Spatialization section (prefix Spat_)
	- Loop section (prefix Loop_)
	- Delay section (prefix Delay_)
	- File section (prefix File_)
	- Midi section (prefix Midi_)

Input Section:

	Input Channels:
	1-6

	Console Event		Lila Events
	C*_Input_Gain_$1	L_input_$1_vol
	CI_Input_VU_$1		L_input_$1_vu

	Todo:
	- map Lila inputs to delay lines

Master Section:

	Master Bus Channels:
	1-4

	Console Event		Lila Events
	C*_Master_Gain		mastervol
	C*_Master_Reset		Cons_Master_Reset
	C*_Master_Mute		Cons_Master_Mute, L_muteval
	C*_Master_CPU		Cons_Master_CPU
	CI_Master_CPU_Util	Cons_Master_CPU_Util
	CI_Master_VU_$1		L_output_$1_vu

Sync Section:

	Console Event		Lila Events
	C*_Sync_QReset		Cons_Sync_QReset
	C*_Sync_QStart		Cons_Sync_QStart
	C*_Sync_Metro		Cons_Sync_Metro
	C*_Sync_BPM		L_syncTempoIn, L_syncTempoOut, Cons_sync_BPM 
	CI_Sync_Click		L_metroClick
	C*_Sync_Quant		Cons_Sync_Quant
	CI_Sync_QBeatBang	L_quantizeBeatBang
	C*_Sync_Master_Loop	Cons_Sync_Master_Loop
	C*_Sync_Master_Tempo	Cons_Sync_Master_Tempo
	C*_Sync_BeatsPerLoop	Cons_Sync_BeatsPerLoop
	C*_Sync_ClicksPerBeat	Cons_Sync_ClicksPerBeat
	CI_Sync_QBeat		Cons_Sync_QBeat
	CI_Sync_QLoop		Cons_Sync_QLoop
	C*_Sync_Link		L_syncLink
	C*_Sync_Link_Play	L_syncExtPlay, L_syncExtPlaying
	C*_Sync_Link_Offset	L_syncLinkOffset

	
	Todo:
	- fix Cons_sync_BPM and link tempo interface
	- see if there is a better inteface for abl_link~

Spat Section:

	Spatializers:
	1-2 (internally Lila has 4 but only 2 exposed to LCI)

	Console Event		Lila Events
	C*_Spat			L_space
	C*_Spat_Reset		L_space_reset
	C*_Spat_Sync		L_speed_sync
	C*_Spat_Speed_$1	L_speed_speed_$1
	C*_Spat_Period_$1	L_speed_period_$1, L_speed_period_$1_done

	Todo:
	- put in a hack with L_speed_period_$1_done
	- more controls on algos (in L_configure)

Loop Events:

	Loop tracks: 1-8

	C*_Loop_Label_$1
	C*_Loop_Gain_$1
	CI_Loop_QBang_$1
	CI_Loop_VU_$1
	C*_Loop_Mute_$1
	C*_Loop_Reset_$1
	C*_Loop_SetMaster_$1
	C*_Loop_Switch_Play_$1
	C*_Loop_Switch_Rec_$1
	CI_Loop_Len_$1
	CI_Loop_Phase_$1
	C*_Loop_QBx_$1
	C*_Loop_Gain_All
	C*_Loop_Reset
	C*_Loop_Mute
	C*_Loop_Run
	C*_Loop_Ret
	C*_Loop_Ret_Reset
	L_forinput_vu
	C*_Loop_Ret_Mute
	L_forinput_dest		XXX in and out
	C*_Loop_Ret_Rec
	

Delay Events:

	Aggregate delay heads: 1-3 (3 delays x 3 heads, aggregating per head)

	C*_Delay_Gain_$1
	C*_Delay_Fbk_$1
	CI_Delay_VU_$1
	C*_Delay_Mute_$1
	C*_Delay_Reset_$1
	CI_Delay_Play_$1
	CI_Delay_Mark_$1
	C*_Delay_Len_$1
	C*_Delay_QBx_$1
	C*_Delay_QLx_$1
	C*_Delay_QBx_Sync
	C*_Delay_QLx_Sync
	C*_Delay_Gain_All
	C*_Delay_Reset
	C*_Delay_Mute
	
