Handy Instruction Manual
The following will introduce the basic instructions used to play sound effects and BGM. There are also lots of other applied instructions. Please refer to the sample programs for information on how to use them.
Play a Sound Effect - BEEP Instruction
The BEEP instruction we talked about on the page describing DIRECT mode is used to play short sound effects.
Using this instruction, you can play a sound effect chosen from the list of various preset effects by specifying the effect number.
|Format||BEEP Sound effect number
|Usage example||BEEP 8|
In applied usage, you can tune the frequency, volume, and pan-pot. Please input the instruction and check the description given in the HELP feature.
You can check the available sound effect numbers and their contents from the "BEEP" list, which is displayed when the SMILE button is pressed.
Play BGM - BGMPLAY Instruction ①
The BGMPLAY instruction allows you to easily play BGM in your programs, for example in games. This product provides 43 ready-to-use preset BGM pieces.
|Format||BGMPLAY Track number, BGM number
|Usage example||BGMPLAY 12|
Some preset tunes will end after being played once, while others will loop until the BGMSTOP instruction, described below, is executed.
You can check the available BGM numbers and their contents from the "BGM" list, which is displayed when the SMILE button is pressed.
Stop BGM - BGMSTOP Instruction
This instruction is used to stop BGM that is currently playing.
If you specify the target track, you can also make the music fade out before stopping.
|Format||BGMSTOP Track number, Fade-out time
|Usage example||BGMSTOP 0,2|
Input and run the following program:
1The first line starts playing BGM No. 12 (As the track number is omitted, the BGM is played on track 0).
The second line is an instruction called WAIT, which waits for a specified amount of time (in units of 1/60th of a second).
"WAIT 60" waits for one second. The WAIT instruction used here waits for 5 seconds.
The third line fades out the BGM playing on track 0 for 3 seconds before stopping it.
As a result, the BGM is played, then after 5 seconds it starts to fade out, and then after 3 seconds it stops completely.
Play a musical scale - BGMPLAY Instruction ②
You can also play music using MML (Music Macro Language), which was used in old versions of BASIC.
Execute the following instruction:
This is a method for playing music where a character string enclosed in double quotations ("") is interpreted as a score. Each alpha character represents a note.
◆BGMPLAY instruction (Play MML)
|Usage example||BGMPLAY ":0CCC :1REE :2RRG"
Uses three channels to play a chord
Main MML Elements
A thru G - Note (Play a sound) C(Do) D(Re) E(Mi) F(Fa) G(Sol) A(La) B(Si) * Examples of musical scale notes # or + - Halftone up C# D# E# F# G# A# G# C+ D+ E+ F+ G+ A+ G+ - (minus) - Halftone down C- D- E- F- G- A- B- R - Rest Number after a note - Tone length C1 C2 C4 C8 C16 C32 From left, Whole note, Half note, Quarter note, Eighth note, Sixteenth note, and Thirty-second note respectively . (period) after tone length - Dotted note C1. C2. C4. C8. C16. C32. Increases each tone length by half Lx - Default tone length (where x is a number of a tone length) Ox - Octave of a tone (where x is a range from 0 thru 8) < One octave up > One octave down :x - Channel (where x is a range from 0 thru 15) Tx - Tempo (where x is a range from 1 thru 240) Vx - Change in volume (where x is a range from 0 thru 127) @x - Change in tone (where x is a range from 1 thru 127)
By inputting MML and characters and then pressing the HELP button, you can view detailed explanations for MML.
e-manual.pdf (3.0 MB)
- 9About SmileBASIC
- 10Using SmileBASIC
- 11About BASIC
- 12About the TOP MENU
- 13Projects in the Cloud
- 14Managing Projects / Files
- 16Starting BASIC
- 17Using the Keyboard
- 18What is DIRECT Mode?
- 19Writing in EDIT Mode
- 20Features in EDIT Mode
- 21Managing Programs
- 22About Sample Programs
- 23Using the HELP Tool
- 24Using the SMILE Tool
Introduction to BASIC
- 25"PRINT" and Variables
- 26Using Variables
- 27Conditional Judgment
- 28Computer Colors (RGB)
- 29Graphic Instructions
- 30Sound Instructions