Sonido#
Introducción#
The VEX AIM Coding Robot’s sounds allow users to play built-in sounds, custom audio files, and musical notes. It also includes controls for stopping sounds and detecting if audio is currently playing.
Below is a list of all blocks:
play sound — Plays a built-in sound from a predefined list.
play sound file — Plays a user-uploaded sound.
play note — Plays a musical note with a specified pitch, octave, and duration.
stop sound — Stops any currently playing sound.
sound active? — Checks if a sound is currently playing.
reproducir sonido#
El bloque reproducir sonido reproduce uno de los sonidos integrados del robot.
reproducir sonido [actúa feliz v] ▶
Parámetros |
Descripción |
|---|---|
sonido |
Uno de los sonidos incorporados que se muestran a continuación. |
flecha expansiva |
By default, this is a waiting block, so the robot will finish playing the sound before running the next block. To make the robot start playing the sound and immediately run the next block right away, expand the block to say and don’t wait. |
Nombre del sonido |
Reproducir sonido |
|---|---|
actúa feliz |
|
actuar triste |
|
actuar tontamente |
|
actuar enojado |
|
actuar emocionado |
|
seguir adelante |
|
mover hacia atrás |
|
Gire a la derecha |
|
Gire a la izquierda |
|
chocar |
|
frenos |
|
levantar |
|
detección |
|
detectado |
|
obstáculo |
|
brillar |
|
intermitente |
|
chirrido |
|
bucle |
|
completo |
|
enviar |
|
recibir |
|
pausa |
|
reanudar |
|
Tada |
|
fallar |
|
timbre de la puerta |
|
huah |
|
florecer |
|
alegría |
Ejemplo
cuando empezó
[Play the act happy sound.]
reproducir sonido [actúa feliz v] ▶
reproducir archivo de sonido#
El archivo de sonido de reproducción reproduce un sonido personalizado cargado por el usuario.
reproducir archivo de sonido [1 v] ▶
Parámetros |
Descripción |
|---|---|
número de ranura de sonido |
El sonido personalizado a utilizar, número del 1 al 10. El número del sonido se alinea con el número que se muestra en el Panel de control de AIM. |
flecha expansiva |
By default, this is a waiting block, so the robot will finish playing the note before running the next block. To make the robot start playing the note and immediately run the next block right away, expand the block to say and don’t wait. |
Ejemplo
cuando empezó
[Upload a sound file in VEXcode.]
[Play the custom sound.]
reproducir archivo de sonido [1 v] ▶
nota de reproducción#
El bloque reproducir nota reproduce una nota específica durante una duración específica.
tocar nota [bajo v] [C v] [note_eight v] ▶
Parámetros |
Descripción |
|---|---|
octava |
La octava de la nota:
|
nota |
Define la altura musical:
|
longitud de la nota |
Sets the length of the note:
|
flecha expansiva |
Expande el bloque para indicar “no esperar” y conviértelo en un bloque sin espera. Por defecto, este bloque es un bloque de espera. |
Ejemplo
cuando empezó
[Play a short tune.]
tocar nota [bajo v] [C v] [note_half v] ▶
tocar nota [bajo v] [D v] [note_quarter v] ▶
tocar nota [bajo v] [E v] [note_sixteenth v] ▶
detener el sonido#
El bloque detener sonido detiene un sonido que se está reproduciendo actualmente.
detener el sonido
Parámetros |
Descripción |
|---|---|
Este bloque no tiene parámetros. |
Ejemplo
cuando empezó
[Stop sound if it is still playing after 2 seconds]
reproducir archivo de sonido [1 v] ◀ y no esperes
esperar (2) segundos
si <¿Suena activo?> entonces
detener el sonido
fin
¿Suena activo?#
El bloque ¿sonido activo? devuelve un valor booleano que indica si algún sonido se está reproduciendo actualmente.
True — There is a sound playing.
False — There is no sound playing.
<¿Suena activo?>
Parámetros |
Descripción |
|---|---|
Este bloque no tiene parámetros. |
Ejemplo
cuando empezó
[Stop sound if it is still playing after 2 seconds]
reproducir archivo de sonido [1 v] ◀ y no esperes
esperar (2) segundos
si <¿Suena activo?> entonces
detener el sonido
fin