;ReaTools Ultimate Dark V2.29 by Sound Kajiya
;Update history https://sound-kajiya.itch.io/reatools/devlog

version 7.0

;tinttcp 298
;peaksedges 7

use_pngs 1
use_overlays 1
tcp_showborders 0
mcp_showborders 0
transport_showborders 0
tcp_vupeakwidth 1
mcp_vupeakheight 2
mcp_mastervupeakheight 2
mcp_altmeterpos 0 

tcp_vol_zeroline #424242
tcp_pan_zeroline 85000000
tcp_width_zeroline 85000000
mcp_vol_zeroline #424242
mcp_pan_zeroline 85000000 
mcp_width_zeroline 85000000
trans_speed_zeroline 85000000
gen_vol_zeroline FF000000
gen_pan_zeroline FF000000
item_volknobfg FF000000 FF000000 FF000000

tcp_voltext_flags 1
tcp_master_voltext_flags 1
mcp_voltext_flags 1
mcp_master_voltext_flags 1
vertfont_topdown 1
no_meter_reclbl 1
mcp_min_height 627
envcp_min_height 23
tcp_master_minheight 85
tcp_folderindent 			13
tcp_heights 				0 23 23 23

misc_dpi_translate 50 100
misc_dpi_translate 134 200
misc_dpi_translate 174 200

; font #0 - track title font
; font #1 - input
; font #2 - tcp input
; font #3 - rate
; font #4 - mcp pan,width
; font #5 - envelope 
; font #6 - tcp fx,send
; font #7 - mcp idx
; font #8 - 200 tcp mcp
; font #9 -  200 transport 
; font #10 - 200 track label 
; font #11 - 200 track recinput

define_parameter ReaTools Ultimate V2.29 adjustable 'ReaTools Ultimate V2.29 adjustable_version' 1
define_parameter p1                                 'Transport Hide Buttons' 0 -2 5
define_parameter TransFont                          'Transport Status Font Size' -150 -300 0
define_parameter transBG                            'Transport Brightness' 39 1 255 ;classic=120 dark=39 darkblack=20
define_parameter p2                                 'TCP Display Number' 0 0 1
define_parameter p4                                 'MCP Wide Meter' 0 0 1
define_parameter MasterCol                          'Master Track Header Saturation' 1 1 255
define_parameter MasterBG                           'Master Track Header Brightness' 100 1 255
define_parameter ColorBG                            'Track Header Saturation' 255 1 255
define_parameter tcpBgColR 						    'Track Header Brightness' 100 1 255
define_parameter tcpFolBG 					     	'Folder Track Header Brightness' 100 1 255

;Brightness classic=160 dark=100 darkblack=60

;Classic color
;set PTGreen    [165 239 18]
;set PTWhite    [240 240 240]
;set PTrecinput [34 34 34]

;Dark color
set PTGreen    [56 209 119]
set PTWhite    [210 210 210]
set PTrecinput [203 203 203]

;Custom Elements

;Add the details of the mixer
custom mcp.custom.topline Mixer 65535 Mixer ci/mcp_toplinebg
custom mcp.custom.line_L Mixer 65535 Mixer ci/mcp_toplinebg
custom mcp.custom.line_R Mixer 65535 Mixer ci/mcp_toplinebg
custom mcp.custom.topbg Mixer 65535 Mixer ci/mcp_sidebg
custom mcp.custom.sidebg_L Mixer 65535 Mixer ci/mcp_sidebg
custom mcp.custom.sidebg_R Mixer 65535 Mixer ci/mcp_sidebg
custom mcp.custom.fixline Mixer 65535 Mixer ci/mcp_fixline

;Mixer color label button. Top and Below
custom mcp.custom.colorlb Set_Color _SWS_CUSTOMCOLALL Set_Color ci/mcp_colorlabel
custom mcp.custom.colorlb2 Set_Color _SWS_CUSTOMCOLALL Set_Color ci/mcp_colorlabel

custom master.mcp.custom.idx Master 65535 Master ci/mcp_maincustombg

;Add the details of the master mixer
custom master.mcp.custom.topline Mixer 65535 Mixer ci/mcp_toplinebg
custom master.mcp.custom.line_L Mixer 65535 Mixer ci/mcp_toplinebg
custom master.mcp.custom.line_R Mixer 65535 Mixer ci/mcp_toplinebg
custom master.mcp.custom.topbg Mixer 65535 Mixer ci/mcp_sidebg
custom master.mcp.custom.sidebg_L Mixer 65535 Mixer ci/mcp_sidebg
custom master.mcp.custom.sidebg_R Mixer 65535 Mixer ci/mcp_sidebg
custom master.mcp.custom.label Mixer 65535 Mixer ci/mcp_masterlabelcolor
custom master.mcp.custom.label2 Mixer 65535 Mixer ci/mcp_masterlabelcolor

;Stereo and mono images for pan modes
custom mcp.custom.knobst Knob 65535 Knob ci/mcp_knobst
custom mcp.custom.knobmn Knob 65535 Knob ci/mcp_knobmn

custom trans.custom.mainbg Transport 65535 Transport ci/transport_mainbg

custom trans.custom.053 SmartTool 65535 SmartTool ci/transport_smartbg

custom trans.custom.001 EnvLFO _PADRE_ENVLFO EnvelopeLFO_Generator ci/transport_pencil
custom trans.custom.002 PlayItem _XENAKIOS_TIMERTEST1 Play_Selected_Items_Once ci/transport_jog
custom trans.custom.003 SelectAll 40182 SelectAll_Item ci/transport_hand
custom trans.custom.004 TimeSelection 40290 Set_TimeSelection_to_selected_Items ci/transport_sel
custom trans.custom.005 Split 40760 DynamicSplit ci/transport_move
custom trans.custom.006 Zoom _SWS_ZOOM Zoom_Tool_marquee ci/transport_zoom
custom trans.custom.007 ProjClean 40098 Directory_Cleanup ci/transport_smart
custom trans.custom.008 MarkerList _SWSMARKERLIST1 Marker_List ci/transport_makerfollow
custom trans.custom.009 FixedLane 42430 Toggle_Fixed_ItemLanes ci/transport_respect_midi
custom trans.custom.010 EnvFollow 40070 Move_ENVpoints_with_Items ci/transport_auto
custom trans.custom.011 Transient 42074 Peak_Display_Settings ci/transport_ttab
custom trans.custom.012 Peak 43188 TCP_Width_Toggle ci/transport_link
custom trans.custom.013 SnabGird 40071 Snab/Grid_Settings ci/transport_link2
custom trans.custom.054 TS 41208 Transient_Settings ci/transport_tab
custom trans.custom.055 Zoom 40113 Track_Zoom_To_Maximum_Height ci/transport_zoomtoggle
custom trans.custom.014 Grid 65535 Grid ci/transport_gridsnap 

custom trans.custom.015 Zoom 65535 Zoom ci/transport_zoomtool
custom trans.custom.016 ZoomOut 1011 Zoom_Out ci/transport_zoomout
custom trans.custom.017 TrackIn 40111 Track_In ci/transport_trackzoomin
custom trans.custom.018 TrackOut 40112 Track_Out ci/transport_trackzoomout
custom trans.custom.019 ZoomIn 1012 Zoom_In ci/transport_zoomin

custom trans.custom.020 Preset1 40454 ScreenSet1 ci/transport_1
custom trans.custom.021 Preset2 40455 ScreenSet2 ci/transport_2
custom trans.custom.022 Preset3 40456 ScreenSet3 ci/transport_3
custom trans.custom.023 Preset4 40457 ScreenSet4 ci/transport_4
custom trans.custom.024 Preset5 40458 ScreenSet5 ci/transport_5

custom trans.custom.025 Shuffle 41990 Toggle_RippleEditing_PerTrack ci/transport_shuffle
custom trans.custom.026 Slip 1157 Toggle_Snapping ci/transport_slip
custom trans.custom.027 Spot _XENAKIOS_REPOSITION_ITEMS Reposition_items ci/transport_spot
custom trans.custom.028 Grid 1157 Toggle_Snapping ci/transport_grid

custom trans.custom.029 SG 42294 Toggle_Spectrogram ci/transport_spectro
custom trans.custom.030 SWSNotes _S&M_SHOW_NOTES_VIEW Display_SWSNotes ci/transport_page
custom trans.custom.031 Project 40021 ProjectSettings ci/transport_projset
custom trans.custom.050 UnFreeze 41644 UnFreeze ci/transport_freezebtn
custom trans.custom.051 Solo 40340 UnSolo_All_Track ci/transport_solobtn
custom trans.custom.052 Mute 40339 UnMute_All_Track ci/transport_mutebtn

custom trans.custom.035 Grid 65535 Grid ci/transport_gridbg
custom trans.custom.036 Grid 40145 Toggle_Display_Grid ci/transport_gridbtn
custom trans.custom.037 Nudge 41228 Nudge ci/transport_nudgebtn

custom trans.custom.032 NudgeL 41250 Nudge_Left ci/transport_rewind
custom trans.custom.033 NudgeR 41249 Nudge_Right ci/transport_forward
custom trans.custom.034 Control 65535 Control ci/transport_controlbg

custom trans.custom.038 extcontrol 65535 Extcontrol ci/transport_extcontrol
custom trans.custom.039 MIDI 40316 Quantize_Item ci/transport_waitnote
custom trans.custom.040 Metronome 40363 Metronome ci/transport_mn
custom trans.custom.041 ItemRuler 42355 ItemRuler_Settings ci/transport_followep
custom trans.custom.042 Loudness _BR_ANALAYZE_LOUDNESS_DLG Analyze_Loudness ci/transport_conductor

custom trans.custom.045 Mixer 40078 Mixer ci/transport_mixer
custom trans.custom.046 Video 50125 Video ci/transport_video
custom trans.custom.047 Matirx 40251 Matrix ci/transport_matrix
custom trans.custom.048 Tempo 41805 EntireTempo ci/transport_tempobtn
custom trans.custom.049 Meter 40240 PerformanceMeter ci/transport_meterbtn

custom trans.custom.theme Theme 65535 Theme ci/transport_themeset
custom trans.custom.empty Light 65535 Light ci/transport_empty
custom trans.custom.layout Adjuster 42234 Theme_Adjuster ci/transport_layout

custom trans.custom.043 TimeBase 41825 Project_TimeBase ci/transport_online
custom trans.custom.044 ExtSync 40619 External_TimeSync ci/transport_mtc

custom trans.custom.render Render 65535 Render ci/transport_render
custom trans.custom.rdr Render 40015 Render ci/transport_rdr

custom trans.custom.item Item 65535 Item_Control ci/transport_item
custom trans.custom.q Q _FNG_QUANTIZE_TO_GRID Quantize_Item_Position_and_MIDI_Note_Positions_to_Grid ci/transport_q
custom trans.custom.op op 40016 op ci/transport_op
custom trans.custom.sclfdr Scale 40301 Scale_Finder ci/transport_scalefinder

custom trans.custom.vmk VMK 40377 Virtual_MIDI_Keyborad ci/transport_vmk
custom trans.custom.expmidi Export 40849 Export_Project_MIDI ci/transport_exportmidi
custom trans.custom.learnmidi MIDILearn 41144 MIDI_Learn_for_Last_Touched_FX_Parameter ci/transport_learn

;custom envcp.custom.001 Envelope 65535 Envelope ci/envcp_controlbg
custom envcp.custom.002 Envelope 65535 Envelope ci/envcp_custombg
custom envcp.custom.003 Add 41975 View_Envelopes ci/envcp_addbtn
custom envcp.custom.004 Remove 40065 Remove_Selected_Envelope ci/envcp_removebtn
custom envcp.custom.005 EnvSize _WOL_SETSELENVHMIN Set_To_Minimum ci/envcp_sizetoggle
custom envcp.custom.colorlb Envelope 65535 Envelope ci/envcp_colorlabel

custom tcp.custom.001 Envelope 40891 Display_Visible_Envelope ci/tcp_envbtn
custom tcp.custom.002 TrackSize 40110 Toggle_TrackSize ci/tcp_sizelabel
custom tcp.custom.003 TrackSize 40110 Toggle_TrackSize ci/tcp_sizelabel_large
custom tcp.custom.004 TrackSize 40110 Toggle_TrackSize ci/tcp_sizelabel_jumbo
custom tcp.custom.005 TrackSize 40110 Toggle_TrackSize ci/tcp_sizelabel_extreme
custom tcp.custom.fbtn TrackSize 40110 Toggle_TrackSize ci/tcp_folderbtn

custom tcp.custom.056 TrackSize 40110 Toggle_TrackSize ci/tcp_midilabel_extreme
custom tcp.custom.057 TrackSize 40110 Toggle_TrackSize ci/tcp_midilabel_2
custom tcp.custom.058 TrackSize 40110 Toggle_TrackSize ci/tcp_midilabel_3
;custom tcp.custom.059 TrackSize 40110 Toggle_TrackSize ci/tcp_midilabel_extreme

custom tcp.custom.006 Track 65535 Track ci/tcp_btnbg ;no colored
custom tcp.custom.007 Track 65535 Track ci/tcp_btnbg
custom tcp.custom.008 Track 65535 Track ci/tcp_btnbg
custom tcp.custom.009 Track 65535 Track ci/tcp_btnbg
custom tcp.custom.010 Track 65535 Track ci/tcp_btnbg_2 ;empty
custom tcp.custom.011 Track 65535 Track ci/tcp_btnbg_2
custom tcp.custom.012 Track 65535 Track ci/tcp_btnbg_2
custom tcp.custom.013 Track 65535 Track ci/tcp_btnbg_2
custom tcp.custom.014 Track 65535 Track ci/tcp_minimumbg

custom tcp.custom.015 FX 65535 FX ci/tcp_folder_bg
custom tcp.custom.016 Send 65535 Send ci/tcp_folder_bg

custom tcp.custom.017 Track 65535 Track ci/tcp_btnbg_3 ;colored
custom tcp.custom.018 Track 65535 Track ci/tcp_btnbg_3
custom tcp.custom.019 Track 65535 Track ci/tcp_btnbg_3
custom tcp.custom.020 Track 65535 Track ci/tcp_btnbg_3


custom tcp.custom.colorlb SetColor _SWS_CUSTOMCOLALL Set_Color ci/tcp_colorlabel

custom tcp.custom.021 ChangeTracksize _RSbe776d9c5236087b958f561d4e0c9470626199d8 ChangeTracksize track_folder_off
front tcp.custom.021

custom tcp.custom.name1 Label 65535 Label ci/tcp_namelabel
custom tcp.custom.name2 Label 65535 Label ci/tcp_namelabel_sel
custom tcp.custom.name3 Label 65535 Label ci/tcp_namelabel_small
custom tcp.custom.name4 Label 65535 Label ci/tcp_namelabel_small_sel
custom tcp.custom.name5 Label 65535 Label ci/tcp_namelabel2_small

custom tcp.custom.grp Group 40772 Group ci/tcp_groupbtn

custom tcp.custom.knobline Track 65535 Track ci/tcp_knobline
custom master.tcp.custom.knobline Track 65535 Track ci/tcp_knobline

custom master.tcp.custom.001 Envelope 40406 Envelope ci/tcp_envbtn
custom master.tcp.custom.002 TrackSize 40110 TrackSize ci/tcp_sizelabel
custom master.tcp.custom.003 TrackSize 40110 TrackSize ci/tcp_sizelabel_large
custom master.tcp.custom.004 TrackSize 40110 TrackSize ci/tcp_sizelabel_jumbo
custom master.tcp.custom.005 TrackSize 40110 TrackSize ci/tcp_sizelabel_extreme

