Speaker
Codey's on-board speaker enables Codey to play sound. You can write music, add sound effects, and do other fun stuff with Codey's speaker.
1. play sound ()
Make Codey's speaker play a specified sound.

Sound Effect
hello
hi
bye
yeah
wow
laugh
hum
sad
sigh
annoyed
angry
scared
pettish
curious
embarrassed
ready
sprint
snore
meow
start
switch
beeps
buzz
air-out
explosion
gotcha
painful
jump
laser
level-up
low-energy
metal-clash
prompt-tone
right
wrong
ringtone
score
shot
step_1
step_2
activate
warning
Example:

Press Button A. Codey will play the sound "hello".
2. play sound () until done
Make Codey's speaker play a specified sound, and wait until it's done.

Example:

Press Button A. Codey will play the sound "hello".
3. stop all sounds
Make Codey's speaker stop playing all sounds.

Example:

Press Button A. Codey will play the sound "hello" for 10 times, and then stop all sounds.
4. play note () for () beats
Make Codey's speaker play a specified note for specified number of beats.

Example:

Press Button A. Codey will play the note "C4" for 0.25 beat.
5. rest for () beats
Make Codey's speaker stop playing sounds and wait for specified number of beats.

Example:

Press Button A. Codey will play the note "C4" for 0.25 beat 5 times, and after waiting for 0.25 beat, play the note "G4" for 0.25 beat 5 times.
6. play sound at frequency of () HZ for () secs
Make Codey's speaker play sound at specified frequency for a specified period of time.

Example:

Press Button A. Cody will play a 700Hz sound for one second.
7. change volume by ()
Change the sound volmue of Codey's speaker. Input positive number to increase sound volume, or negative number to decrease sound volume.

Example:

Press Button A to decrease sound volume of Codey's speaker by 10.
8. set volume to ()%
Set the sound volume of Codey's speaker to specified percentage (0 ~ 100).

Example:

When Codey starts up, the sound volume of the speaker will be set to 60%.
9. volume
Report the sound volume of Codey's speaker.

Example:

Press Button A. The current sound volume of Codey's speaker will be displayed on the screen.
Last updated
Was this helpful?