CALL LENGTH
This page was last modified 17:07, 7 December 2019 by Mars2000you.

Contents

Effect

Returns the length of the playback data in the tracks.

It is useful for some applications that need to check that the lengths of the various phrases which are being played simultaneously are the same during extended playback with changes between tracks.

Syntax

CALL LENGTH ([<track 1 variable>][,<track 2 variable>]...[,<track 8 variable>])

Short version: _LENG ([<track 1 variable>][,<track 2 variable>]...[,<track 8 variable>])

Parameters

Each variable refers to a specific track. It returns the total length of the phrases loaded into the tracks as numeric values, with an unit equivalent to 1/192 of a full note. If the numeric value is 48, the length of the phrase is 1/4 (48/192), what means the length of a quarter note.

Note: these variables are reset by executing the CALL INIT and CALL ERASE instructions, and by changing the marks in a track.

Example

10 CLS
20 _INIT
30 _INST(1)
40 _PHRA(1),"CDEFGAB<C")
50 _LENG(A)
60  PRINT(A*1/192);"BAR"
70 _PLAY(1,1)

Related to

CALL ERASE, CALL INIT, CALL PHRASE, CALL PLAY, CALL TRACK

Compatibility

SFG BASIC