Sonido#
Introducción#
El controlador de drones VEX AIR permite reproducir sonidos integrados, archivos de audio personalizados y notas musicales. También incluye controles para detener sonidos y detectar si se está reproduciendo audio.
A continuación se muestra una lista de todos los bloques disponibles:
Sonidos - Reproducir y detener sonidos
reproducir sonido — Reproduce un sonido integrado de una lista predefinida.
reproducir archivo de sonido — Reproduce un sonido cargado por el usuario.
tocar nota — Reproduce una nota musical con un tono, una octava y una duración específicos.
detener sonido — Detiene cualquier sonido que se esté reproduciendo actualmente.
sound active — Checks if a sound is currently playing.
Sonidos#
reproducir sonido#
The play sound stack block plays one of the controller’s built-in sounds.
reproducir sonido [seguir adelante v] ▶
Parámetros |
Descripción |
|---|---|
sonido |
Uno de los sonidos incorporados que se muestran a continuación. |
and don’t wait |
Select the arrow ( ▶ ) to expand the block to say and don’t wait, so the next block in the stack will run right away. |
Nombre del sonido |
Reproducir sonido |
|---|---|
éxito |
|
fallar |
|
detección |
|
detectado |
|
obstáculo |
|
bucle |
|
completo |
|
pausar |
|
reanudar |
|
enviar |
|
recibir |
Ejemplo
cuando empezó
[Play the looping sound.]
reproducir sonido [bucle v] ▶
reproducir archivo de sonido#
The play sound file stack plays a custom sound loaded by the user.
reproducir archivo de sonido [SOUND1 v] ▶
Parámetros |
Descripción |
|---|---|
número de ranura de sonido |
El sonido subido por el usuario que se usará. Las opciones cambiarán si se editan los nombres de las imágenes en el Panel de control. |
and don’t wait |
Select the arrow ( ▶ ) to expand the block to say and don’t wait, so the next block in the stack will run right away. |
Ejemplo
cuando empezó
[Upload a sound file in VEXcode.]
[Play the custom sound.]
reproducir archivo de sonido [SOUND1 v] ▶
tocar nota#
The play note stack block plays a specific note for a specific duration.
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 |
Establece la duración de la nota:
|
and don’t wait |
Select the arrow ( ▶ ) to expand the block to say and don’t wait, so the next block in the stack will run right away. |
Ejemplo
cuando empezó
[Play a short tune.]
tocar nota [bajo v] [C v] [note_quarter v] ▶
tocar nota [bajo v] [D v] [note_quarter v] ▶
tocar nota [bajo v] [E v] [note_sixteenth v] ▶
detener el sonido#
The stop sound stack block stops a sound that is currently playing.
detener el sonido
Parámetros |
Descripción |
|---|---|
Este bloque no tiene parámetros. |
Ejemplo
cuando empezó
[Upload a sound 10 seconds or greater in VEXcode.]
[Stop the sound while it is playing.]
reproducir archivo de sonido [1 v] ◀ y no esperes
esperar [6] segundos
detener el sonido
sound active#
The sound active Boolean block reports if there is any sound currently playing.
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ó
[Display when the sound is playing.]
reproducir sonido [bucle v] ◀ y no esperes
esperar hasta <¿Suena activo?>
imprimir [I hear the sound!] en la consola ▶