custom master.tcp.custom.006 Track 65535 Track ci/tcp_btnbg ;no colored
custom master.tcp.custom.007 Track 65535 Track ci/tcp_btnbg
custom master.tcp.custom.008 Track 65535 Track ci/tcp_btnbg
custom master.tcp.custom.009 Track 65535 Track ci/tcp_btnbg
custom master.tcp.custom.010 Track 65535 Track ci/tcp_btnbg_2 ;empty
custom master.tcp.custom.011 Track 65535 Track ci/tcp_btnbg_2
custom master.tcp.custom.012 Track 65535 Track ci/tcp_btnbg_3 ;colored
custom master.tcp.custom.013 Track 65535 Track ci/tcp_btnbg_3

custom master.tcp.custom.main Master 65535 Master ci/tcp_maincustombg

;height and width according to dpi scale
macro trackhw
set th25								* scale 25
set th35								* scale 35
set th42								* scale 42
set th45								* scale 45
set th60								* scale 60 ;not use
set th58								* scale 58
set th59								* scale 59 ;not use
set th71								* scale 71
set th79								* scale 79
set th83								* scale 83
set th96								* scale 96
set th830								* scale 830
set th188								* scale 188
set th380								* scale 380
set th598								* scale 598
set tw325                               * scale 325
set tw325 + + * folderdepth [-10 0 0 0] * maxfolderdepth [10 0 0 0]
endMacro

;buttons hide when folder layout
macro mcpfolderhide
clear mcp.recinput
clear mcp.recmode
clear mcp.fxin
clear mcp.fx
clear mcp.fxbyp
clear mcp.pan
clear mcp.pan.label
clear mcp.width
clear mcp.width.label
clear mcp.recmon
clear mcp.recarm
clear mcp.volume 
clear mcp.volume.label
clear mcp.phase
clear mcp.io
set mcp.extmixer.position [] 
;set mcp.trackidx [0]
endMacro

macro tcpfolderHide
clear tcp.phase
clear tcp.fx
clear tcp.fxbyp 
clear tcp.recmode
clear tcp.fxin 
clear tcp.io
clear tcp.recinput
clear tcp.fxparm
clear tcp.volume
clear tcp.volume.label 
clear tcp.pan
clear tcp.pan.label
clear tcp.width
clear tcp.width.label
clear tcp.fxembed
clear tcp.sendlist
clear tcp.recarm
clear tcp.recmon
set tcp.custom.002 [0]
set tcp.custom.003 [0]
set tcp.custom.004 [0]
set tcp.custom.005 [0]
set tcp.custom.006 [0]
set tcp.custom.007 [0]
set tcp.custom.008 [0]
set tcp.custom.009 [0]
endMacro

;TRANSPORT-------------------------------------------------------------------------------------------------------------------

macro drawTrans scale
clear trans.*
front trans.custom.mainbg trans.bpm.edit trans.custom.034 trans.custom.035 trans.custom.036 trans.custom.037 trans.custom.038 trans.custom.039 trans.custom.040 trans.custom.041 trans.custom.042 trans.custom.043 trans.custom.044 trans.curtimesig trans.rate.fader trans.rate trans.sel trans.automode trans.bpm.edit.margin trans.bpm.tap trans.rew trans.stop trans.play trans.pause trans.fwd trans.rec 
front trans.custom.053 trans.custom.007 trans.custom.001 trans.custom.002 trans.custom.003 trans.custom.004 trans.custom.005 trans.custom.006 trans.custom.008 trans.custom.009 trans.repeat trans.custom.010 trans.custom.011 trans.custom.012 trans.custom.013 trans.custom.054 trans.custom.055 trans.custom.014 trans.custom.015 trans.custom.016 trans.custom.017 trans.custom.018 trans.custom.019 trans.custom.020 trans.custom.021 trans.custom.022 trans.custom.023 trans.custom.024 trans.custom.025 trans.custom.026 trans.custom.027 trans.custom.028 trans.custom.029 trans.custom.030 trans.custom.031 trans.custom.032 trans.custom.033 trans.custom.045 trans.custom.046 trans.custom.047 trans.custom.048 trans.custom.049 trans.custom.050 trans.custom.051 trans.custom.052 trans.custom.theme trans.custom.render trans.custom.rdr trans.custom.item trans.custom.q trans.custom.op trans.custom.vmk trans.custom.expmidi trans.custom.learnmidi trans.custom.sclfdr trans.custom.empty trans.custom.layout 

set trans.custom.mainbg                                         * scale [0 0 w 88]
custom trans.custom.transBgBox
set trans.custom.transBgBox 				             * scale [0 1 w 87]
set trans.custom.transBgBox.color 				                 [0 0 0 0 transBG transBG transBG 0]

set trans.size                                                      * scale [1053 88]
set trans.size.minmax                                               * scale [716 82 716 82]
set trans.size.dockedheight                                         * scale [88]

set trans.pause 					                                * scale p1>=4 [968 13 31 31] [1073 13 31 31]
set trans.rew 						                                * scale p1>=4 [968 55 31 20] [1073 55 31 20]
set trans.fwd 						                                * scale p1>=4 [1074 55 31 20] [1179 55 31 20]
set trans.play  					                                * scale p1>=4 [1038 13 84 32] [1143 13 84 32]
set trans.stop  					                                * scale p1>=4 [1003 13 31 31] [1108 13 31 31]
set trans.rec 					                                    * scale p1>=4 [1073 13 49 32] [1178 13 49 32]
set trans.custom.empty                                              * scale p1>=4 [1105 13 19 32] [1210 13 19 32]

;set trans.status		                                    * scale p1>=4 [470 13 173 43 0 0 0 0] [475 13 273 43 0 0 0 0]
	;set trans.status.margin 		                                        [105 1 5 1]

set trans.status                                            * scale p1>=4 [470 13 173 43 0 1 0 0] [575 13 173 43 0 1 0 0] 
set trans.status.margin 		                                        [5 1 TransFont 1 0] 
;set trans.status                                            * scale p1>=4 [470 13 173 43 0 0 0 0] [575 13 173 43 0 0 0 0]
;set trans.status.margin 		                                        [5 1 5 1]


set trans.curtimesig				                                * scale p1>=4 [636 57 54 20 0 0 0 0] [741 57 54 20 0 0 0 0]
	set trans.curtimesig.color 	                        	                PTGreen
	set trans.curtimesig.font                                         scale{0}==1 [3] scale{0}==1.5 [9] scale{0}==2 [9]

set trans.rate.fader.fadermode                                              [0]
set trans.rate.fader                                                * scale p1>=4 [854 49 84 6 0 0 0 0] [959 49 84 6 0 0 0 0]
     set trans.rate.fader.color                                             [0 0 0 255 212 212 212 255]

set trans.rate 					                                    * scale p1>=4 [861 23 70 18 0 0 0 0] [966 23 70 18 0 0 0 0]
set trans.rate.margin 			                                            [0 10 0 0]
     set trans.rate.color                                                   PTGreen
     set trans.rate.font                                              scale{0}==1 [3] scale{0}==1.5 [9] scale{0}==2 [9]

set trans.bpm.tap 					                                * scale p1>=4 [461 56 50 20 0 0 0 0] [566 56 50 20 0 0 0 0]
	set trans.bpm.tap.color 		                                        PTWhite
	set trans.bpm.tap.font                                            scale{0}==1 [3] scale{0}==1.5 [9] scale{0}==2 [9]
set trans.bpm.edit                                                  * scale p1>=4 [568 57 27 15 0 0 0 0] [673 57 27 15 0 0 0 0] ;605
set trans.bpm.edit.margin                                                   [2 3 0 0]
     set trans.bpm.edit.color                                               PTGreen
     set trans.bpm.edit.font                                          scale{0}==1 [3] scale{0}==1.5 [9] scale{0}==2 [9]
set trans.sel 						                                       p1>=4 [696 -3 67 57 0 0 0 0] [801 -3 67 57 0 0 0 0]
	set trans.sel.margin 			                                * scale [1000 -10 -10 -10]
	set trans.sel.color 			                                        PTGreen
	set trans.sel.font                                                scale{0}==1 [3] scale{0}==1.5 [9] scale{0}==2 [9]

set trans.repeat 				                                    * scale p1>=4 [418 55 31 20 0 0 0 0] [523 55 31 20 0 0 0 0]
set trans.automode                                        p1==5 [0] * scale p1>=4 [1155 16 33 7 0 0 0 0] [1260 16 33 7 0 0 0 0]

set trans.custom.053                                                * scale p1>=4 [128 0 327 84] [233 0 327 84] ;smart tool bg
set trans.custom.001                                                * scale p1>=4 [394 13 37 31] [499 13 37 31] ;pencli
set trans.custom.002                                                * scale p1>=4 [356 13 38 31] [461 13 38 31] ;jog
set trans.custom.003                                                * scale p1>=4 [311 13 38 31] [416 13 38 31] ;hand
set trans.custom.004                                                * scale p1>=4 [273 13 38 31] [378 13 38 31] ;sel
set trans.custom.005                                                * scale p1>=4 [234 13 39 31] [339 13 39 31] ;move
set trans.custom.006                                                * scale p1>=4 [190 13 37 31] [295 13 37 31] ;zoom
set trans.custom.007                                                * scale p1>=4 [227 5 129 39] [332 5 129 39] ;smart tool top
set trans.custom.008                                                * scale p1>=4 [346 55 31 20] [451 55 31 20] ;markerlist
set trans.custom.009                                                * scale p1>=4 [382 55 31 20] [487 55 31 20] ;fixedlane
set trans.custom.010                                                * scale p1>=4 [310 55 31 20] [415 55 31 20] ;envfollow
set trans.custom.011                                                * scale p1>=4 [244 55 31 20] [349 55 31 20] ;transient
set trans.custom.012                                                * scale p1>=4 [208 55 31 20] [313 55 31 20] ;peak window
set trans.custom.013                                                * scale p1>=4 [172 55 31 20] [277 55 31 20] ;snabgrid
set trans.custom.054                                                * scale p1>=4 [136 55 31 20] [241 55 31 20] ;ttab
set trans.custom.055                                                * scale p1>=4 [154 19 31 20] [259 19 31 20] ;zoom
set trans.custom.014                                                * scale [0 0 128 83]                        ;grid

set trans.custom.015                                     p1>=4 [0]  * scale [128 0 105 84] ;zoom
set trans.custom.016                                     p1>=4 [0]  * scale [136 13 14 31] ;zoomin
set trans.custom.017                                     p1>=4 [0]  * scale [150 13 31 31] ;trackin
set trans.custom.018                                     p1>=4 [0]  * scale [181 13 31 31] ;trackout
set trans.custom.019                                     p1>=4 [0]  * scale [212 13 14 31] ;zoomout

set trans.custom.020                                     p1>=4 [0]  * scale [136 55 18 20] ;preset 1
set trans.custom.021                                     p1>=4 [0]  * scale [154 55 18 20] ;preset 2
set trans.custom.022                                     p1>=4 [0]  * scale [172 55 18 20] ;preset 3
set trans.custom.023                                     p1>=4 [0]  * scale [190 55 18 20] ;preset 4
set trans.custom.024                                     p1>=4 [0]  * scale [208 55 18 20] ;preset 5

set trans.custom.025                                                * scale [16 27 48 15] ;shuffle
set trans.custom.026                                                * scale [16 43 48 15] ;slip
set trans.custom.027                                                * scale [65 27 48 15] ;spot
set trans.custom.028                                                * scale [65 43 48 15] ;grid

set trans.custom.029                                                * scale p1>=4 [686 60 16 11] [791 60 16 11] ;spectrogram
set trans.custom.030                                                * scale p1>=4 [705 60 9 11] [810 60 9 11]   ;notes
set trans.custom.031                                                * scale p1>=4 [717 60 12 12] [822 60 12 12] ;projectsettings
set trans.custom.050                                                * scale p1>=4 [732 60 12 12] [837 60 12 12] ;unfreeze
set trans.custom.051                                                * scale p1>=4 [746 60 12 12] [851 60 12 12] ;solo
set trans.custom.052                                                * scale p1>=4 [760 60 12 12] [865 60 12 12] ;mute

set trans.custom.035                                                * scale p1>=4 [798 0 151 84] [903 0 151 84] ;gridbg

set trans.custom.036                                                * scale p1>=4 [808 27 36 11] [913 27 36 11] ;grid
set trans.custom.037                                                * scale p1>=4 [809 45 36 11] [914 45 36 11] ;nudge

set trans.custom.032                                                * scale p1>=4 [1002 55 32 20] [1107 55 32 20] ;nudgeL
set trans.custom.033                                                * scale p1>=4 [1038 55 32 20] [1143 55 32 20] ;nudgeR
set trans.custom.034                                                * scale p1>=4 [956 0 173 84] [1061 0 173 84]  ;controlbg

set trans.custom.038                                     p1==5 [0]  * scale p1>=4 [1127 0 159 84] [1232 0 159 84] ;extcontrol
set trans.custom.039                                     p1==5 [0]  * scale p1>=4 [1136 58 31 20] [1241 58 31 20] ;midi
set trans.custom.040                                     p1==5 [0]  * scale p1>=4 [1171 58 31 20] [1276 58 31 20] ;metronome
set trans.custom.041                                     p1==5 [0]  * scale p1>=4 [1206 58 31 20] [1311 58 31 20] ;itemruler
set trans.custom.042                                     p1==5 [0]  * scale p1>=4 [1241 58 31 20] [1346 58 31 20] ;loudness

set trans.custom.045                                     p1==5 [0]  * scale p1>=4 [1228 13 29 9] [1325 25 29 9] ;mixer
set trans.custom.046                                     p1==5 [0]  * scale p1>=4 [1228 25 31 9] [1325 37 31 9] ;video
set trans.custom.047                                     p1==5 [0]  * scale p1>=4 [1224 37 31 9] [1321 13 31 9] ;matrix

set trans.custom.048                                     p1==5 [0]  * scale p1>=4 [1161 38 33 9] [1266 38 33 9] ;tempo
set trans.custom.049                                     p1==5 [0]  * scale p1>=4 [1166 27 27 7] [1271 27 27 7] ;meter

set trans.custom.043                                     p1>=3 [0]  * scale p1<=-1 [0] [1400 58 31 20] ;timebase
set trans.custom.044                                     p1>=3 [0]  * scale p1<=-1 [0] [1435 58 31 20] ;extsync

;set trans.custom.theme                                   p1>=3 [0] * scale [1400 7 85 46] 

set trans.custom.render                                  p1>=2 [0]  * scale p1<=-2 [0] p1<=-1 [1389 0 90 84] [1492 0 90 84] ;renderbg
set trans.custom.rdr                                     p1>=2 [0]  * scale p1<=-2 [0] p1<=-1 [1409 27 50 11] [1512 27 50 11] ;render

