Sound type
Sound Effect Number | Description |
---|---|
0 to 156 | Preset Sounds |
224 to 255 | User Waveforms |
256 to 383 | BGM Sound Source |
・0, if not specified.
Pitch value: -32768 to 32767 (semitones by 100)
・0, if not specified.
Playback volume: 0 to 127
・64 is the default.
Panpot: 0 (left) to 64 (center) to 127 (right)
・64 is the default.
BEEP 3
Sound type
Sound Effect Number | Description |
---|---|
0 to 156 | Preset Sounds |
224 to 255 | User Waveforms |
256 to 383 | BGM Sound Source |
・0, if not specified.
Pitch value: -32768 to 32767 (semitones by 100)
・0, if not specified.
Playback volume: 0 to 127
・64 is the default.
Panpot: 0 (left) to 64 (center) to 127 (right)
・64 is the default.
Handle to operate stop/volume/pitch/panpot after pronunciation: 0 to 15
H=BEEP(152)
Handle obtained by executing the BEEP command
Value of panpot to change: 0 (left) to 64 (center) to 127 (right)
H=BEEP(152) WAIT 60 BEEPPAN H,0
Handle obtained by executing the BEEP command
Value of pitch to change: -32768 to 32767
・Semitones by 100.
H=BEEP(152) WAIT 60 BEEPPIT H,1200
Handle obtained by executing the BEEP command
・If not specified, all sound effects are stopped.
Specify in seconds
・Real can be specified.
・Stop immediately with 0.
・0, if not specified.
BEEPSTOP H=BEEP(152) WAIT 60 BEEPSTOP H
Handle obtained by executing the BEEP command
Volume value to change: 0 to 127
H=BEEP(152) WAIT 60 BEEPVOL H,16
Music number: 128 to 255
・If not specified, all definitions are deleted.
BGMCLEAR
・Use BGMPAUSE to pause.
Track number to play: 0 to 15
・If not specified, all tracks are restarted.
Specify in seconds
・Real can be specified.
・Restart immediately with 0.
・0, if not specified.
BGMCONT
Target track number: 0 to 15
・If not specified, all tracks are the default.
Changing pitch value: -32768 to 32767
・Semitones by 100
BGMPITCH 0,100
Track number to play: 0 to 15
・0, if not specified.
・Preset sound source (0 to 73)
・User-defined (128 to 255)
・Playback volume: 0 to 127
・Fade-in time: 0 to 32767 seconds
BGMPLAY 128
・Playback by MML is performed on track 0.
・User-defined music number 255 is rewritten as an MML music.
Command string
BGMPLAY "T120O4L4CC8D8EE8F8GA8G8E2"
・Use BGMCONT to resume.
Track number to play: 0 to 15
・If not specified, all tracks are stopped.
Specify in seconds
・Real can be specified.
・Immediate stop with 0.
・0, if not specified.
BGMPAUSE
・The defined music can be played on BGMPLAY.
User-defined music number: 128 to 255
Command string
BGMSET 128,"CDEFG"
・The defined music can be played on BGMPLAY.
・Register MML internally using DATA command (DATA "CDEFGAB").
・Define a numerical value of 0 at the end of DATA.
User-defined music number: 128 to 255
Label or label string with MML string registered in DATA
BGMSETD 128,"@MMLTOP"
Target track number: 0 to 15
・If not specified, all tracks are stopped.
Specify in seconds
・Real can be specified.
・Immediate stop with 0.
・0, if not specified.
BGMSTOP
Track number: 0 to 15
Variable number to set/get value: 0 to 7
The acquired variable value
BGMVAR 0,1,2 V=BGMVAR(0,1)
Track number to play: 0 to 15
・0, if not specified.
Volume to set: 0 to 127
BGMVOL 0,64
・Volume changes when effector is off. Use with the effector turned on.
Track number to set: 0 to 15
・0, if not specified.
Effector level to be set: 0 (dry) to 127 (wet)
BGMWET 0,64
0 | #EFCOFF | OFF |
1 | #EFCON | ON |
0: OFF
1: ON
EFCEN 0 S=EFCEN()
0 | #EFCOFF | OFF |
1 | #EFCBATH | Bath |
2 | #EFCCAVE | Cave |
3 | #EFCSPACE | Space |
EFCSET #EFCSPACE
0 | #EFCREFSROOM | Small Room |
1 | #EFCREFLROOM | Large Room |
2 | #EFCREFHALL | Hall |
3 | #EFCREFCAVE | Cave |
4 | #EFCREFNONE | No Reflections |
Reflected sound volume: 0.0 to 1.0
Time for reflected sound to decay: 0 to 300 (milliseconds)
0 | #EFCREVROOM | Room |
1 | #EFCREVHALL | Hall |
2 | #EFCREVMETAL | Metallic Corridor |
3 | #EFCREVCAVE | Cave |
4 | #EFCREVREV | Reverb |
Reverberation volume: 0.0-1.0
Reverberation decay time: 100-20000 (milliseconds)
Decay rate of reverberant treble: 0.1 to 1.0 (the lower the value, the faster the treble is attenuated)
Reverberant tone parameters: 0.0 to 1.0
Effector input volume: 0.0 to 1.0
EFCSET #EFCREFSROOM,1,100,#EFCREVROOM,1,20000,1,0.01,0.5
・Volume changes when effector is off. Use with the effector turned on.
Effect on BEEP: 0 (dry) to 127 (wet)
Effect on BGMPLAY: 0 (dry) to 127 (wet)
Effect on TALK: 0 (dry) to 127 (wet)
Effect on PCMSTREAM: 0 (dry) to 127 (wet)
EFCWET 64,64,64,64 EFCWET 0,0,127,0
PCMCONT
・Set which array index will be used for the next time PCM data is sent at regular intervals.
The index of the array specified by PCMSTREAM
PCMPOS 1024
-Returns the array index from which the next transmission of PCM data, which is performed at regular intervals, will be performed.
The index of the array specified by PCMSTREAM
PCMPOS OUT P
PCMSTOP
An array containing PCM data. The 1D array is reproduced as monaural and the 2D array is reproduced as stereo sound.
Arrays are treated as ring buffers and can be rewritten while playing.
Sampling frequency (Hz) of data to be reproduced: 1 to 192000
・The default is 48000.
DIM PCMDATA[2,48000] PCMSTREAM PCMDATA,48000
An array containing PCM data on the left side of stereo audio.
Arrays are treated as ring buffers and can be rewritten while playing.
An array containing PCM data on the right side of stereo audio.
Arrays are treated as ring buffers and can be rewritten while playing.
Sampling frequency (Hz) of data to be reproduced: 1 to 192000
・The default is 48000.
DIM PCML[48000],PCMR[48000] PCMSTREAM PCML,PCMR,48000
Specify the channel to set the volume
0 | #PVLEFT | Left |
1 | #PVRIGHT | Right |
Volume to set: -32767 to 32767 (Specifying a negative value reverses the phase.)
Number of output samples until the set volume is reached
・0, if not specified.
PCMVOL 0,0,48000
Specify the channel to set the volume
0 | #PVLEFT | Left |
1 | #PVRIGHT | Right |
・If not specified, it's both.
Volume to set: -32767 to 32767 (Specifying a negative value reverses the phase.)
PCMVOL 16384
Current left channel or monaural volume: -32767 to 32767
Current right channel volume: -32767 to 32767
PCMVOL OUT L,R
Recording complete/stop=0, Recording = 1
RECSTART 10 WHILE RECCHK():WEND
0 to RECLEN()-1
Left channel sample value
Right channel sample value
RECSTART 10 WHILE RECCHK():WEND FOR I=0 TO RECLEN()-1 RECDATA I OUT L,R NEXT
Buffer sample count
RECSTART 10 ? RECLEN() '480000
Sample position
RECSTART 10 WHILE RECCHK() ? RECPOS WEND
Specify a 1D array or a 2D array. The number of elements is adjusted automatically.
For a 1D array, the average value of the left and right samples. In the case of a 2D array, [0, x] is the left channel and [1, x] is the right channel sample value.
Number of samples to be taken
・If not specified, it's the same value as RECPOS().
Top position to take out sample
・0, if not specified.
RECSTART 5 BGMPLAY 3 WHILE RECCHK():WEND BGMSTOP DIM BUF[2,1] RECSAVE BUF WAIT 60 PCMSTREAM BUF,48000 INPUT A$
・Record at the sampling frequency 48KHz for the time given by the argument.
・Recording stops after the specified time.
・Use RECSTOP to stop during recording.
Number of seconds to record: 0.1 to 60
RECSTART 5 BGMPLAY 3 WHILE RECCHK():WEND BGMSTOP DIM BUF[2,1] RECSAVE BUF WAIT 60 PCMSTREAM BUF,48000 INPUT A$
・Record at sampling frequency of 48KHz (no time limit).
・The buffer is prepared for 5 seconds.
・Use RECSTOP to stop recording.
LENGTH=48000/3 DIM BUF[2,LENGTH] PCMSTREAM BUF,48000 PCMVOL 0,16384 PCMVOL 1,16384 RECSTART BGMPLAY 1 PPOS=0 WPOS=0 LOOP NPOS=RECPOS() IF PPOS!=NPOS THEN FOR I=PPOS to NPOS-1 RECDATA I OUT L,R BUF[0,WPOS]=L BUF[1,WPOS]=R WPOS=(WPOS+1) mod LENGTH NEXT PPOS=NPOS ENDIF ENDLOOP
RECSTART 10 WAIT 60*5 RECSTOP
・It can only be set within subprograms.
Balance to be set: 0 (sub side only) to 64 (main/sub equal) to 127 (main side only)
Time to reach the set balance: 0 to 32767 (seconds)
SNDMSBAL 0,3.5
Current balance
SNDMSBAL OUT B
・Settings from subprograms are ignored.
Volume to be set: 0 to 127
Time to reach the set volume: 0 to 32767 (seconds)
SNDMVOL 0,1.5
Current volume (changes within the specified time if it's fading)
V=SNDMVOL()
'BGM/BEEP/TALK SNDSTOP
a b d e f g h i j k m n o p q(n) r s t u w y z
by ch cl(hopping sound) dy gy hy ky my ny py sh ts
#(0.1 second no sound)
<SValue> Speed: 0 (Fast) to 1024 (Slow) Standard: 128
<PValue> Pitch: 0 (High) to 1024 (Low) Standard: 128
<VValue> Volume: 0 (Little) to 128 (Loud) Standard: 128
TALK "<S128>Konnichiwa. Watashiha, PetitCom4 desu." TALK "$<S128>koqnichiwa######watashiwa##puchikoqfoodesu"
TALKSTOP
Instrument number for setting the waveform: 224 to 255
Time to increase the volume to maximum: 0 to 127 (faster as the value increases)
Time until the volume decreases from the maximum value to become constant: 0 to 127 (faster as the value increases)
Volume when extending the sound: 0 to 127 (louder as the value increases)
Time until volume decreases to 0: 0 to 127 (faster as the value increases)
・When the release is set to 0, the playback sound cannot be stopped with BGMSTOP, but it can be forcibly stopped with the SNDSTOP command.
"00" to "FF" are continuously described as one sample of 8 bits (128 is subtracted and treated as a value of -128 to 127)
Specify with 16, 32, 64, 128, 256 and 512 samples
Specify the note number of the pitch of the defined waveform.
・The default is 69 ("O4A": A of octave 4).
WAVSET 224,127,0,0,127,"FF00"*8,69 BGMPLAY "@224O4A1"
・Version 3 compatibility mode
・Depending on sample length and reference pitch, correct pitch may not be produced.
Instrument number for setting the waveform: 224 to 255
Time to increase the volume to maximum: 0 to 127 (faster as the value increases)
Time until the volume decreases from the maximum value and becomes constant: 0 to 127 (faster as the value increases)
Volume when extending the sound: 0 to 127 (louder as the value increases)
Time until volume decreases to 0: 0 to 127 (faster as the value increases)
・When the release is set to 0, the playback sound cannot be stopped with BGMSTOP, but it can be forcibly stopped with the SNDSTOP command.
A 1D array containing waveforms
・One element is treated as one sample of 8 bits. (128 is subtracted and treated as a value of -128 to 127)
Specify the note number of the pitch of the defined waveform.
・The default is 69 ("O4A": A of octave 4).
Specify the index of the top position of the waveform.
・0, if not specified.
Specify the index of the end position of the waveform.
・If not specified, it'll be the end of the array.
DIM W[2048] WAVSETA 224,127,0,0,127,W,69,0,2047 BGMPLAY "@224O4A1"
・Accommodates waveforms as long as the sound memory capacity allows (at a sample frequency of 48000Hz for about 80 seconds)
・Loop setting and sample frequency can be specified.
・Depending on the sample length, reference pitch, and sample frequency, the correct pitch may not be produced.
Instrument number for setting the waveform: 224 to 255
Time to increase the volume to maximum: 0 to 127 (faster as the value increases)
Time until the volume decreases from the maximum value and becomes constant: 0 to 127 (faster as the value increases)
Volume when extending the sound: 0 to 127 (louder as the value increases)
Time until volume decreases to 0: 0 to 127 (faster as the value increases)
・When the release is set to 0, the playback sound cannot be stopped with BGMSTOP, but it can be forcibly stopped with the SNDSTOP command.
A 1D array containing waveforms
・One element is treated as one signed 16-bit sample.
The note number of the pitch of the defined waveform
・The default is 69 ("O4A": A of octave 4).
The index of the top position of the loop of the waveform (with offset)
・0, if not specifiied.
The index of the loop end position of the waveform (with offset)
・If not specified, it'll be the end of the array.
Waveform sample frequency (in Hz): 1 to 96000
・The default is 28160.
The index of the reference start position of the array
・0, if not specified.
Specify whether to loop when playing waveform in BEEP
・0, if not specified (does not loop).
DIM W[2048] WAVSETA 224,127,0,0,127,W,69,1024,2047,44100,0,#false BGMPLAY "@224O4A1"
Number of the track whose playback status is to be acquired: 0 to 15
・0, if not specified.
0: Not Playing
1: Playing
R=BGMCHK(1) PRINT R
Command string
-1: Normal
0: Error (string position that caused an interpretation error)
R=CHKMML("T120O4L4CC8D8EE8F8GA8G8E2") PRINT R
FALSE=Stopped, TRUE=Playing
RET=TALKCHK()