[↑]
SmileBASIC4 Replica Reference
VIBRATE
1. Vibrate the controller

VIBRATE ControllerID [,LeftRightDesignation],VibrationPatternNumber

・Calls from subprograms are ignored.

Arguments

ControllerID

Controller ID to be vibrated: 1 to 4

・ControllerID 0 cannot be specified.
・For details on the controller ID, refer to the help for the CONTROLLER function.

LeftRightDesignation

Specify left and right controller to vibrate

0 Left
1 Right

・If not specified, both left and right vibrate.
・In case of held vertically and held horizontally, even if 1 is specified, it is ignored.

VibrationPatternNumber

Preset vibration pattern number: 0 to 62

・Vibration stops when 0 is specified.

Example

VIBRATE 1,40
VIBRATE 1,0,1:VIBRATE 1,1,3
2. Specify the frequency and amplitude to vibrate the controller

VIBRATE ControllerID [,LeftRightDesignation],LowBandFrequency,LowBandAmplitude,HighBandFrequency,HighBandAmplitude

・Calls from subprograms are ignored.

Arguments

ControllerID

Controller ID to be vibrated: 1 to 4

・ControllerID 0 cannot be specified.
・For details on the controller ID, refer to the help for the CONTROLLER function.

LeftRightDesignation

Specify left and right controller to vibrate

0 Left
1 Right

・If not specified, both left and right vibrate.
・In case of held vertically and held horizontally, even if 1 is specified, it is ignored.

LowBandFrequency

Vibration frequency (Hz)

・Vibration stops when 0 is specified.

LowBandAmplitude

Vibration amplitude: -128.0 to 127.0

・Vibration stops when 0 is specified.

HighBandFrequency

Vibration frequency (Hz)

・Vibration stops when 0 is specified.

HighBandAmplitude

Vibration amplitude: -128.0 to 127.0

・Vibration stops when 0 is specified.

Example

VIBRATE 1,440,127,220,64
3. Get controller vibration status

VIBRATE(ControllerID[,LeftRightDesignation])

Arguments

ControllerID

Controller ID for acquiring vibration status: 1 to 4

・ControllerID 0 cannot be specified.
・For details on the controller ID, refer to the help for the CONTROLLER function.

LeftRightDesignation

Specify whether to acquire vibration status of left or right

0 Left
1 Right

・If not specified, the combined value of the left and right states is returned.
・In the case of held vertically and held horizontally, if 1 is specified, 0 is always returned.

Return Value

・If it is vibrating, it returns the vibration pattern number. If frequency/amplitude is directly specified, it returns 65535.
・0 when it's not vibrating.
・If the left / right designation is not specified except for held vertically or held horizontally, RightStateValue*65536+LeftStateValue is returned.
・If left and right designation is not specified for held vertically and held horizontally, only the left state value is returned.

Example

PRINT VIBRATE(1,0)
4. Stop vibration of all controllers

VIBRATE

・Calls from subprograms are ignored.

Example

VIBRATE
About this site
Our site is an unofficial manual site of programming software "SmileBASIC" for NintendoSwitch™.
I acquire the content of the site from the official reference site of the SmileBoom Co.Ltd. that is the development and sales cause of the software in real time (a minimum period of 24 hours update) and display it. For automatic update, contents may become improper.
Please confirm the correct content in an official site.

June 3, 2020
by mim
OK
|