set trans.custom.item                                    p1>=1 [0]  * scale p1<=-2 [1388 0 231 84] p1<=-1 [1476 0 231 84] [1579 0 231 84] 
set trans.custom.q                                       p1>=1 [0]  * scale p1<=-2 [1402 58 106 20] p1<=-1 [1490 58 106 20] [1593 58 106 20] 
set trans.custom.op                                      p1>=1 [0]  * scale p1<=-2 [1512 58 106 20] p1<=-1 [1600 58 106 20] [1703 58 106 20] 
set trans.custom.vmk                                     p1>=1 [0]  * scale p1<=-2 [1405 15 100 15] p1<=-1 [1493 15 100 15] [1596 15 100 15]
set trans.custom.learnmidi                               p1>=1 [0]  * scale p1<=-2 [1511 15 100 15] p1<=-1 [1599 15 100 15] [1702 15 100 15]
set trans.custom.expmidi                                 p1>=1 [0]  * scale p1<=-2 [1511 33 100 15] p1<=-1 [1599 33 100 15] [1702 33 100 15] 
set trans.custom.sclfdr                                  p1>=1 [0]  * scale p1<=-2 [1405 33 100 15] p1<=-1 [1493 33 100 15] [1596 33 100 15] 

set w1170								* scale 1170
set trans.custom.layout * scale w<w1170 [0] [1030 7 17 18 1 0 1 0]

endMacro
drawTrans 1.0

Layout "⇛200%" "200"
drawTrans 2.0
set trans.sel 						                            p1>=4 [1392 4 134 104] [1602 4 134 104]
EndLayout

;TRACK-------------------------------------------------------------------------------------------------------------------

macro drawTcp scale
clear tcp.*
front tcp.trackidx front tcp.custom.021 tcp.custom.name1 tcp.custom.name2 tcp.custom.name3 tcp.custom.name4 tcp.custom.name5 tcp.custom.grp tcp.meter tcp.custom.colorlb tcp.custom.006 tcp.custom.007 tcp.custom.008 tcp.custom.009 tcp.custom.012 tcp.custom.013 tcp.custom.014 tcp.custom.017 tcp.custom.018 tcp.custom.019 tcp.custom.020 tcp.custom.015 tcp.custom.016 tcp.io tcp.fx tcp.fxbyp tcp.fxembed tcp.fxparm tcp.sendlist tcp.folder set tcp.foldercomp tcp.recarm tcp.recmon tcp.solo tcp.mute tcp.fxin tcp.env tcp.phase tcp.label tcp.volume.label tcp.recmode tcp.pan.label tcp.pan tcp.width.label tcp.width tcp.volume tcp.recinput tcp.recmode tcp.custom.001 
front tcp.custom.002 tcp.custom.003 tcp.custom.004 tcp.custom.005 tcp.custom.fbtn tcp.custom.056 tcp.custom.057 tcp.custom.058 tcp.custom.knobline

trackhw

set fxshown tcp_fxparms==0 0

;This is a way to color it by controlling the transparency
custom tcp.custom.tcpBgBox
set tcp.custom.tcpBgBox 				             * scale [16 0 249 124 0 0 1 1]
set tcp.custom.tcpBgBox.color 				                 [0 0 0 0 tcpBgColR tcpBgColR tcpBgColR ColorBG]

set sizedefault * scale [280 122 405 0]
set sizesmall   * scale [280 122 332 0]
set sizecompact * scale [280 122 252 0]

set tcp.size 				                                            sizedefault
set tcp.size !tcp_fxlist_enabled sizesmall
set tcp.size ?tcp_sends_enabled sizesmall

set tcp.size !tcp_fxlist_enabled==?tcp_sends_enabled tcp.size sizecompact
;set tcp.size + + * folderdepth [0 0 -10 0] * maxfolderdepth [0 0 10 0]

set tcp.size  +:folderdepth:1    [0 0 -10 0]
set tcp.size  +:maxfolderdepth:1 [0 0 10 0]

set tcp.margin +:maxfolderdepth:1                                           [0 0 0 0]
set tcp.margin +:folderdepth:1                                              [0 0 0 0]

set tcp.trackidx 				                                    * scale h<th35 [15 0 265 122 0 0 1 0] [15 0 265 122 0 0 1 1]
	set tcp.trackidx.color 				                                    PTWhite
	set tcp.trackidx.font 				                                    scale{0}==1 [2] scale{0}==1.5 [8] scale{0}==2 [8]
	set tcp.trackidx.margin 				                                [-350 5 0 0] 

