Business Template Forums Macros Variable in a track name

This topic contains 2 replies, has 2 voices, and was last updated by  Olivedep 4 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #4151

    Olivedep
    Member

    Hi !

    I would like to use, for each track, the function :

    TrackLoop trk1 BeginAt $begin$ EndAt $end$

    Can we use a variable, for example $num$ which would take the values from 1 to 10, to designate the track? (for example trk$num$).

    Thank you!

    Olivier

    #4153

    Hi Olivier,
    Yes, this is possible since Logelloop 5.0.20.

    Below is an example of macro which set the level of each track to a random value between -50 and -20.
    We use $track_id$ to set the track number and the syntax is trk[$track_id$].
    Of course you can use any declared variable name…
    Note that it is also possible to use this with fx, in and out.
    Philippe

    //************************* Macro begin **********************************************
    Declare int $track_id$ = 1
    Declare Once float $min_vol$ = -50
    Declare Once float $max_vol$ = -20
    Declare float $value$ = 0.

    DoRepeat
    $value$ = {randomScaleInt($min_vol$,$max_vol$)}
    During 4500 Reach $value$ TrackVolume trk[$track_id$]
    Sleep 50

    Set $track_id$ = { ($track_id$==10) ? 1 : ($track_id$ + 1) }
    While true
    //************************* Macro end **********************************************

    #4162

    Olivedep
    Member

    Thank you Philippe ! Very nice macro !

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.