Home Forums Macros Jump on modular loopers not working in synced mode ? Reply To: Jump on modular loopers not working in synced mode ?

#7182
Patrick KiznyPacocreative
Participant

I’m not sure if it’s happening also in regular modes, as I don’t have seeking implemented there yet.
This is coming from my macros that use midi controllers to use looper more as an instrument, including playing with in/out points, speed and dynamic seek(jump)

Look at CaseBranch “[1] Pos” for specifics, but I include a wider piece of code for context.

	// ----------------------------------------------------- Individual loopers control page 2 -----------------------------------------------------

CaseBranch "[1] Spd"

	// vars for each channel
	$k$ = 1
	$m$ = $Looper_fx1_rank1_PlayerMode_state$
	$b$ = $Looper_fx1_rank1_current_length$
	$r$ = $Looper_fx1_rank1_ReverseDirection_state$

	// ETS mode,
	If { $m$ == 2 }
		$spd$ = {scale(currentCaseOptionValueFloat(0), 1, 126, $spd_max2$, 1)}
		$frz$ = {$spd$ > ($spd_max2$ * 0.95) ? 1 : 0 }
		InsertSendMessage fx[$k$] 1 HTSSpeed $spd$
		InsertSendMessage fx[$k$] 1 HTSFreeze $frz$
	Else
		$spd$ = {currentCaseOptionValueFloat(0) < 64 ? scale(currentCaseOptionValueFloat(0) , 0, 64, $spd_min1$, 1) : scale(currentCaseOptionValueFloat(0), 65, 127, 1, $spd_max1$)}
		IfThen {$r$ == 1 } Do $spd$ = { $spd$ * -1 }
		InsertSendMessage fx[$k$] 1 SpeedFloat $spd$
	EndIf
	WaitDuration 17

	BreakCaseBranch

CaseBranch "[1] In"
	InsertSendMessage fx1 1 SelectionIn {scale(currentCaseOptionValueFloat(0), 2, 125, 0, $Looper_fx1_rank1_current_length$)}
	BreakCaseBranch

CaseBranch "[1] Out"
	InsertSendMessage fx1 1 SelectionOut {scale(currentCaseOptionValueFloat(0), 2, 125, 0, $Looper_fx1_rank1_current_length$)}
	BreakCaseBranch

CaseBranch "[1] Pos"
	If { $Looper_fx1_rank1_PlayerMode_state$ == 2}
		$v$ = {scale(currentCaseOptionValueFloat(0), 2, 125, $Looper_fx1_rank1_SelectionIn_state$, $Looper_fx1_rank1_SelectionOut_state$)}
		InsertSendMessage fx1 1 Jump $v$
	EndIf
	WaitDuration 17
	BreakCaseBranch

CaseBranch "[1] Rev"

	InsertSendMessage fx1 1 ReverseDirection {$Looper_fx1_rank1_ReverseDirection_state$ == 0 ? 1 : 0}
	MidiControllerSend {$Looper_fx1_rank1_ReverseDirection_state$ == 0 ? 11 : 12 } 51 $chan_b2$ "Launch Control XL"
	BreakCaseBranch

CaseBranch "[1] Copy"
	$m_press_flag$ = 1
	BreakCaseBranch

CaseBranch "[1] Copy_up"
	If {$m_press_flag$ == 1}
		InsertSendMessage fx1 1 AudioMessages Paste

		MidiControllerSend 60 61 $chan_b2$ "Launch Control XL"
		WaitDuration 500
		MidiControllerSend 12 61 $chan_b2$ "Launch Control XL"
		//MidiControllerSend 12 $LC_lastcopied$ $chan_b2$ "Launch Control XL"

		$m_press_flag$ = 0
	EndIf
	BreakCaseBranch

CaseBranch "[1] Copy_longpress"
	$m_press_flag$ = 0
	InsertSendMessage fx1 1 AudioMessages Copy