Tagged: During InsertSendMessage
- This topic has 1 reply, 2 voices, and was last updated 1 month ago by Philippe.
-
AuthorPosts
-
4 April 2024 at 14 h 39 min #6435THEZE MorganParticipant
Bonjour,
Y aurait-il une solution pour contourner l’absence de posibilité de recourir au During avec les InsertSendMessage ?
Par exemple, si je souhaite que mon feedback diminue j’aurais écrit cela :
During 10000 Reach 10 InsertSendMessage fx2 1 FeedbackRightPour le moment je fais des boucles qui baissent ou montent des valeurs de mes LFXs à chaque répétition tant que un temps n’est pas écoulé.
Declare Local int $time$ = 0
Declare Local int $during$ = 20000
Declare Local int $Reach$ = 10
Declare Local int $Delta$ = {$Delay_fx2_rank1_FeedbackRight_state$-$Reach$}
DoRepeat
InsertSendMessage fx2 1 FeedbackRight {$Delay_fx2_rank1_FeedbackRight_state$-1}
$time$ = { $time$+($during$/$Delta$)}
WaitDuration {$during$/$Delta$}
While {$time$ < $during$}Y aurait-il une méthode plus simple ?
Par avance merci
Morgan
- This topic was modified 1 month ago by Philippe.
9 April 2024 at 8 h 42 min #6441PhilippeKeymasterSalut Morgan,
Effectivement l’absence de fonction During pour les messages vers les inserts est dommage.
Peut-être qu’un jour nous disposerons d’une solution simple, mais pour l’instant, il n’y a pas d’autre solution que de faire sa propre routine.
Routine que tu peux déporter dans un slot macro spécifique qui gérera tous tes cas de during spécifiques.Voici une autre proposition de macro pour faire un during, note qu’elle est encore plus longue que la tienne !
//***********************************************************************************
// Set the total duration of the value change
Declare Local int $duration_ms$ = 1000// Set the start and end value
Declare Local float $startValue$ = 0
Declare Local float $endValue$ = 1Declare Local int $steps$ = 100
Declare Local float $incrementDuration$ = 0
Declare Local float $targetValue$ = $startValue$
Declare Local float $increment$ = {($endValue$ – $targetValue$) / $steps$}// calculate the number of needed steps for the current increment
$steps$ = {($endValue$ – $startValue$) / $increment$}
//Post $steps$Declare Local int $startClock$ = {monotonic_ms()}
DoRepeat
$increment$ = {($endValue$ – $targetValue$) / $steps$}
$incrementDuration$ = { ($startClock$ + $duration_ms$ – monotonic_ms())/ $steps$ }// Current step value calculation
$targetValue$ = {min($endValue$,$targetValue$ + $increment$)}//******************** Put the destination here ********************
InsertSendMessage fx1 1 SpeedFloat $targetValue$WaitDuration {$incrementDuration$}
$steps$ = {$steps$ – 1 }
While {$targetValue$ < $endValue$} //Post {monotonic_ms() - $startClock$} //*********************************************************************************** -
AuthorPosts
- You must be logged in to reply to this topic.