Music¶
Music include MoonBot Kit Controller Module buzzer drive and external Drive Speaker Module.
By calling these modules, you can control MoonBot Kit to play music.
Speaker initialization¶
- Introduction
Initializes the speaker connected to the specified port.
- Parameters
- port
2,7,9
Speaker Setting Play Mode¶
- Introduction
Set up the playback mode of the speaker.
- Parameters
- Play mode
Single Play
:Stop playing after playing specified musicSingle tune circulation
:Play specified music in a loopPlay all
:Play the next music in the music list automatically after playing the specified musicRandom Play
:Play one of the music lists randomly after playing the specified music
Speakers Play Music¶
- Introduction
Play music with a given name.
- Parameters
- Music Name
:the drop-down menu for the module
Speaker Plays Custom Music¶
- Introduction
Play music with the specified music name.
Users need to put corresponding custom music into loudspeakers before this operation.(How to save music?),The first four words of a musical name should be letters or numbers.
- Parameters
- Music Name
:Customize the first four characters of the music name,Support only ** English ** or ** Numbers **
Speaker Play Setting¶
- Introduction
Set the current speaker playback status.
- Parameters
- Play settings
Play/pause
:Play or pause current musicNext song
:Play the next music in the music listLast song
:Play the last music in the music listStop
:Stop playing music
Loudspeaker set volume¶
- Introduction
Set the loudspeaker volume.
- Parameters
- volume
0~32
Buzzer Plays Scales¶
- Introduction
Buzzer to play scales in a set beat
- Parameters
- Scale
High, middle and low levels
- Rhythm
1/16~4 beat
:Single beat time can be set by buzzer.
Buzzer pauses play¶
- Introduction
The time when the buzzer pauses to play a given beat.
- Parameters
- Rhythm
1/16~4 beat
:Single beat time can be set by buzzer.
Buzzer Sets Play Rhythm¶
- Introduction
Set the number of beats per minute (BPM) of buzzer.
- Parameters
- beats per minute
Buzzer Play Frequency¶
- Introduction
Set up a buzzer to play music at a specified frequency at a given time.
- Parameters
- frequency
0~65535
:Frequency Recommendation Setting in the Frequency Range acceptable to the Human Ear(20~20000Hz)
- time
0
:Continuous broadcastingother
:Stop playing for a specified length of time
Buzzer stop playing¶
- Introduction
The buzzer stopped playing sound.