CALL PLAY
This page was last modified 17:09, 7 December 2019 by Mars2000you. Based on work by NYYRIKKI and Gdx.

This instruction is available in Hitachi Basic, MSX-AUDIO Basic, MSX-MUSIC Basic and SFG Basic.

Contents

CALL PLAY in Hitachi Basic

Effect

Puts the built-in data reader of the Hitachi MB-H2 computer in play mode.

Note: this instruction does not support files in ASCII mode (BASIC or data).

Syntax

CALL PLAY

Related to

CALL FF, CALL PAUSE, CALL REC, CALL REW, CALL STOP

Compatibility

Hitachi BASIC version 2


CALL PLAY in MSX-AUDIO Basic and MSX-MUSIC Basic

Effect

Checks if music is being played via the channels activated by CALL AUDIO or CALL MUSIC and/or the PSG channels.

Syntax

CALL PLAY(<string number>,<variable>)

Parameters

<string number> corresponds to one of the strings that can contain MML (see PLAY), this string is played by a FM or PCM or PSG channel. If you specify 0, then CALL PLAY will check all the channels.

<variable> is a alphanumeric variable, that will contain the value returned by the function CALL PLAY. It returns -1 (true) if the selected channel is playing. If playing has ended the function returns 0 (false) again. If the function is called immediately after the "PLAY" statement the value -1 is persistent.

Example

CALL PLAY(0,A):PRINT A

Related to

PLAY, PLAY(), CALL VOICE

Compatibility

MSX-AUDIO BASIC, MSX-MUSIC BASIC


CALL PLAY in SFG Basic

Effect

Plays the music previously written in tracks with the CALL PHRASE instruction.

Syntax

CALL PLAY (<instrument>,<track>[,<mark>])

Parameters

<instrument> is a number between 1 and 4. Up to four instruments can be freely be used by the FM Music Macro, but you can only use the instruments previously defined with CALL INST.

When the designated instrument is playing, new playback of the same instrument is performed upon playback completion (playback wait). This playback wait use only one CALL PLAY instruction. Using it again will result in a 'Device I/O error' message.

Note that is not possible to use CALL PLAY for playback of two or more instruments on the same track or the Music Keyboard.

<track> is a number between 1 and 9.

  • 1 to 8 = normal playback (the number of tracks must be set with CALL TRACK to use tracks 2 to 8)
  • 9 = playback using the Music Keyboard

Note that the scanning of the Music Keyboard will not be automatically suspended when the program is suspended with CRTL+STOP. You need to use CALL STOP or CALL INIT to suspend the scanning of the Music Keyboard.

<mark> is a number between 1 and 255 to specify the CALL PHRASE mark used for playback. When omitted, it is considered to be the same as the <track> number.

  • 1 to 254 = playback of the concerned CALL PHRASE section
  • 255 = playback of the section after the last played section. When playback is suspended by CALL STOP, the beginning of the track is played back.

Example

_PLAY(1,1,1)

Related to

CALL ERASE, CALL INIT, CALL INST, CALL LENGTH, CALL PHRASE, CALL TRACK, CALL STOP

Compatibility

SFG BASIC