Input and Output Commands

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Input- and Output commands >

Input and Output Commands

MSB. - Message Beep

Previous Top Next


MiniRobotLanguage (MRL)

 

MSB. Command

Message Beep through PC-Speaker

 

 

Intention

 

Generates a Signal Beep, through the PC-Speaker. Frequency and Duration can be customized. Useful for debugging. Useful to signal errors and states without showing a text.

 

Modes of operation:

 

1. Just use it without Parameter:

' Will produce a short Beep-Signal

MSB.

 

2. Use with Frequency

' Make a 100 Hz Sound for ~ 1 Second

MSB.100

 

3. Use default frequency (thats 800 Hz) and own Duration

MSB.|14

 

4. Use custom Frequency and Duration

MSB.600|10

 

5. Use default sound patterns:

 

' Generate a siren like sound

MSB.siren|780|650|2

 

'  Coin bouncing, sort of

MSB.bounce|760|280

 

' "Falling deep" like sound

MSB.fall|1780|150

 

' Switch between two tones

MSB.police|170|1780

 

 

 

 

Syntax

 

 

MSB.[P1][|P2][|P3][|P4]

 

 

Parameter Explanation

 

P1 - (optional) - can be omitted, in that case the default frequency of 800 Hz is used, to generate a Beep Sound. If given, it can be

 

1.) a frequency between 1 Hz and 20000 Hz (depending on what your speaker can make that you can still hear). In that case P2 will be a Duration in terms on 1/10 of a second.

 

2.) a Keyword from the following:

 

- bounce - use 2 numeric parameter

- fall - use 2 or 3 numeric parameter

- siren - use 2 or 3 numeric parameter

- police - use 2 or 3 numeric parameter

 

In this case, P2 till P4 will be the additional parameters for these predefined sound patterns.

 

P2 - (optional) - can be the duration of the frequency or a parameter for any of the above sound-patterns.

 

P3 - (optional) - if sound-patterns are used, this is one of their parameters.

P4 - (optional) - if sound-patterns are used, this is one of their optional parameters.

 

 

 

 

 

Example

 

'***********************************

' MSB. Sample

'***********************************

MSB.siren|780|650|4

MSB.police|170|1780|4

MSB.bounce|780|650

MSB.800|5

END.

 

 

 

Remarks

 

Use PRR. and PRE. to have your Melody play in the background.

 

 

 

Limitations:

 

-

 

 

 

See also:

 

 

    SAY. - Say something

    DIT. - Dial Tone MFV

    MPS. - Music Play Speaker