Sonido#
Introducción#
El robot de programación VEX AIM permite a los usuarios reproducir sonidos integrados, archivos de audio personalizados y notas musicales. Además, incluye controles para detener la reproducción de sonidos y detectar si se está reproduciendo algún audio.
A continuación se muestra una lista de todos los bloques:
reproducir sonido — Reproduce un sonido incorporado de una lista predefinida.
reproducir archivo de sonido — Reproduce un sonido subido por el usuario.
reproducir nota — Reproduce una nota musical con un tono, octava y duración especificados.
detener sonido — Detiene cualquier sonido que se esté reproduciendo actualmente.
sound active — Checks if a sound is currently playing.
reproducir sonido#
The play sound stack block plays one of the robot’s built-in sounds.
play sound [act happy 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 |
|---|---|
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
when started
[Play the act happy sound.]
play sound [act happy v] ▶
reproducir archivo de sonido#
The play sound file stack block plays a custom sound loaded by the user.
play sound file [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. |
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
when started
[Upload a sound file in VEXcode.]
[Play the custom sound.]
play sound file [1 v] ▶
nota de reproducción#
El bloque reproducir nota reproduce una nota específica durante una duración específica.
play note [low v] [C v] [note_eight v] ▶
Parámetros |
Descripción |
|---|---|
octava |
The octave of the note: low or high. |
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
when started
[Play a short tune.]
play note [low v] [C v] [note_half v] ▶
play note [low v] [D v] [note_quarter v] ▶
play note [low v] [E v] [note_sixteenth v] ▶
detener el sonido#
The stop sound stack block stops a sound that is currently playing.
stop sound
Parámetros |
Descripción |
|---|---|
Este bloque no tiene parámetros. |
Ejemplo
when started
[Stop sound if it is still playing after 2 seconds]
play sound file [1 v] ◀ and don't wait
wait (2) seconds
if <sound active?> then
stop sound
fin
sound active#
The sound active Boolean block reports whether any sound is currently playing.
True — There is a sound playing.
False — There is no sound playing.
<sound active?>
Parámetros |
Descripción |
|---|---|
Este bloque no tiene parámetros. |
Ejemplo
when started
[Stop sound if it is still playing after 2 seconds]
play sound file [1 v] ◀ and don't wait
wait (2) seconds
if <sound active?> then
stop sound
fin