set tcp.trackidx.margin p2>0                                        * scale h>th830 [-350 5 1 1] h<th45 [-350 5 1 1] [-12 5 1 1 ;[-12 5 1 1 0 1 1 0] 
set tcp.trackidx.color p2>0                                         ?recarm [255 0 0]
;set tcp.folder 				                                        * scale [2 3 12.1 12.1 0 0 0 0]
	;set tcp.foldercomp 				                                * scale h<th58 [0] ?folderstate [2 95 12.1 12.1 0 1 0 1] [2 105 12.1 12.1 0 1 0 1]

;set tcp.folder 				                                        * scale h<th58 [2 3 12.1 12.1 0 0 0 0] !folderstate [2 3 12.1 12.1 0 0 0 0] [2 95 12.1 12.1 0 1 0 1]
	;set tcp.foldercomp 				                                * scale h<th58 [0] ?folderstate [2 3 12.1 12.1 0 0 0 0] [2 105 12.1 12.1 0 1 0 1]



set tcp.label 			     	                                    * scale h<th35 [19 4 46 16 0 0 0 0] [17 2 100 16 0 0 0 0] 
	set tcp.label.color                                                     [0 0 0 0 0 0 0 1]
	set tcp.label.font 				                                  scale{0}==1 [0] scale{0}==1.5 [10] scale{0}==2 [10]
	set tcp.label.margin 				                                    [3 0 3 0 0.5]
;set tcp.label.color p3>0 ?recarm                                            [255 0 0 0 0 0 0 1]

set tcp.recarm                                                      * scale h<th35 [64 2 22 20] h<th58 [20 20 18 18] [20 21 22 20]
set tcp.recmon                                                      * scale h<th35 [79 2 22 20] h<th58 [33 20 18 18] [46 21 22 20]
set tcp.solo                                                        * scale h<th35 [94 2 22 20] h<th58 [46 20 18 18] [73 21 22 20]
set tcp.mute                                                        * scale h<th35 [109 2 22 20] h<th58 [58 20 18 18] [100 21 22 20]

set tcp.fx 				                                            * scale h<th79 [0] [20 43 105 18 0 0 0 0] 
	set tcp.fxbyp 				                                    * scale h<th35 [0] h<th58 [75 20 29 20 0 0 0 0] h<th79 [46 43 29 20 0 0 0 0] [33 61 29 20 0 0 0 0]
	set tcp.fxin 				                                    * scale h<th58 [0] h<th79 [33 44 13 17 0 0 0 0] h<th96 [0] [20 80 13 17 0 0 0 0]

set tcp.env 				                                        * scale h<th58 [0] h<th79 [75 44 52 17 0 0 0 0] [63 62 62 17 0 0 0 0]
set tcp.phase 				                                        * scale h<th58 [0] h<th79 [19 44 13 17 0 0 0 0] [20 62 13 17 0 0 0 0]

set tcp.recmode                                                     * scale h<th71 [227 1 36 20 1 0 1 0] [184 23 76 20 1 0 1 0]
set tcp.io 				                                            * scale h<th71 [180 2 46 20 1 0 1 0] [184 3 76 20 1 0 1 0] 

set tcp.recinput                                                    * scale h<th35 [0] h<th58 [104 20 24 20 0 0 0 0] h<th96 [0] [33 79 92 20 0 0 0 0]
	set tcp.recinput.color 				                                    PTrecinput
	set tcp.recinput.font 				                              scale{0}==1 [2] scale{0}==1.5 [11] scale{0}==2 [11]
	set tcp.recinput.margin 			                              os_type==0  scale{0}==1 h<th58 [0 0 12 0 0] [4 0 12 0 0.5] scale{0}==1.5 h<th58 [0 0 26 0 0] [4 0 26 0 0.5] scale{0}==2 h<th58 [0 0 26 0 0] [4 0 26 0 0.5]
    set tcp.recinput.margin                                           os_type==1  scale{0}==1 h<th58 [0 0 12 0 0] [4 0 12 0 0.5] scale{0}==1.5 h<th58 [0 0 26 0 0] [4 0 26 0 0.5] scale{0}==2 h<th58 [0 0 26 0 0] [4 0 26 0 0.5]

set tcp.volume 				                                        * scale h<th71 [184 24 77 16 1 0 1 0] h<th83 [184 49 77 18 1 0 1 0] [184 49 77 16 1 0 1 0]
    set tcp.volume.label 				                            * scale h<th71 [184 22 77 18 1 0 1 0] h<th79 [184 48 77 18 1 0 1 0] [184 48 77 32 1 0 1 0]
	set tcp.volume.label.color 				                                PTGreen
	set tcp.volume.label.font 				                          scale{0}==1 [-1] scale{0}==1.5 [8] scale{0}==2 [8]
	set tcp.volume.label.margin 			                                h<79 [0 1 10 0 1] [0 -15 10 0 1]
    set tcp.volume.fadermode 		                                        [1]
	
set tcp.custom.knobline  * scale h<th79 [0] trackpanmode<=3 [0] trackpanmode>=5 [222 63 1 13 1 0 1 0] 

set tcp.pan.label 				                                    * scale h<th79 [0] trackpanmode<=3 [207 65 33 13 1 0 1 0] trackpanmode>=5 [188 65 33 13 1 0 1 0]
	set tcp.pan.label.color 			                                    PTGreen
	set tcp.pan.label.font 				                              scale{0}==1 [-1] scale{0}==1.5 [8] scale{0}==2 [8]
	set tcp.pan.label.margin 			                                    trackpanmode<=3 [0 0 0 0 0.5] trackpanmode>=5 [0 0 0 0 1]
	set tcp.pan.fadermode 				                                    [1]
	set tcp.pan                                                     * scale h<th79 [0] trackpanmode<=3 [207 65 33 13 1 0 1 0] trackpanmode>=5 [188 65 33 13 1 0 1 0]


set tcp.width.label 				                                * scale h<th79 [0] trackpanmode<=3 [0] trackpanmode>=5 [222 65 33 13 1 0 1 0]
	set tcp.width.label.color 				                                PTGreen
	set tcp.width.label.font 				                          scale{0}==1 [-1] scale{0}==1.5 [8] scale{0}==2 [8]
	set tcp.width.label.margin 				                                [0 0 0 0 0.5]
	set tcp.width.fadermode 				                                [1]
	set tcp.width 				                                    * scale h<th79 [0] trackpanmode<=3 [0] trackpanmode>=5 [222 65 33 16 1 0 1 0]

set tcp.meter 			  	                                        * scale h<40 [0] [134 3 13 116 0 0 0 1] 
	;set tcp.meter.inputlabel.color 				                        [0 0 0 0]
	;set tcp.meter.inputlabelbox.color 				                        [0 0 0 0 0 0 0 0]
	set tcp.meter.readout.color 				                            [0 0 0]
	set tcp.meter.rmsreadout.color 				                            [0 0 0]
	set tcp.meter.vu.div 				                                    [1 -1]

set tcp.fxparm                                                      os_type==0 * scale !tcp_sends_enabled [27 4 70 117 1 0 1 1] [98 4 74 117 1 0 1 1]  
set tcp.fxparm                                                      os_type==1 * scale !tcp_sends_enabled [27 4 70 117 1 0 1 1] [98 4 74 117 1 0 1 1]
set tcp.fxparm                                                      !tcp_fxlist_enabled + tcp_fxparms 0 tcp.fxparm 
set tcp.fxparm.visflags [0 0 0] ;param,fx,send -1=force hide 0=default 1=force show


;set tcp.fxlist.margin  * scale [13 0 3 0 1] ;[13 0 3 0 1]
;set fx_width h>50 11 tcp_fxparms>4 11 12
set tcp.fxparm.font               os_type==0 scale{0}==1 [1 18 22 90 1] scale{0}==1.5 [8 36 22 180 1] scale{0}==2 [8 36 22 180 1]
set tcp.fxparm.font               os_type==1 scale{0}==1 [1 18 22 90 1] scale{0}==1.5 [8 36 22 180 1] scale{0}==2 [8 36 22 180 1]
set tcp.fxparm.margin 	          os_type==0 * scale [13 0 3 0 1] ;[13 0 3 0 1]
set tcp.fxparm.margin 	          os_type==1 scale{0}==1 [12 0 3 0 1] scale{0}==1.5 [50 0 6 0 1] scale{0}==2 [50 0 6 0 1]
;* scale [25 0 3 0 1]

set tcp.sendlist 						                           os_type==0 * scale w<tw325 [0] !tcp_sends_enabled [103 4 70 117 1 0 1 1] [0] 
set tcp.sendlist                                                   os_type==1 * scale w<tw325 [0] !tcp_sends_enabled [103 4 70 117 1 0 1 1] [0]
;set send_width h>50 11 tcp_sendlist>4 11 12
set tcp.sendlist.font             os_type==0 scale{0}==1 [1 18 22 90 1] scale{0}==1.5 [8 36 22 180 1] scale{0}==2 [8 36 22 180 1] ;72
set tcp.sendlist.font             os_type==1 scale{0}==1 [1 18 22 90 1] scale{0}==1.5 [8 36 22 180 1] scale{0}==2 [8 36 22 180 1] ;[8 36 36 60 1]

set tcp.sendlist.margin           os_type==0 * scale [14 0 -2 10 0] ;14 0 4 10 0
set tcp.sendlist.margin           os_type==1 scale{0}==1 [14 0 -2 10 0] scale{0}==1.5 [52 0 2 10 0] scale{0}==2 [52 0 2 10 0] ;4,8

;* scale [26 0 4 10 0] 

set fxlarge   * scale [149 4 -57 120 0 0 1 1] 
set fxsmall   * scale [149 4 -128 120 0 0 1 1]
set fxlistoff * scale [149 4 -57 120 0 0 1 1]
set fxsendoff * scale [149 4 -57 120 0 0 1 1]
set fxsendclear 
set fxclear [0]

set tcp.fxembed fxsmall
set tcp.fxembed !tcp_fxlist_enabled fxlistoff
set tcp.fxembed ?tcp_sends_enabled fxsendoff
set tcp.fxembed ?tcp_fxlist_enabled!=!tcp_sends_enabled!=?tcp_sends_enabled==fxshown{0}==1 tcp.fxembed 0
set tcp.fxembedheader.color                                               [216 216 216]
;set tcp.fxembed p3>0                                                       [0]
set tcp.fxembed  + + * folderdepth [-10 0 10 0] * maxfolderdepth [10 0 -10 0]

;set tcp.fxparm p7>0				[159 4 13 116 0 0 1 1] 
;set tcp.sendlist p7>0  [0]
;set tcp.size p4>0 [280 122 250 0]

;set tcp.custom.001 [3 97 11 11]
set tcp.custom.001 * scale h<th35  [0] [3 108 11 11 0 1 0 1]              ;envelope button
set tcp.custom.002 * scale h>th188 [0] [265 1 15 190 1 0 1 0]             ;track minimum button
set tcp.custom.003 * scale h<th188 [0] h>th380 [0] [265 1 15 380 1 0 1 0] ;track minimum button
set tcp.custom.004 * scale h<th380 [0] h>th598 [0] [265 1 15 596 1 0 1 0] ;track minimum button
set tcp.custom.005 * scale h<th598 [0] [265 1 15 1196 1 0 1 0]            ;track minimum button
set tcp.custom.006 * scale h<th58  [0] [21 21 20 20]                      ;bg
set tcp.custom.007 * scale h<th58  [0] [47 21 20 20]                      ;bg
set tcp.custom.008 * scale h<th58  [0] [74 21 20 20]                      ;bg 
set tcp.custom.009 * scale h<th58  [0] [101 21 20 20]                     ;bg
;set tcp.custom.014 * scale h<th35  [71 4 56 16] [0]                      ;name label bg
set tcp.custom.056     [0]                                                ;use for midi layout, not normal track
set tcp.custom.057     [0]                                                ;;
set tcp.custom.058     [0]                                                ;;

set tcp.custom.colorlb * scale h<th35 [1 1 15 121 0 0 0 1] [1 1 15 120 0 0 0 1]

set tcp.custom.021				                                        * scale [2 3 12.1 12.1 0 0 0 0] h<th58 [0] [2 95 12.1 12.1 0 1 0 1]
front tcp.custom.021

set tcp.custom.fbtn [0] ;not using

set tcp.custom.name1   * scale h<th35 [0] !track_selected [17 1 112 17] [0] ;name label
set tcp.custom.name2   * scale h<th35 [0] ?track_selected [17 1 112 17] [0] 
set tcp.custom.name3   * scale h<th35 !track_selected [19 4 46 16] [0]
set tcp.custom.name4   * scale h<th35 ?track_selected [19 4 46 16] [0]
set tcp.custom.name5   [0]
set tcp.custom.grp     * scale h<th35 [0] [118 2 11 16] ;track group button
endMacro
drawTcp 1.0

Layout "⇛200%" "200"
drawTcp 2.0
trackhw
set tcp.volume.label.margin 			                        h<158 [0 1 10 0 1] [0 -30 10 0 1]
;set tcp.fxembed  + + * folderdepth [-10 0 10 0] * maxfolderdepth [10 0 -10 0] 
set tcp.fxembed +:folderdepth:1     [-10 0 10 0]
set tcp.fxembed +:maxfolderdepth:1  [10 0 -10 0]
set tcp.size  +:folderdepth:1       [0 0 -10 0]
set tcp.size  +:maxfolderdepth:1    [0 0 10 0]
EndLayout


;TRACK MASTER-------------------------------------------------------------------------------------------------------------------

macro drawMasterTcp scale

clear master.tcp.*
front master.tcp.custom.006 master.tcp.custom.007 master.tcp.custom.008 master.tcp.custom.009 master.tcp.custom.010 master.tcp.custom.011 master.tcp.custom.012 master.tcp.custom.013 master.tcp.solo master.tcp.mute master.tcp.fx master.tcp.fxbyp master.tcp.fxparm  master.tcp.label master.tcp.pan.label master.tcp.pan master.tcp.width.label master.tcp.width master.tcp.custom.001
front master.tcp.custom.002 master.tcp.custom.003 master.tcp.custom.004 master.tcp.custom.005 master.tcp.custom.knobline

trackhw

set MTsizedefault * scale [280 122 405 0]
set MTsizesmall   * scale [280 122 332 0]
set MTsizecompact * scale [280 122 252 0]

set master.tcp.size                                                      MTsizedefault
set master.tcp.size !tcp_fxlist_enabled MTsizesmall 
set master.tcp.size ?tcp_sends_enabled MTsizesmall 
set master.tcp.size !tcp_fxlist_enabled==?tcp_sends_enabled master.tcp.size MTsizecompact
set master.tcp.size + + * folderdepth [0 0 -10 0] * maxfolderdepth [0 0 10 0]

    set master.tcp.margin +:maxfolderdepth:1                               [0 0 0 0]
    set master.tcp.margin +:folderdepth:1                                  [0 0 0 0]

set master.tcp.label                                                * scale h<th25 [17 0 100 17 0 0 0 0] [17 2 100 17 0 0 0 0]
    set master.tcp.label.color                                             [0 0 0 0 0 0 0 1]
    set master.tcp.label.font tcp.label.font
    set master.tcp.label.margin                                            [3 0 3 0 0.5] 

set master.tcp.mono                                                  h<th79 [0] [20 62 41 17 0 0 0 0]
set master.tcp.solo                                                  * scale h<th35 [0] h<th58 [46 20 18 18] [73 21 22 20]
set master.tcp.mute                                                  * scale h<th35 [0] h<th58 [58 20 18 18] [100 21 22 20]
set master.tcp.env                                                   * scale h<th59 [0] h<th79 [75 44 52 17 0 0 0 0] [62 62 62 17 0 0 0 0]
set master.tcp.fx                                                    * scale h<th79 [0] [20 43 105 18 0 0 0 0] 
set master.tcp.fxbyp                                                 * scale h<th71 [227 2 36 20 1 0 1 0] [184 23 76 20 1 0 1 0]
set master.tcp.io tcp.io                                             * scale h<th71 [180 2 46 20 1 0 1 0] [184 3 76 20 1 0 1 0] 

set master.tcp.volume.label                                          * scale h<th35 [0] h<th71 [184 22 77 18 1 0 1 0] h<th79 [184 43 77 18 1 0 1 0] [184 43 77 32 1 0 1 0]
    set master.tcp.volume.label.color                                      PTGreen
    set master.tcp.volume.label.font                                   scale{0}==1 [-1] scale{0}==1.5 [8] scale{0}==2 [8]
    set master.tcp.volume.label.margin                                 h<79 [0 1 10 0 1] [0 -15 10 0 1]

set master.tcp.volume.fadermode                                             [1]
set master.tcp.volume                                                * scale h<th71 [184 22 77 26 1 0 1 0] h<83 [184 35 77 26 1 0 1 0] [184 35 77 26 1 0 1 0]

set master.tcp.custom.knobline * scale h<th79 [0] [222 58 1 13 1 0 1 0] 

set master.tcp.pan.fadermode                                                [1]
    set master.tcp.pan                                                * scale h<th79 [0] [188 65 33 13 1 0 1 0]
    set master.tcp.pan.label                                          * scale h<79 [0] [188 60 33 13 1 0 1 0]
    set master.tcp.pan.label.color                                         PTGreen
    set master.tcp.pan.label.font                                       scale{0}==1 [-1] scale{0}==1.5 [8] scale{0}==2 [8]
    set master.tcp.pan.label.margin                                        [0 0 0 0 1]

set master.tcp.width.fadermode                                              [1]
    set master.tcp.width                                             * scale h<th79 [0] [222 65 33 13 1 0 1 0]
    set master.tcp.width.label                                       * scale h<th79 [0] [222 60 33 13 1 0 1 0]
    set master.tcp.width.label.color                                       PTGreen
    set master.tcp.width.label.font                                    scale{0}==1 [-1] scale{0}==1.5 [8] scale{0}==2 [8]
    set master.tcp.width.label.margin                                      [0 0 0 0 0.5]

set master.tcp.meter                                                  * scale h<5 [0] [134 3 14 116 0 0 0 1] 
    set master.tcp.meter.readout.color                                     [0 0 0]

set master.tcp.meter.vu.div [1 -1]

set master.tcp.fxparm                                                 * scale !tcp_sends_enabled [27 4 70 117 1 0 1 1] [98 4 74 117 1 0 1 1]  ;w<334
set master.tcp.fxparm                                                         !tcp_fxlist_enabled + tcp_fxparms 0 master.tcp.fxparm 

    set master.tcp.fxparm.font                                         scale{0}==1 [1 18 61 90 1] scale{0}==1.5 [8 36 122 180 1] scale{0}==2 [8 36 122 180 1]
    set master.tcp.fxparm.margin                                       os_type==0 * scale [13 0 3 0 1]
    set master.tcp.fxparm.margin 	                                   os_type==1 scale{0}==1 [12 0 3 0 1] scale{0}==1.5 [50 0 6 0 1] scale{0}==2 [50 0 6 0 1]
set master.tcp.sendlist                                              * scale w<tw325 [0] !tcp_sends_enabled [102 4 70 117 1 0 1 1] ; w<405
    set master.tcp.sendlist.font                                       scale{0}==1 [1 18 61 90 1] scale{0}==1.5 [8 36 122 180 1] scale{0}==2 [8 36 122 180 1]
    set master.tcp.sendlist.margin                                     os_type==0 * scale [14 0 4 10 0]
    set master.tcp.sendlist.margin                                     os_type==1 scale{0}==1 [14 0 4 10 0] scale{0}==1.5 [52 0 8 20 0] scale{0}==2 [52 0 8 20 0] 

set mfxlarge   * scale [149 4 -57 120 0 0 1 1] 
set mfxsmall   * scale [149 4 -128 120 0 0 1 1]
set mfxlistoff * scale [149 4 -57 120 0 0 1 1]
set mfxsendoff * scale [149 4 -57 120 0 0 1 1]

set master.tcp.fxembed                                                mfxsmall
set master.tcp.fxembed !tcp_fxlist_enabled mfxlistoff
set master.tcp.fxembed ?tcp_sends_enabled mfxsendoff
set master.tcp.fxembed ?tcp_fxlist_enabled!=!tcp_sends_enabled!=?tcp_sends_enabled==fxshown{0}==1 master.tcp.fxembed 0

set master.tcp.fxembedheader.color                                     PTWhite
set master.tcp.fxembed  + + * folderdepth [-10 0 10 0] * maxfolderdepth [10 0 -10 0] 

;set master.tcp.fxembed p3>0 [0]

set master.tcp.custom.001 * scale h<th35  [0] [3 108 11 11 0 1 0 1]
set master.tcp.custom.002 * scale h>th188 [0] [265 1 15 190 1 0 1 0]
set master.tcp.custom.003 * scale h<th188 [0] h>th380 [0] [265 1 15 380 1 0 1 0]
set master.tcp.custom.004 * scale h<th380 [0] h>th598 [0] [265 1 15 596 1 0 1 0]
set master.tcp.custom.005 * scale h<th598 [0] [265 1 15 1196 1 0 1 0]
set master.tcp.custom.010 * scale h<th58  [0] [21 21 20 20]
set master.tcp.custom.011 * scale h<th58  [0] [47 21 20 20]
set master.tcp.custom.008 * scale h<th58  [0] [74 21 20 20]
set master.tcp.custom.009 * scale h<th58  [0] [101 21 20 20]

set master.tcp.custom.main * scale [0 0 405 122 0 0 1 1]

custom master.tcp.custom.coloridxbg '' 0 '' 'FileName' ;red color
set master.tcp.custom.coloridxbg                    * scale [0 0 405 122 0 0 1 1]
set master.tcp.custom.coloridxbg.color [0 0 0 0 MasterBG 0 0 MasterCol]

custom master.tcp.custom.coloridxbg2 '' 0 '' 'FileName' ;brightness
set master.tcp.custom.coloridxbg2                   * scale [0 0 405 122 0 0 1 1]
set master.tcp.custom.coloridxbg2.color [0 0 0 0 MasterBG MasterBG MasterBG 255]

endMacro
drawMasterTcp 1.0

Layout "⇛200%" "200"
drawMasterTcp 2.0
set master.tcp.volume.label.margin 			                        h<158 [0 1 10 0 1] [0 -30 10 0 1]
set master.tcp.fxembed  + + * folderdepth [-10 0 10 0] * maxfolderdepth [10 0 -10 0] 
set master.tcp.size + + * folderdepth [0 0 -10 0] * maxfolderdepth [0 0 10 0]
set master.tcp.mono                                                 h<158 [0] [40.5 124 82 34 0 0 0 0]
EndLayout

;EVELOPE-------------------------------------------------------------------------------------------------------------------
;front envcp.custom.envbg envcp.custom.002 envcp.custom.005
macro drawEnv scale 

;set eh42								* scale 42
;set eh59								* scale 59

clear envcp.*
front envcp.custom.colorlb envcp.custom.002 envcp.custom.005 envcp.arm envcp.value envcp.label envcp.mod envcp.bypass envcp.hide envcp.bypass envcp.value envcp.fader envcp.learn
front envcp.custom.003 envcp.custom.004 
trackhw

;custom envcp.custom.colourBox
;set envcpColorDepth 					 	    * envcpColorDepthParam 2
;set envcp.custom.colourBox 					    customColorDepth{0}>0 + + * [1 0 -1] env.custom.sectionNumber{w} [1 0 w h] [-1 0 -1] [0]
;set tcp.custom.colourBox.color 			    [0 0 0 0 trackcolor_r trackcolor_g trackcolor_b customColorDepth{0}]

set envCustomColorRatio 						ColorBG
;set envSelectColRatio 							?env_selected / selectStrength{0} 255 0
set envcpCol									+ * - 1 envSelectColRatio + \
												envCustomColorRatio [trackcolor_r trackcolor_g trackcolor_b envcpColorDepth{0}] \
												* - 1 envCustomColorRatio [envcpBgColR envcpBgColG envcpBgColB] \
												* envSelectColRatio [255 255 255] 
												
brightnessFromRGB 								envcpCol{0} envcpCol{1} envcpCol{2} envcpColBrightness	

;custom envcp.custom.envcpBgBox
;set envcp.custom.envcpBgBox 					[16 0 w h]
;set envcp.custom.envcpBgBox.color 				[0 0 0 0 envcpCol{0} envcpCol{1} envcpCol{2} tcpBgColR] 	;tcpBgColR tcpBgColG tcpBgColB ColorBG
;custom envcp.custom.envcpBgBox
;set envcp.custom.envcpBgBox 					[16 0 w h]
;set envcp.custom.envcpBgBox.color 				[0 0 0 0 envcpCol{0} envcpCol{1} envcpCol{2}]

custom envcp.custom.sectionMainBg
	set envcp.custom.sectionMainBg				* scale [16 0 w h]
	set envcp.custom.sectionMainBg.color		[0 0 0 0 tcpBgColR tcpBgColR tcpBgColR ColorBG]

set envlabelColorRatio 						    0
set envcplabelCol								+ * - 1 envSelectColRatio + \
												envlabelColorRatio [trackcolor_r trackcolor_g trackcolor_b envcpColorDepth] \

brightnessFromRGB 								envcplabelCol{0} envcplabelCol{1} envcplabelCol{2} envcplabelColBrightness	

custom envcp.custom.labelbg
set envcp.custom.labelbg 				            [0 0 16 h] 
set envcp.custom.labelbg.color 			     	[0 0 0 0 envcplabelCol{0} envcplabelCol{1} envcplabelCol{2}]

;These are Envelope lines. When track is folder, line will be appears 
custom envcp.custom.linebg
set envcp.custom.linebg 				           scale{0}==1 [-9 0 1 h]
set envcp.custom.linebg.color 			     	[0 0 0 0 envcplabelCol{0} envcplabelCol{1} envcplabelCol{2}]
custom envcp.custom.linebg2
set envcp.custom.linebg2 				            [-19 0 1 h] 
set envcp.custom.linebg2.color 			     	[0 0 0 0 envcplabelCol{0} envcplabelCol{1} envcplabelCol{2}]
custom envcp.custom.linebg3
set envcp.custom.linebg3 				            [-29 0 1 h] 
set envcp.custom.linebg3.color 			     	[0 0 0 0 envcplabelCol{0} envcplabelCol{1} envcplabelCol{2}]
custom envcp.custom.linebg4
set envcp.custom.linebg4 				            [-39 0 1 h] 
set envcp.custom.linebg4.color 			     	[0 0 0 0 envcplabelCol{0} envcplabelCol{1} envcplabelCol{2}]
custom envcp.custom.linebg5
set envcp.custom.linebg5 				            [-49 0 1 h] 
set envcp.custom.linebg5.color 			     	[0 0 0 0 envcplabelCol{0} envcplabelCol{1} envcplabelCol{2}]

custom envcp.custom.envbg
set envcp.custom.envbg 				           * scale [16 0 w h] 
set envcp.custom.envbg.color 			     	[0 0 0 0 envcplabelCol{0} envcplabelCol{1} envcplabelCol{2}]

;Envelope Size		
set esdefault                                             * scale [268 122 405 12]
set essmall                                               * scale [268 122 332 12]
set escompact                                             * scale [268 122 252 0]

set envcp.size 		 esdefault 

set envcp.size !tcp_fxlist_enabled essmall 
set envcp.size ?tcp_sends_enabled essmall

set envcp.size !tcp_fxlist_enabled==?tcp_sends_enabled envcp.size escompact

set envcp.size  +:folderdepth:1    [0 0 -10 0]
set envcp.size  +:maxfolderdepth:1 [0 0 10 0]

;set envcp.size          +:folderdepth:1     [0 0 10 0]
;set envcp.size          +:maxfolderdepth:1  [0 0 -10 0]
;set envcp.size                      p4>0 [268 122 335 12]

set envcp.margin +:maxfolderdepth:1                                  [0 0 0 0]
set envcp.margin +:folderdepth:1                                     [0 0 0 0] 

set envcp.arm                                                * scale h>th42 [19 22 21 18]

set envcp.label                                              * scale [21 4 104 14]
set envcp.label.font                                           scale{0}==1 [5] scale{0}==1.5 [10] scale{0}==2 [10]
set envcp.label.margin                                       * scale [3 3 1 3]
set envcp.label.color                                                [0]
set envcp.learn                                              * scale h>th59 [48 42 58 16 0 0 0 0] [0]
set envcp.hide                                               * scale h>th42 [48 24 58 16 0 0 0 0] [0]
set envcp.mod                                                * scale h>th59 [106 42 21 16 0 0 0 0]
set envcp.bypass                                             * scale h>th42 [106 23 21 18 0 0 0 0] [0]

set envcp.fader                                              * scale h>th42 [173 3 13 120 1 0 1 1] [173 3 15 115 1 0 1 1]
set envcp.fader.fadermode                                            h>th42 [0] [1]

set envcp.value                                              * scale h>th42 [213 100 50 15 1 1 1 1] [213 105 50 15 1 1 1 1]
set envcp.value.font                                           scale{0}==1 [5] scale{0}==1.5 [8] scale{0}==2 [8]
set envcp.value.margin                                               [0 0 0 0 0]
set envcp.value.color                                                [240 240 240]

;set envcp.custom.001 * scale [16 1 113 120 0 0 0 1]
set envcp.custom.002 * scale [0 0 268 122 0 0 1 1]
set envcp.custom.003 * scale h>th35 [3 15 12 12]  [0]
set envcp.custom.004 * scale [3 3 12 12]
;set envcp.custom.002    +:folderdepth:1     [0 0 -10 0]
;set envcp.custom.002    +:maxfolderdepth:1  [0 0 10 0]
set envcp.custom.005 				           scale{0}==1 [253 0 15 122 1 0 1 1] scale{0}==1.5 [506 0 30 244 1 0 1 1] scale{0}==2 [506 0 30 244 1 0 1 1]

set envcp.custom.colorlb * scale [1 0 15 121 0 0 0 1]

endMacro
drawEnv 1.0

Layout "⇛200%" "200"

drawEnv 2.0

;set envcp.custom.envbg 				        [0] 
;set envcp.custom.sectionMainBg				[33 0 w h]

set envcp.custom.labelbg 					[0 0 33 h]

set envcp.custom.linebg 				            [-18 0 2 h] 
set envcp.custom.linebg2 				            [-38 0 2 h] 
set envcp.custom.linebg3 				            [-58 0 2 h] 
set envcp.custom.linebg4 				            [-78 0 2 h] 
set envcp.custom.linebg5 				            [-98 0 2 h] 

set envcp.size  +:folderdepth:1    [0 0 -10 0]
set envcp.size  +:maxfolderdepth:1 [0 0 10 0]
EndLayout

;MIXER-------------------------------------------------------------------------------------------------------------------

macro drawMcp scale

clear mcp.*
front mcp.trackidx mcp.custom.knobst mcp.custom.knobmn mcp.label mcp.volume.label mcp.env mcp.fxbyp mcp.mute mcp.pan mcp.width mcp.volume mcp.recinput mcp.width.label mcp.width mcp.io mcp.recmode mcp.fxin mcp.fx mcp.fxbyp mcp.solo mcp.mute mcp.recmon mcp.recarm mcp.phase mcp.pan.label mcp.foldercomp mcp.folder mcp.meter mcp.custom.fixline mcp.custom.colorlb mcp.custom.colorlb2

;set foldep0 * folderdepth [0 -12] * maxfolderdepth [0 0]
;set foldep1 * folderdepth [0 0 0 -12] * maxfolderdepth [0 0]
;set foldep2 * maxfolderdepth [0 0 0 -12]

;custom mcp.custom.colourBox
;set customColorDepth 						* customColorDepthParam 2
;set mcp.custom.colourBox 					customColorDepth{0}>0 + + * [1 0 -1] mcp.custom.sectionNumber{w} [1 0 w h] [-1 0 -1] [0]
;set mcp.custom.colourBox.color 				[0 0 0 0 trackcolor_r trackcolor_g trackcolor_b customColorDepth{0}]

;fxsend part, I don't using 'mcp_extmixbg' image
custom mcp.custom.mcpBgBox 
set mcp.custom.mcpBgBox 					os_type==0 scale{0}==1 [3 18 73 331 0 0 0 1] scale{0}==1.5 [6 36 146 662.5 0 0 0 1] scale{0}==2 [6.5 36 146 662.5 0 0 0 1]
set mcp.custom.mcpBgBox 					os_type==1 scale{0}==1 [3 18 73 331 0 0 0 1] scale{0}==1.5 [6 36 146 662.5 0 0 0 1] scale{0}==2 [6.5 36 146 662.5 0 0 0 1]
set mcp.custom.mcpBgBox.color 				[0 0 0 0 10 10 10 170]
;set mcp.custom.mcpBgBox.color              ColorBG>=180 [0 0 0 0 10 10 10 150]

custom mcp.custom.coloridxbg '' 0 '' 'FileName' ;mcp all
set mcp.custom.coloridxbg                   scale{0}==1 [0 15 80 925 0 0 0 1] scale{0}==1.5 [0 30 160 1850 0 0 0 1] scale{0}==2 [0 30 160 1850 0 0 0 1]
set mcp.custom.coloridxbg.color             [0 0 0 0 tcpBgColR tcpBgColR tcpBgColR ColorBG]

;Mixer detail
set mcp.custom.topline                      * scale [0 0 80 4]
set mcp.custom.line_L                       * scale [0 0 1 942 0 0 0 1]
set mcp.custom.line_R                       * scale [79 0 1 942 0 0 0 1]
set mcp.custom.topbg                          scale{0}==1 [3 15 73 3] scale{0}==1.5 [6.5 30 145 6] scale{0}==2 [6.5 30 145.5 6]
set mcp.custom.sidebg_L                       scale{0}==1 [1 15 2 334 0 0 0 1] scale{0}==1.5 [2 30 5 669 0 0 0 1] scale{0}==2 [2 30 5 669 0 0 0 1]
set mcp.custom.sidebg_R                       scale{0}==1 [76 15 3 334 0 0 0 1] scale{0}==1.5 [152 30 6 669 0 0 0 1] scale{0}==2 [152.5 30 6 669 0 0 0 1]

set mcp.size 				                * scale [80 957 80 629]
	;set mcp.margin []

set mcp.custom.fixline 				        * scale [0 955 84 2 0 1 0 1]
set mcp.custom.colorlb                      * scale [1 940 78 12 0 1 0 1]
set mcp.custom.colorlb2                     * scale [1 3 78 12]

set mcp.extmixer.mode 				                                       [1]
;set mcp.extmixer.position * scale + + * folderdepth [0 0 0 0] * maxfolderdepth [0 0 0 0] [3 20 73 330 0 0 0 1]
set mcp.extmixer.position                   * scale [3 20 73 330 0 0 0 1]

set mcp.fxlist.font 				                                scale{0}==1 [1 18] scale{0}==1.5 [8 36] scale{0}==2 [8 36]
set mcp.fxlist.margin 			                                    os_type==0 * scale [16 0 5 0] 
set mcp.fxlist.margin 			                                    os_type==1 scale{0}==1 [16 0 5 0] scale{0}==1.5  [64 0 10 0] scale{0}==2  [64 0 10 0]
set mcp.fxparm.font 				                                      [1 18]
set mcp.fxparm.margin 				                              * scale [2 0 2 10 0]

set mcp.sendlist.font 				                                scale{0}==1 [1 18] scale{0}==1.5 [8 36] scale{0}==2 [8 36]
set mcp.sendlist.margin 			                                os_type==0 scale{0}==1 [14 0 3 5] scale{0}==1.5 [32 0 6 10] scale{0}==2 [32 0 6 10] 
set mcp.sendlist.margin 			                                os_type==1 scale{0}==1 [14 0 3 5] scale{0}==1.5 [60 0 6 10] scale{0}==2 [60 0 6 10]

set mcp.folder                                                    * scale folderstate<0 [58 851 15 13 0 1 0 1] [58 851 15 13 0 1 0 1]

set mcp.recinput 				                                    scale{0}==1 [5 364 69 17 0 1 0 1] scale{0}==1.5 [10 728 138 36 0 1 0 1] scale{0}==2 [10 728 138 36 0 1 0 1]
	set mcp.recinput.color 		                                          PTrecinput
	set mcp.recinput.font                                           scale{0}==1 [2] scale{0}==1.5 [8] scale{0}==2 [11]
	set mcp.recinput.margin 	                                                [4 0 6 0 0.5]

set mcp.recmode 				                                    os_type==0 scale{0}==1 [5 382 57 17 0 1 0 1] scale{0}==1.5 [11 765 114 34 0 1 0 1] scale{0}==2 [11 765 114 34 0 1 0 1]
set mcp.recmode 				                                    os_type==1 scale{0}==1 [5 382 57 17 0 1 0 1] scale{0}==1.5 [11 765 114 34 0 1 0 1] scale{0}==2 [11.5 765 114 34 0 1 0 1]
set mcp.env 				                                        scale{0}==1 [5 417 69 17 0 1 0 1] scale{0}==1.5 [10 834 138 34 0 1 0 1] scale{0}==2 [10 834 138 34 0 1 0 1]

set mcp.fx 		   		                                            scale{0}==1 [6 451 48 19 0 1 0 1] scale{0}==1.5 [12 902 96 38 0 1 0 1] scale{0}==2 [12 903 96 38 0 1 0 1]
	set mcp.fxin 				                                    scale{0}==1 [62 382 12 17 0 1 0 1] scale{0}==1.5 [123 765 24 34 0 1 0 1] scale{0}==2 [123 765 24 34 0 1 0 1]
	set mcp.fxbyp 				                                    scale{0}==1 [54 448 21 28 0 1 0 1] scale{0}==1.5 [108 897 42 56 0 1 0 1] scale{0}==2 [108 897 42 56 0 1 0 1]

;trackpanmode      -- pan mode of track (0=classic 3.x, 3=new balance, 5=stereo pan, 6=dualpan)
;trackpanmode<=3 [0] Mono
;trackpanmode==5 [0] Stereo
;trackpanmode==6 [0] Dual Pan 

set mcp.custom.knobmn * scale trackpanmode<=3 [3 478 73 34 0 1 0 1] trackpanmode>=5 [0]
set mcp.custom.knobst * scale trackpanmode<=3 [0] trackpanmode>=5 [3 478 73 34 0 1 0 1]

;set mcp.pan 				                                        * scale trackpanmode<=3 [17 473 46 46 0 1 0 1] trackpanmode>=5 [-1 473 46 46 0 1 0 1]
set mcp.pan 				                                        scale{0}==1   trackpanmode<=3 [17 473 46 46 0 1 0 1] trackpanmode>=5 [-1 473 46 46 0 1 0 1]
set mcp.pan 				                                        scale{0}==1.5 trackpanmode<=3 [44 952 72 72 0 1 0 1] trackpanmode>=5 [8 952 72 72 0 1 0 1]
set mcp.pan 				                                        scale{0}==2   trackpanmode<=3 [44 952 72 72 0 1 0 1] trackpanmode>=5 [8 952 72 72 0 1 0 1]


;set mcp.pan 				                                        os_type==0 scale{0}==1 [-1 473 46 46 0 1 0 1] scale{0}==1.5 [0 945 92 92 0 1 0 1] scale{0}==2 [-1 945 92 92 0 1 0 1]
;set mcp.pan 				                                        os_type==1 scale{0}==1 [-1 473 46 46 0 1 0 1] scale{0}==1.5 [0 945 92 92 0 1 0 1] scale{0}==2 [-1 945 93 92 0 1 0 1]
	;set mcp.pan.color 				                                      [0 0 0 0 0 0 0 0]
	set mcp.pan.fadermode 		                                          [1]
	set mcp.pan.label 				                              * scale trackpanmode<=3 [23 519 32 14 0 1 0 1] trackpanmode==5 [9 519 32 14 0 1 0 1] trackpanmode==6 [9 519 32 14 0 1 0 1]
	set mcp.pan.label.color 	                                          PTGreen
	set mcp.pan.label.font                                          scale{0}==1 [4] scale{0}==1.5 [8] scale{0}==2 [8]
	set mcp.pan.label.margin 	                                    scale{0}==1 [0 0 0 0 0.5] scale{0}==1.5 [0 0 0 0 0.5] scale{0}==2 [0 7 0 0 0.5]

;set mcp.width 				                                       * scale trackpanmode<=3 [0] trackpanmode>=5 [34 473 46 46 0 1 0 1]
set mcp.width 				                                       scale{0}==1   trackpanmode<=3 [0] trackpanmode>=5 [34 473 46 46 0 1 0 1]
set mcp.width 				                                       scale{0}==1.5 trackpanmode<=3 [0] trackpanmode>=5 [78 952 72 72 0 1 0 1]
set mcp.width 				                                       scale{0}==2.  trackpanmode<=3 [0] trackpanmode>=5 [78 952 72 72 0 1 0 1]



;set mcp.width 				                                       os_type==0 scale{0}==1 [34 473 46 46 0 1 0 1] scale{0}==1.5 [67 945 92 92 0 1 0 1] scale{0}==2 [67 945 92 92 0 1 0 1]
;set mcp.width                                                      os_type==1 scale{0}==1 [34 473 46 46 0 1 0 1] scale{0}==1.5 [67 945 92 92 0 1 0 1] scale{0}==2 [67 945 93 92 0 1 0 1]
	;set mcp.width.color 				                                  [0 0 0 0 0 0 0 0]
	set mcp.width.fadermode 			                                  [1]
	set mcp.width.label 				                          * scale trackpanmode<=3 [0] trackpanmode==5 [42 519 31 14 0 1 0 1] trackpanmode==6 [42 519 31 14 0 1 0 1]
	set mcp.width.label.color 		                                      PTGreen
	set mcp.width.label.font                                        scale{0}==1 [4] scale{0}==1.5 [8] scale{0}==2 [8]
	set mcp.width.label.margin 			                            scale{0}==1 [0 0 0 0 0.5] scale{0}==1.5 [0 0 0 0 0.5] scale{0}==2 [0 7 0 0 0.5]

set mcp.recmon 				                                      * scale [9 542 28 20 0 1 0 1]
set mcp.recarm 				                                      * scale [41 542 28 20 0 1 0 1]
set mcp.solo 				                                      * scale [9 567 28 20 0 1 0 1]
set mcp.mute 				                                      * scale [41 567 28 20 0 1 0 1]

set mcp.volume 				                                        scale{0}==1 [11 593 29 235 0 1 0 1] scale{0}==1.5 [24 1188 56 470 0 1 0 1] scale{0}==2 [24 1188 56 470 0 1 0 1]
	;set mcp.volume.color 				                                  [0 0 0 0 0 0 0 0]
	;set mcp.volume.fadermode 				                              [0]
	set mcp.volume.label 				                          * scale [5 831 41 15 0 1 0 1]
	set mcp.volume.label.color 				                              PTGreen
	set mcp.volume.label.font 				                              scale{0}==1 [-1] scale{0}==1.5 [8] scale{0}==2 [8]
	set mcp.volume.label.margin 			                              [0 0 0 0 0.5]

set mcp.meter 				                                        os_type==0 * scale [56.5 592 13 233 0 1 0 1] os_type==1 * scale [56.5 592 13.5 233 0 1 0 1]
	set mcp.meter.vu.rmsdiv 				                              [1 0]
	set mcp.meter.readout.color 			                              [0 0 0 0]

;set mcp.meter.scale.color.unlit.top       ;[0]
;set mcp.meter.scale.color.unlit.bottom    ;[0]
;set mcp.meter.scale.color.lit.top         ;[0]
;set mcp.meter.scale.color.lit.bottom      ;[0]

set mcp.meter.vu.div 				                                      [1 -1] 
 
set mcp.phase 				                                      * scale [22 842 31 26 0 1 0 1]

set mcp.label 				                                      * scale [4 869 73 15 0 1 0 1]
	set mcp.label.color 				                                  [0 0 0 0 0 0 0 1] [0 0 0 0 0 0 0 1]
	set mcp.label.font 				                                scale{0}==1 [0] scale{0}==1.5 [10] scale{0}==2 [10]
	set mcp.label.margin 				                                  [5 1 6 0 0.5]

set mcp.trackidx 				                                  * scale [0 349 80 607 0 1 0 1] 
	set mcp.trackidx.color                                         ?recarm [191 64 64] PTGreen
	set mcp.trackidx.font 				                            scale{0}==1 [7] scale{0}==1.5 [8] scale{0}==2 [8]
	set mcp.trackidx.margin 				                        os_type==0 * scale [44 561 10 70] os_type==1 * scale [37 542 25 50]
set mcp.io                                                        * scale [8 906 60 26 0 1 0 1] 

;set mcp.trackidx + + * folderdepth [0 0 0 -5] * maxfolderdepth [0 0 0 0]

set mcp.meter p4>0                                                       * scale [57 592 17 233 0 1 0 1]
set mcp.meter.readout.color p4>0                                          [216 216 216 0]
;set mcp.meter p4>0 ?recarm                                               * scale [43 592 30 233 0 1 0 1]

endMacro
drawMcp 1.0

Layout "⇛200%" "200"
drawMcp 2.0
set mcp.extmixer.mode 				                                       [1]
EndLayout

;MIXER MASTER-------------------------------------------------------------------------------------------------------------------

macro drawMasterMcp scale

clear master.mcp.*
front master.mcp.custom.idx master.mcp.label master.mcp.volume master.mcp.width.label master.mcp.solo master.mcp.mute master.mcp.mono master.mcp.menubutton master.mcp.fxbyp master.mcp.pan master.mcp.width master.mcp.io master.mcp.env master.mcp.fx master.mcp.width.label master.mcp.volume master.mcp.pan master.mcp.solo  master.mcp.phase master.mcp.mute master.mcp.mono master.mcp.io master.mcp.volume.label master.mcp.env master.mcp.meter ;mcp.extmixer.position 
front master.mcp.custom.label2 

custom master.mcp.custom.mcpBgBox ;fxsend part
set master.mcp.custom.mcpBgBox 					os_type==0 scale{0}==1 [3 18 73 332 0 0 0 1] scale{0}==1.5 [6 36 146 663.5 0 0 0 1] scale{0}==2 [6.5 36 146 663.5 0 0 0 1]
set master.mcp.custom.mcpBgBox 					os_type==1 scale{0}==1 [3 18 73 332 0 0 0 1] scale{0}==1.5 [6 36 146 663.5 0 0 0 1] scale{0}==2 [6.5 36 146 663.5 0 0 0 1]
set master.mcp.custom.mcpBgBox.color 				[0 0 0 0 10 10 10 170]

custom master.mcp.custom.coloridxbg '' 0 '' 'FileName' ;red color
set master.mcp.custom.coloridxbg                   scale{0}==1 [0 15 80 942 0 0 0 1] scale{0}==1.5 [0 30 160 1883 0 0 0 1] scale{0}==2 [0 30 160 1883 0 0 0 1]
set master.mcp.custom.coloridxbg.color [0 0 0 0 MasterBG 0 0 MasterCol]

custom master.mcp.custom.coloridxbg2 '' 0 '' 'FileName' ;brightness
set master.mcp.custom.coloridxbg2                  scale{0}==1 [0 15 80 942 0 0 0 1] scale{0}==1.5 [0 30 160 1883 0 0 0 1] scale{0}==2 [0 30 160 1883 0 0 0 1]
set master.mcp.custom.coloridxbg2.color [0 0 0 0 MasterBG MasterBG MasterBG 255]

set master.mcp.custom.topline      * scale [0 0 80 4]
set master.mcp.custom.line_L       * scale [0 0 1 976 0 0 0 1]
set master.mcp.custom.line_R       * scale [79 0 1 976 0 0 0 1]
set master.mcp.custom.topbg          scale{0}==1 [3 15 73 3] scale{0}==1.5 [6.5 30 145 6] scale{0}==2 [6.5 30 145.5 6]
set master.mcp.custom.sidebg_L       scale{0}==1 [1 15 2 335 0 0 0 1] scale{0}==1.5 [2 30 5 670 0 0 0 1] scale{0}==2 [2 30 5 670 0 0 0 1]
set master.mcp.custom.sidebg_R       scale{0}==1 [76 15 3 335 0 0 0 1] scale{0}==1.5 [152 30 6 670 0 0 0 1] scale{0}==2 [152.5 30 6 670 0 0 0 1]

set master.mcp.custom.idx          * scale [0 350 80 609 0 1 0 1]
set master.mcp.custom.label        * scale [0 0 79 15]
set master.mcp.custom.label2       * scale [0 942 79 13 0 1 0 1]

set master.mcp.size                                                       * scale [80 959 80 629]

set master.mcp.extmixer.mode                                                      [1]
set master.mcp.extmixer.position                                          * scale [3 20 73 325 0 0 0 1]

set master.mcp.fxlist.font                                                  scale{0}==1 [1 18]  scale{0}==1.5 [8 36]  scale{0}==2 [8 36]
set master.mcp.fxlist.margin                                                os_type==0 * scale [16 0 5 0] 
set master.mcp.fxlist.margin                                                os_type==1  scale{0}==1 [16 0 5 0]  scale{0}==1.5 [64 0 10 0]  scale{0}==2 [64 0 10 0]
set master.mcp.fxparm.font                                                        [1 18]
set master.mcp.fxparm.margin                                              * scale [2 0 2 10 0]

set master.mcp.sendlist.font                                                scale{0}==1 [1 18]  scale{0}==1.5 [8 36]  scale{0}==2 [8 36]
;set master.mcp.sendlist.margin                                             scale{0}==1 [14 0 5 5] scale{0}==1.5 [32 0 10 10] scale{0}==2 [32 0 10 10]
set master.mcp.sendlist.margin 			                                    os_type==0 scale{0}==1 [14 0 5 5] scale{0}==1.5 [32 0 10 10] scale{0}==2 [32 0 10 10] 
set master.mcp.sendlist.margin 			                                    os_type==1 scale{0}==1 [14 0 5 5] scale{0}==1.5 [60 0 10 10] scale{0}==2 [60 0 10 10] 

set master.mcp.menubutton                                                 * scale [5 365 69 17 0 1 0 1]
set master.mcp.mono                                                       * scale [6 383 68 17 0 1 0 1]

set master.mcp.env                                                          scale{0}==1 [5 418 69 17 0 1 0 1] scale{0}==1.5 [11 834 138 34 0 1 0 1] scale{0}==2 [11 835 138 34 0 1 0 1]

set master.mcp.fx                                                           scale{0}==1 [6 451 48 19 0 1 0 1] scale{0}==1.5 [12 903 96 38 0 1 0 1] scale{0}==2 [12 903 96 38 0 1 0 1]
set master.mcp.fxbyp                                                        scale{0}==1 [54 448 21 28 0 1 0 1] scale{0}==1.5 [108 897 42 56 0 1 0 1] scale{0}==2 [108 897 42 56 0 1 0 1]

;set master.mcp.pan                                                         scale{0}==1 [-1 473 46 46 0 1 0 1] scale{0}==1.5 [-1 945 92 92 0 1 0 1] scale{0}==2 [-1 945 92 92 0 1 0 1]
;set master.mcp.pan.color 
;set master.mcp.pan.fadermode                                                      [1]
;set master.mcp.pan.label                                                 * scale [9 519 32 14 0 1 0 1]
;set master.mcp.pan.label.color                                                    PTGreen
;set master.mcp.pan.label.font                                              scale{0}==1 [4]  scale{0}==1.5 [8]  scale{0}==2 [8]
;set master.mcp.pan.label.margin                                                   [0 0 0 0 0.5]
;set master.mcp.width                                                       scale{0}==1 [34 473 46 46 0 1 0 1] scale{0}==1.5 [67 947 92 92 0 1 0 1] scale{0}==2 [67 947 92 92 0 1 0 1]
;set master.mcp.width.color mcp.width.color
;set master.mcp.width.fadermode                                                   [1]
;set master.mcp.width.label                                               * scale [42 519 31 14 0 1 0 1]
;set master.mcp.width.label.color                                                  PTGreen
;set master.mcp.width.label.font                                            scale{0}==1 [4]  scale{0}==1.5 [8]  scale{0}==2 [8]
;set master.mcp.width.label.margin                                                 [0 0 0 0 0.5]

set master.mcp.solo 				                                              * scale [9 568 28 20 0 1 0 1]
set master.mcp.mute 				                                              * scale [41 568 28 20 0 1 0 1]

set master.mcp.volume                                                     * scale [2 595 29 235 0 1 0 1] 
;set master.mcp.volume.color                                                       [0 255 0 255 255 0 0 255]
set master.mcp.volume.fadermode                                                    [0]

set master.mcp.volume.label                                               * scale [5 834 41 15 0 1 0 1]
set master.mcp.volume.label.color                                                 PTGreen
set master.mcp.volume.label.font                                            scale{0}==1 [-1]  scale{0}==1.5 [8]  scale{0}==2 [8]
set master.mcp.volume.label.margin                                                [0 0 0 0 0.5]

set master.mcp.meter                                                        * scale [31 594 39 234 0 1 0 1] 

set master.mcp.meter.readout.color                                                [176 176 176 0]
set master.mcp.meter.rmsreadout.color                                             [176 176 176 0]

set master.mcp.meter.scale.color.unlit.top                                        [0]
set master.mcp.meter.scale.color.unlit.bottom                                     [0]
set master.mcp.meter.scale.color.lit.top                                          [0]
set master.mcp.meter.scale.color.lit.bottom                                       [0]

set master.mcp.meter.vu.div                                                       [1 -1] 
set master.mcp.meter.vu.rmsdiv                                                    [1 -1]

set master.mcp.label                                                      * scale [3 869 73 17 0 1 0 1]
set master.mcp.label.color                                                        [0 0 0 0 0 0 0 1] [0 0 0 0 0 0 0 1]
set master.mcp.label.font                                                   scale{0}==1 [0]  scale{0}==1.5 [8]  scale{0}==2 [8]
set master.mcp.label.margin                                                       [5 1 6 0 0.5]

set master.mcp.io                                                         * scale [9 906 60 27 0 1 0 1]

set master.mcp.meter                  p4>0 * scale [28 594 45 234 0 1 0 1]
;set master.mcp.volume                 p4>0 [0]
;set master.mcp.meter.readout.color    p4>0 [216 216 216 0]
;set master.mcp.meter.rmsreadout.color p4>0 [216 216 216 0]

set master.mcp.meter.scale.color.unlit.top                                       p4>0 [140 140 140]
set master.mcp.meter.scale.color.unlit.bottom                                    p4>0 [140 140 140]
set master.mcp.meter.scale.color.lit.top                                         p4>0 [40 40 40]
set master.mcp.meter.scale.color.lit.bottom                                      p4>0 [40 40 40]


endMacro
drawMasterMcp 1.0

Layout "⇛200%" "200"
drawMasterMcp 2.0
EndLayout



;Layout--------------------------------------------------------------------------
;FOLDER----------FOLDER----------FOLDER----------FOLDER----------FOLDER----------
Layout "Folder" "folder_tcp"
drawTcp 1
tcpfolderHide
set tcp.meter                                          h<5 [0] h<25 [135 8 4 6] [135 9 4 4]                               
set tcp.meter.vu.div 				                                  [0 0]
set tcp.label                                         h<35 [19 7 77 15] [17 7 110 16]
;set tcp.label.margin 				                                  [3 0 3 0 0.5]
set tcp.solo                                          h<35 [94 5 22 20] h<60 [18 29 18 18] [73 29 22 20]
set tcp.mute                                          h<35 [109 5 22 20] h<60 [30 29 18 18] [100 29 22 20]
set tcp.env                                           h<35 [0] h<60 [49 31 62 15] [58 51 62 17 0 0 0 0]

set tcp.custom.010 h<60 [0] [21 29 20 20]
set tcp.custom.011 h<60 [0] [47 29 20 20]
set tcp.custom.019 h<60 [0] [74 29 20 20]
set tcp.custom.020 h<60 [0] [101 29 20 20]
;set tcp.custom.014 h<35 [98 7 31 16] [0]

set custom_fxsmall     h<35 [25 9 74 114 1 0 1 1] [25 9 74 112 1 0 1 1]
set custom_fxlistoff   h<35 [96 9 79 114 1 0 1 1] [96 9 79 112 1 0 1 1]
set custom_fxsendoff   h<35 [96 9 79 114 1 0 1 1] [96 9 79 112 1 0 1 1]
set custom_sendsmall   h<35 [101 9 74 114 1 0 1 1] [101 9 74 112 1 0 1 1]
set custom_sendoff      [0]
set tcp.custom.015 custom_fxsmall
set tcp.custom.015 !tcp_fxlist_enabled custom_fxlistoff
set tcp.custom.015 ?tcp_sends_enabled custom_fxsendoff
set tcp.custom.015 ?tcp_fxlist_enabled!=!tcp_sends_enabled!=?tcp_sends_enabled==fxshown{0}==1 tcp.custom.015 0
set tcp.custom.016 w<tw325 [0] custom_sendsmall
set tcp.custom.016 ?tcp_sends_enabled custom_sendoff

set tcp.custom.tcpBgBox 				                   [129 7 136 124 0 0 1 1]
set tcp.custom.tcpBgBox.color 				                 [0 0 0 0 tcpFolBG tcpFolBG tcpFolBG 255]

set tcp.custom.fbtn [265 6 15 114 1 0 1 1]
set tcp.custom.knobline [0]

set tcp.custom.name1 [0]
set tcp.custom.name2 [0]
set tcp.custom.name3    [0]
set tcp.custom.name5    h<35 ?track_selected [0] [19 7 77 15] !track_selected [17 7 110 16] [0] ;unselect track
set tcp.custom.name4    h<35 !track_selected [0] [19 7 77 15] ?track_selected [17 7 110 16] [0] ;select track
set tcp.custom.grp [0]
EndLayout

Layout "⇛200% Folder" "200/folder_tcp"
trackhw
drawTcp 2
tcpfolderHide

set tcp.meter                                          h<5 [0] h<th25 [270 18 8 8] [270 18 8 8]                               
set tcp.meter.vu.div 				                          [0 0]
set tcp.label                                          h<th35 [38 14 154 30] [34 14 220 32]
;set tcp.label.margin 				                          [3 0 3 0 0.5]
set tcp.solo                                           h<th35 [188 10 44 40] h<th58 [36 58 36 36] [146 58 44 40]
set tcp.mute                                           h<th35 [218 10 44 40] h<th58 [60 58 36 36] [200 58 44 40]
set tcp.env 				                           h<th35 [0] h<th58 [96 59 124 34] [115 102 124 34]

set tcp.custom.010 h<th58 [0] [42 58 40 40]
set tcp.custom.011 h<th58 [0] [94 58 40 40]
set tcp.custom.019  h<th58 [0] [148 58 40 40]
set tcp.custom.020  h<th58 [0] [202 58 40 40]
;set tcp.custom.014 h<th35 [196 14 62 32] [0]	
set tcp.custom.015   [50 18 148 224 1 0 1 1] 

set custom_fxsmall     h<th35 [50 18 148 228 1 0 1 1] [50 18 148 224 1 0 1 1]
set custom_fxlistoff   h<th35 [192 18 158 228 1 0 1 1] [192 18 158 224 1 0 1 1]
set custom_fxsendoff   h<th35 [192 18 158 228 1 0 1 1] [192 18 158 224 1 0 1 1]
set custom_sendsmall   h<th35 [202 18 148 228 1 0 1 1] [202 18 148 224 1 0 1 1]
set custom_sendoff            [0]
set tcp.custom.015 custom_fxsmall
set tcp.custom.015 !tcp_fxlist_enabled custom_fxlistoff
set tcp.custom.015 ?tcp_sends_enabled custom_fxsendoff
set tcp.custom.015 ?tcp_fxlist_enabled!=!tcp_sends_enabled!=?tcp_sends_enabled==fxshown{0}==1 tcp.custom.015 0
set tcp.custom.016 w<tw325 [0] custom_sendsmall
set tcp.custom.016 ?tcp_sends_enabled custom_sendoff

set tcp.fxembed +:folderdepth:1     [-10 0 10 0]
set tcp.fxembed +:maxfolderdepth:1  [10 0 -10 0]
set tcp.size    +:folderdepth:1     [0 0 -10 0]
set tcp.size    +:maxfolderdepth:1  [0 0 10 0]

set tcp.custom.tcpBgBox 				                        [258 14 272 248 0 0 1 1]
set tcp.custom.tcpBgBox.color 				                [0 0 0 0 tcpFolBG tcpFolBG tcpFolBG 255]

set tcp.custom.fbtn [530 12 30 228 1 0 1 1]
set tcp.custom.knobline [0]

set tcp.custom.name1    [0]
set tcp.custom.name2    [0]
set tcp.custom.name3    [0] 
set tcp.custom.name5    h<70 ?track_selected [0] [38 14 154 30] !track_selected [34 14 220 32] [0] ;unselect track
set tcp.custom.name4    h<70 !track_selected [0] [38 14 154 30] ?track_selected [34 14 220 32] [0] ;select track
set tcp.custom.grp [0]
EndLayout

Layout "Folder" "folder_mcp"
drawMcp 1
mcpfolderhide
set mcp.size                                          + [3 0 3 0]
set mcp.trackidx                                      + [0 0 3 0]
set mcp.trackidx.margin 				                [-1000 0 1 1 0 0 0 0]
set mcp.folder                                        + [2 -1]
;set mcp.folder folderstate<0 [60 867 15 13 0 1 0 1] [60 867 15 13 0 1 0 1]
set mcp.env                                             [7 453 69 17 0 1 0 1]
set mcp.solo                                            [13 569 24 16 0 1 0 1]
set mcp.mute                                            [45 569 24 16 0 1 0 1]
set mcp.meter                                           [68 603 5 4 0 1 0 1] 
set mcp.meter.vu.div                                    [0 0]
set mcp.label                                         + [2 0 -2]
set mcp.label.margin                                    [5 1 6 0 0.5]

set mcp.custom.mcpBgBox 					          + [2 0 0 0]
;set mcp.custom.mcpBgBox.color 				            [0] 
set mcp.custom.coloridxbg                             + [3 0 -3 0]
set mcp.custom.coloridxbg.color                       [0 0 0 0 tcpFolBG tcpFolBG tcpFolBG 255]

set mcp.custom.topline                                + [0 0 3 0]
set mcp.custom.line_L                                 + [0 0 0 0]
set mcp.custom.line_R                                 + [3 0 0 0]

set mcp.custom.topbg                                  + [2 0 0]
set mcp.custom.sidebg_L                               + [2]
set mcp.custom.sidebg_R                               + [2 0 -1]

set mcp.custom.knobmn [0]
set mcp.custom.knobst [0]
EndLayout

Layout "⇛200% Folder" "200/folder_mcp"
drawMcp 2
mcpfolderhide
set mcp.size                                          + [6 0 6 0]
set mcp.trackidx                                      + [0 0 6 0]
set mcp.trackidx.margin 				                [-1000 0 1 1 0 0 0 0]
set mcp.folder                                        + [4 -1]
set mcp.env                                             [14 906 138 34 0 1 0 1]
set mcp.solo                                            [26 1138 48 32 0 1 0 1]
set mcp.mute                                            [90 1138 48 32 0 1 0 1]
set mcp.meter                                           [135 1206 10 8 0 1 0 1] 
set mcp.meter.vu.div                                    [0 0]
set mcp.label                                         + [4 0 -4]
;set mcp.label.margin                                   [10 2 12 0 0.5]

set mcp.custom.mcpBgBox 					          + [4 0 -2 0]
set mcp.custom.coloridxbg                             + [6 0 -6 0]
set mcp.custom.coloridxbg.color [0 0 0 0 tcpFolBG tcpFolBG tcpFolBG 255]

set mcp.custom.topline                                + [0 0 6 0]
set mcp.custom.line_L                                 + [0 0 0 0]
set mcp.custom.line_R                                 + [6 0 0 0]

set mcp.custom.topbg                                  + [4 0 -2]
set mcp.custom.sidebg_L                               + [4]
set mcp.custom.sidebg_R                               + [2 0 -1]

set mcp.custom.knobmn [0]
set mcp.custom.knobst [0]
EndLayout

Layout "Routing Folder" "folder_tcp_b"
drawTcp 1
set tcp.label         h<35 [19 7 46 15] [17 7 110 16]
set tcp.recarm        h<35 [64 5 22 20] h<60 [20 27 18 18] [20 29 22 20]
set tcp.recmon        h<35 [79 5 22 20] h<60 [33 27 18 18] [46 29 22 20]
set tcp.solo          h<35 [94 5 22 20] h<60 [46 27 18 18] [73 29 22 20]
set tcp.mute          h<35 [109 5 22 20] h<60 [58 27 18 18] [100 29 22 20]
set tcp.recmode       h<35 [227 5 36 20 1 0 1 0] + [0 8]
set tcp.io            h<35 [180 6 46 20 1 0 1 0] + [0 8]
set tcp.meter         h<20 [0] h<35 [134 7 13 16 0 0 0 0] [134 9 13 110 0 0 0 1] 

set tcp.fx           + [0 8]
set tcp.fxbyp        + [0 8]
set tcp.fxin         + [0 8]
set tcp.env          + [0 8]
set tcp.phase        + [0 8]
set tcp.recinput     + [0 8]
set tcp.volume       + [0 8]
set tcp.volume.label + [0 8]
set tcp.pan.label    + [0 8]
set tcp.width.label  + [0 8]
set tcp.fxparm       + [0 8] h<35 + [0 -3]
set tcp.sendlist     + [0 8] h<35 + [0 -3]
set tcp.custom.002     [0]
set tcp.custom.003     [0]
set tcp.custom.004     [0]
set tcp.custom.005     [0]
set tcp.custom.006     [0]
set tcp.custom.007     [0]
set tcp.custom.008     [0]
set tcp.custom.009     [0]
set tcp.custom.017     h<60 [0] [21 29 20 20]
set tcp.custom.018     h<60 [0] [47 29 20 20]
set tcp.custom.019     h<60 [0] [74 29 20 20]
set tcp.custom.020     h<60 [0] [101 29 20 20]
set tcp.custom.014   + [0 5]

set tcp.fxembed + [0 6 0 -6]
set tcp.fxembed p3>0                                                       [0]

set tcp.custom.tcpBgBox 				                         [129 7 136 124 0 0 1 1]
set tcp.custom.tcpBgBox.color 				                 [0 0 0 0 tcpFolBG tcpFolBG tcpFolBG 255]
;set tcp.size + + * folderdepth [0 0 -10 0] * maxfolderdepth [0 0 10 0]
set tcp.custom.fbtn [265 6 15 114 1 0 1 1]

set tcp.custom.knobline + [0 8]

set tcp.custom.name1 [0]
set tcp.custom.name2 [0]
set tcp.custom.name3    [0]
set tcp.custom.name5    h<35 ?track_selected [0] [19 7 46 15] !track_selected [17 7 110 16] [0] ;unselect track
set tcp.custom.name4    h<35 !track_selected [0] [19 7 46 15] ?track_selected [17 7 110 16] [0] ;select track
set tcp.custom.grp [0]
EndLayout

Layout "⇛200% Routing Folder" "200/folder_tcp_b"
drawTcp 2
set tcp.label         h<th35 [34 14 98 30] [34 14 220 32]
set tcp.recarm        h<th35 [128 10 44 40] h<th58 [40 58 36 36] [40 58 44 40]
set tcp.recmon        h<th35 [158 10 44 40] h<th58 [66 58 36 36] [92 58 44 40]
set tcp.solo          h<th35 [188 10 44 40] h<th58 [92 58 36 36] [146 58 44 40]
set tcp.mute          h<th35 [218 10 44 40] h<th58 [118 58 36 36] [200 58 44 40]
set tcp.recmode       h<th35 [454 10 72 40 1 0 1 0] + [0 16]
set tcp.io            h<th35 [360 12 92 40 1 0 1 0] + [0 16]
set tcp.volume.label.margin  h<158 [0 1 10 0 1] [0 -30 10 0 1]
set tcp.meter         h<th35 [268 14 26 32 0 0 0 0] [268 18 26 220 0 0 0 1] 
set tcp.fx           + [0 16]
set tcp.fxbyp        + [0 16]
set tcp.fxin         + [0 16]
set tcp.env          + [0 16]
set tcp.phase        + [0 16]
set tcp.recinput     + [0 16]
set tcp.volume       + [0 16]
set tcp.volume.label + [0 16]
set tcp.pan.label    + [0 16]
set tcp.width.label  + [0 16]
set tcp.fxparm       + [0 14] h<70 + [0 -5]
set tcp.sendlist     + [0 14] h<70 + [0 -5]
set tcp.custom.002     [0] 
set tcp.custom.003     [0]
set tcp.custom.004     [0]
set tcp.custom.005     [0]
set tcp.custom.006     [0]
set tcp.custom.007     [0]
set tcp.custom.008     [0]
set tcp.custom.009     [0]
set tcp.custom.017     h<th58 [0] [42 58 40 40]
set tcp.custom.018     h<th58 [0] [94 58 40 40]
set tcp.custom.019     h<th58 [0] [148 58 40 40]
set tcp.custom.020     h<th58 [0] [202 58 40 40]
set tcp.custom.014   + [0 10]

set tcp.fxembed + [0 12 0 -12]
set tcp.fxembed +:folderdepth:1     [-10 0 10 0]
set tcp.fxembed +:maxfolderdepth:1  [10 0 -10 0]
set tcp.fxembed p3>0                                                       [0]

set tcp.size    +:folderdepth:1     [0 0 -10 0]
set tcp.size    +:maxfolderdepth:1  [0 0 10 0]
set tcp.custom.tcpBgBox 				                        [258 14 272 248 0 0 1 1]
set tcp.custom.tcpBgBox.color 				                 [0 0 0 0 tcpFolBG tcpFolBG tcpFolBG 255]

set tcp.custom.fbtn [530 12 30 228 1 0 1 1]
set tcp.custom.knobline + [0 16]

set tcp.custom.name1 [0]
set tcp.custom.name2 [0]
set tcp.custom.name3    [0] 
set tcp.custom.name5    h<th35 ?track_selected [0] [34 14 98 30] !track_selected [34 14 220 32] [0] ;unselect track
set tcp.custom.name4    h<th35 !track_selected [0] [34 14 98 30] ?track_selected [34 14 220 32] [0] ;select track
set tcp.custom.grp [0]
EndLayout

Layout "Routing Folder" "folder_mcp_b"
drawMcp 1
set mcp.size                                          + [3 0 3 0]
set mcp.trackidx                                      + [0 0 3 0]
set mcp.trackidx.margin                               + [2]
;set mcp.trackidx.margin 				                [-1000 0 1 1 0 0 0 0]
set mcp.extmixer.position                             + [2 0]
set mcp.folder                                        + [2]
set mcp.env                                           + [2]
set mcp.recinput                                      + [2]
set mcp.recmode                                       + [2]
set mcp.fx                                            + [2]
set mcp.fxin                                          + [2]
set mcp.fxbyp                                         + [2]
set mcp.pan                                           + [2]
set mcp.pan.label                                     + [2]
set mcp.width                                         + [2]
set mcp.width.label                                   + [2]
set mcp.recmon                                        + [2]
set mcp.recarm                                        + [2]
set mcp.solo                                          + [2]
set mcp.mute                                          + [2]
set mcp.meter                                         + [2] 
set mcp.volume                                        + [2]
;set mcp.meter.vu.div                                   [0 0]
set mcp.label                                         + [2]
set mcp.label.margin                                  + [0]

set mcp.custom.mcpBgBox 					          + [2 0 0 0]
;set mcp.custom.mcpBgBox.color 				            [0] 
set mcp.custom.coloridxbg                             + [3 0 -3 0]
set mcp.custom.coloridxbg.color                       [0 0 0 0 tcpFolBG tcpFolBG tcpFolBG 255]

set mcp.custom.topline                                + [0 0 3 0]
set mcp.custom.line_L                                 + [0 0 0 0]
set mcp.custom.line_R                                 + [3 0 0 0]

set mcp.custom.topbg                                  + [2 0 0]
set mcp.custom.sidebg_L                               + [2]
set mcp.custom.sidebg_R                               + [2 0 -1]
set mcp.io                                            + [2]

set mcp.custom.knobmn + [2]
set mcp.custom.knobst + [2]
EndLayout

Layout "⇛200% Routing Folder" "200/folder_mcp_b"
drawMcp 2
set mcp.size                                          + [6 0 6 0]
set mcp.trackidx                                      + [0 0 6 0]
set mcp.trackidx.margin                               + [4]
;set mcp.trackidx.margin 				                [-1000 0 1 1 0 0 0 0]
set mcp.extmixer.position                             + [2 0]
set mcp.folder                                        + [4]
set mcp.env                                           + [4]
set mcp.recinput                                      + [4]
set mcp.recmode                                       + [4]
set mcp.fx                                            + [4]
set mcp.fxin                                          + [4]
set mcp.fxbyp                                         + [4]
set mcp.pan                                           + [4]
set mcp.pan.label                                     + [4]
set mcp.width                                         + [4]
set mcp.width.label                                   + [4]
set mcp.recmon                                        + [4]
set mcp.recarm                                        + [4]
set mcp.solo                                          + [4]
set mcp.mute                                          + [4]
set mcp.meter                                         + [4] 
set mcp.volume                                        + [4]
;set mcp.meter.vu.div                                   [0 0]
set mcp.label                                         + [4]
set mcp.label.margin                                  + [0]

set mcp.custom.mcpBgBox 					          + [4 0 -2 0]
set mcp.custom.coloridxbg                             + [6 0 -6 0]
set mcp.custom.coloridxbg.color [0 0 0 0 tcpFolBG tcpFolBG tcpFolBG 255]

set mcp.custom.topline                                + [0 0 6 0]
set mcp.custom.line_L                                 + [0 0 0 0]
set mcp.custom.line_R                                 + [6 0 0 0]

set mcp.custom.topbg                                  + [4 0 -2]
set mcp.custom.sidebg_L                               + [4]
set mcp.custom.sidebg_R                               + [2 0 -1]
set mcp.io                                            + [4]

set mcp.custom.knobmn + [4]
set mcp.custom.knobst + [4]
EndLayout

;FADER----------FADER----------FADER----------FADER----------FADER----------
Layout "Fader Red" "fader_red"
drawMcp 1
EndLayout

Layout "⇛200% Fader Red" "200/fader_red"
drawMcp 2
EndLayout

Layout "Fader Blue" "fader_blue"
drawMcp 1
EndLayout

Layout "⇛200% Fader Blue" "200/fader_blue"
drawMcp 2
EndLayout

Layout "Fader Purple" "fader_purple"
drawMcp 1
EndLayout

Layout "⇛200% Fader Purple" "200/fader_purple"
drawMcp 2
EndLayout

Layout "Fader Yellow" "fader_yellow"
drawMcp 1
EndLayout

Layout "⇛200% Fader Yellow" "200/fader_yellow"
drawMcp 2
EndLayout

Layout "MIDI" "tcp_midi"
drawTcp 1
set tcp.custom.002     [0] 
set tcp.custom.003     [0]
set tcp.custom.004     [0]
set tcp.custom.005     [0]
set tcp.custom.056     [265 1 15 1196 1 0 1 0]
set tcp.custom.057     [265 113 15 9 1 1 1 1]
set tcp.custom.058     [265 0 15 9 1 0 1 0]

EndLayout

Layout "⇛200% MIDI" "200/tcp_midi"
drawTcp 2
set tcp.volume.label.margin 			                        h<158 [0 1 10 0 1] [0 -30 10 0 1]

set tcp.fxembed +:folderdepth:1     [-10 0 10 0]
set tcp.fxembed +:maxfolderdepth:1  [10 0 -10 0]
set tcp.size    +:folderdepth:1     [0 0 -10 0]
set tcp.size    +:maxfolderdepth:1  [0 0 10 0]
set tcp.custom.002     [0] 
set tcp.custom.003     [0]
set tcp.custom.004     [0]
set tcp.custom.005     [0]
set tcp.custom.056     [530 1 30 2392 1 0 1 0]
set tcp.custom.057     [530 226 30 18 1 1 1 1]
set tcp.custom.058     [530 0 30 18 1 0 1 0]
EndLayout

Layout "AUX"
drawTcp 1
set tcp.recarm           [0]
set tcp.recmon           [0]
set tcp.custom.006       [0]
set tcp.custom.007       [0]

set tcp.custom.010 h<58  [0] [21 21 20 20]
set tcp.custom.011 h<58  [0] [47 21 20 20]
set tcp.label       h<35 [19 4 76 16] [17 2 100 16]
;set tcp.custom.014  h<35  [98 2 31 16] [0]

;set tcp.custom.006 * scale h<th58  [0] [21 21 20 20]
;set tcp.custom.007 * scale h<th58  [0] [47 21 20 20]

set tcp.custom.name3   + !track_selected [0 0 30 0] [0]
set tcp.custom.name4   + ?track_selected [0 0 30 0] [0]

EndLayout

Layout "AUX" "mcp_aux"
drawMcp 1
set mcp.recmon 				                                      [0]
set mcp.recarm 				                                      [0]
EndLayout

;Layout "MIDI" "mcp_midi"
;drawMcp 1
;set mcp.volume.label.color 				                              PTGreen
;EndLayout

;Layout "⇛200% MIDI" "200/mcp_midi"
;drawMcp 1
;set mcp.volume.label.color 				                              PTGreen
;EndLayout

Layout "⇛200% AUX" "200/"
drawTcp 2
set tcp.recarm           [0]
set tcp.recmon           [0]
set tcp.custom.006       [0]
set tcp.custom.007       [0]

set tcp.custom.010    h<116 [0] [42 42 40 40]
set tcp.custom.011    h<116 [0] [94 42 40 40]
set tcp.label         h<70 [38 8 152 32] [34 4 200 32]
;set tcp.custom.014   h<70 [196 4 62 32] [0]

;set tcp.custom.name3 !track_selected [38 8 154 32] [0] h>35 [0]
;set tcp.custom.name4 ?track_selected [38 8 154 32] [0] h>35 [0]

set tcp.custom.name3   + !track_selected [0 0 60 0] [0]
set tcp.custom.name4   + ?track_selected [0 0 60 0] [0]

EndLayout

Layout "⇛200% AUX" "200/mcp_aux"
drawMcp 2
set mcp.recmon 				                                      [0]
set mcp.recarm 				                                      [0]
EndLayout

Layout "Narrow" "mcp_narrow"
drawMcp 1
set mcp.size 				                                [49 957 0 502]
set mcp.extmixer.mode 				                        [1]
	set mcp.extmixer.position + + * folderdepth [0] * maxfolderdepth 				[0 0 0 0] [2 20 46 330 0 0 0 1]
set mcp.trackidx 				                            [0 349 49 607 0 1 0 1]
	set mcp.trackidx.color ?recarm 			                [191 64 64]  PTGreen
	set mcp.trackidx.margin 				               os_type==0 [25 561 10 70] os_type==1 [22 541 10 50] 

set mcp.folder 				                               + [-29 3]
set mcp.recinput 				                            [5 363 39 17 0 1 0 1]
	set mcp.recinput.color 			                        PTrecinput
	set mcp.recinput.margin 			                    [4 0 6 0 0.5]

set mcp.recmode 				                            [5 381 27 17 0 1 0 1]
set mcp.env 				                                [5 415 39 17 0 1 0 1]
set mcp.fx 				                                    [6 451 37 17 0 1 0 1]
set mcp.fxin                                                [32 381 12 18 0 1 0 1]

set mcp.pan 				                               trackpanmode<=3 [14 483 20 20 0 1 0 1] trackpanmode>=5 [4 483 20 20 0 1 0 1]
	set mcp.pan.fadermode 				                    [1]
	clear mcp.pan.label
set mcp.width 				                               trackpanmode<=3 [0] trackpanmode>=5 [25 483 20 20 0 1 0 1]
	set mcp.width.fadermode 				                [1]
	clear mcp.width.label

set mcp.recmon 				                                [3 539 22 20 0 1 0 1]
set mcp.recarm 			                        	        [24 539 22 20 0 1 0 1]
set mcp.solo 			                        	        [3 564 22 20 0 1 0 1]
set mcp.mute 				                                [24 564 22 20 0 1 0 1]

set mcp.volume 				                                [1 594 29 235 0 1 0 1]
	set mcp.volume.label 				                    [5 831 39 16 0 1 0 1]
	set mcp.volume.label.color 				                PTGreen
	set mcp.volume.label.margin 			                [0 0 0 0 0.5]

set mcp.meter 				                                [28 591 13 233 0 1 0 1]
	set mcp.meter.readout.color 				            [0 0 0 0]
	set mcp.meter.vu.div 				                    [1 -1]

set mcp.meter                                          p4>0 [27 591 17 233 0 1 0 1]
set mcp.meter.readout.color                            p4>0 [216 216 216 0]
clear mcp.phase
set mcp.label 				                                [3 869 43 16 0 1 0 1]
set mcp.io 				                                    [5 909 40 23 0 1 0 1]

set mcp.custom.mcpBgBox 					              + [0 0 -30 0]
set mcp.custom.coloridxbg                                 + [0 0 -32 0]
set mcp.custom.line_L                                     + [0 0 0 0]
set mcp.custom.line_R                                     + [-31 0 0 0]

set mcp.custom.topbg                                      + [0 0 -30]
set mcp.custom.sidebg_L                                   + [0]
set mcp.custom.sidebg_R                                   + [-30 0]

set mcp.custom.fixline 				                      + [0 0 0 2] 

set mcp.custom.knobmn [0]
set mcp.custom.knobst [0]

EndLayout

Layout "⇛200% Narrow" "200/mcp_narrow"
drawMcp 2
set mcp.size 				                                [98 1914 0 104]
set mcp.extmixer.mode 				                        [1]
	set mcp.extmixer.position + + * folderdepth [0] * maxfolderdepth 				[0 0 0 0] [4 40 92 660 0 0 0 1]
set mcp.trackidx 				                            [0 698 98 1214 0 1 0 1]
	set mcp.trackidx.color ?recarm 			                [191 64 64]  PTGreen
	;set mcp.trackidx.margin 				                [50 1156 20 140]
    set mcp.trackidx.margin 				                os_type==0 [50 1122 20 140] os_type==1 [44 1082 20 100] 

set mcp.folder 				                               + [-60 1]
set mcp.recinput 				                            [9 727 78 34 0 1 0 1]
	set mcp.recinput.color 			                        PTrecinput
	set mcp.recinput.margin 			                    [8 0 12 0 0.5]

set mcp.recmode 				                            [9 763 54 34 0 1 0 1]
set mcp.env 				                                [9 831 78 34 0 1 0 1]
set mcp.fx 				                                    [11 902 74 34 0 1 0 1]
set mcp.fxin                                                [63 763 24 36 0 1 0 1]

set mcp.pan 				                                trackpanmode<=3 [28 967 40 40 0 1 0 1] trackpanmode>=5 [8 967 40 40 0 1 0 1]
	set mcp.pan.fadermode 				                    [1]
	clear mcp.pan.label
set mcp.width 				                                trackpanmode<=3 [0] trackpanmode>=5 [50 967 40 40 0 1 0 1]
	set mcp.width.fadermode 				                [1]
	clear mcp.width.label

set mcp.recmon 				                                [5 1079 44 40 0 1 0 1]
set mcp.recarm 			                        	        [46 1079 44 40 0 1 0 1]
set mcp.solo 			                        	        [5 1129 44 40 0 1 0 1]
set mcp.mute 				                                [47 1129 44 40 0 1 0 1]

set mcp.volume 				                                [4 1188 58 470 0 1 0 1]
	set mcp.volume.label 				                    [10 1662 78 32 0 1 0 1]
	set mcp.volume.label.color 				                PTGreen
	set mcp.volume.label.margin 			                [0 0 0 0 0.5]

set mcp.meter 				                                [55 1183 27 466 0 1 0 1]
	set mcp.meter.readout.color 				            [0 0 0 0]
	set mcp.meter.vu.div 				                    [1 -1]

set mcp.meter                                          p4>0 [55 1183 30 466 0 1 0 1]
set mcp.meter.readout.color                            p4>0 [216 216 216 0]
clear mcp.phase
set mcp.label 				                                [4 1738 86 32 0 1 0 1] 
set mcp.io 				                                    [8 1818 80 46 0 1 0 1]
set mcp.custom.mcpBgBox 					              + [0 0 -60 0]
set mcp.custom.coloridxbg                                 + [0 0 -64 0]
set mcp.custom.line_L                                     + [0 0 0 0]
set mcp.custom.line_R                                     + [-62 0 0 0]

set mcp.custom.topbg                                      + [0 0 -60]
set mcp.custom.sidebg_L                                   + [0]
set mcp.custom.sidebg_R                                   + [-60 0]

set mcp.custom.fixline 				                      + [0 0 0 4]

set mcp.custom.knobmn [0]
set mcp.custom.knobst [0]

EndLayout

;DPI Translate-----------------------------------------------------------------
layout_dpi_translate 	'' 			            1.0 	''
layout_dpi_translate 	'' 			            1.34    '⇛200%'
layout_dpi_translate 	'' 			            1.74 	'⇛200%'


layout_dpi_translate 	'Folder' 			    1.0 	''
layout_dpi_translate 	'Folder' 			    1.34 	'⇛200% Folder'
layout_dpi_translate 	'Folder' 			    1.74 	'⇛200% Folder'
layout_dpi_translate 	'Routing Folder' 	    1.0 	''
layout_dpi_translate 	'Routing Folder' 		1.34 	'⇛200% Routing Folder'
layout_dpi_translate 	'Routing Folder' 		1.74 	'⇛200% Routing Folder'

layout_dpi_translate 	'MIDI' 			        1.0 	''
layout_dpi_translate 	'MIDI' 			        1.34    '⇛200% MIDI'
layout_dpi_translate 	'MIDI' 			        1.74 	'⇛200% MIDI'

layout_dpi_translate 	'AUX' 			    1.0 	''
layout_dpi_translate    'AUX' 		 	    1.34    '⇛200% AUX'
layout_dpi_translate 	'AUX' 			    1.74 	'⇛200% AUX'

layout_dpi_translate 	'Fader Red' 			1.0 	''
layout_dpi_translate    'Fader Red' 			1.34    '⇛200% Fader Red'
layout_dpi_translate 	'Fader Red' 			1.74 	'⇛200% Fader Red'
layout_dpi_translate 	'Fader Blue' 			1.0 	''
layout_dpi_translate    'Fader Blue' 			1.34    '⇛200% Fader Blue'
layout_dpi_translate 	'Fader Blue' 			1.74 	'⇛200% Fader Blue'
layout_dpi_translate 	'Fader Purple' 			1.0 	''
layout_dpi_translate    'Fader Purple' 			1.34    '⇛200% Fader Purple'
layout_dpi_translate 	'Fader Purple' 			1.74 	'⇛200% Fader Purple'
layout_dpi_translate 	'Fader Yellow' 			1.0 	''
layout_dpi_translate    'Fader Yellow' 			1.34    '⇛200% Fader Yellow'
layout_dpi_translate 	'Fader Yellow' 			1.74 	'⇛200% Fader Yellow'

layout_dpi_translate 	'Narrow' 			    1.0 	''
layout_dpi_translate    'Narrow' 		 	    1.34    '⇛200% Narrow'
layout_dpi_translate 	'Narrow' 			    1.74 	'⇛200% Narrow'


which part of the code determines the track idx position? shortest answer only