BlocklyProp blocks for generating audio. See each block for board type compatibility.
Compatible with all Propeller board types
The frequency out block generates pulses of the specified frequency and duration on an I/O pin. An example use would be generating beeps on a piezospeaker.
The PIN menu this block can be set to "other." When "other" is chosen, the dropdown menu disappears, and it is replaced with an input. You can then use any block that provides a numeric value such as a number value, get variable, or constant value block:
This block launches a processor automatically. Use only one instance of this block per project.
Compatible only with the Activity Board WX and Badge WX board types.
The sound initialize block starts the polyphonic (multi-tone) sound process.
Available for Activity Board WX, FLiP, and both Badge board types.
The sound play block controls the frequency, volume, and waveform generated on the selected channel.
Using either text to speech block will launch one processor (only one total, NOT one per block).
For the Hackable Electronic Badge and Badge WX.
The TTS say block phonetically pronounces the letter characters in the attached text string block.
Using either text to speech block will launch one processor (only one total, NOT one per block).
For the Hackable Electronic Badge and Badge WX.
The TTS spell block pronounces each letter character from left to right in the attached text string block.
This block is ONLY available for the Propeller Activity Board WX and Badge WX board type.
This block launches TWO processors automatically.
The WAV play block does the following:
*Compatible with FAT32-formatted microSD cards, such as Parallax #32328 [1].
The WAV file on the microSD card must be in the correct format.
Options from our Sound Library reference section: [2]
WAV BLOCKS MUST BE USED WITH OTHER TYPES OF BLOCKS. The WAV play block launches processors to manage the SD card and generate the audio output. However, once the first processor has launched the others, it will shut itself down if it does not have any other blocks to execute. This breaks the project, and instead of hearing your audio track, you will just hear a buzzing sound. To avoid this, the first processor must keep running.
If your project does other things, like blink lights or make a robot move, your WAV file will play as long as other code keeps running.
If your project does NOT do other things and all you want to do is play the WAV file, do one of these two things:
This block is ONLY available for the Propeller Activity Board WX and Badge WX board type.
The WAV status block provides a value of 1 (one/true) if a WAV file is currently playing and a value of 0 (zero/false) if a WAV file is not currently playing.
This block is ONLY available for the Propeller Activity Board WX and Badge WX board type.
The WAV volume block set the volume of the Propeller’s WAV player. A value of 0 is quietest, and 10 is loudest.
This block is ONLY available for the Propeller Activity Board WX and Badge WX board type.
The WAV stop block stops playing a WAV file.
Compatible only with the Activity Board WX
The WAV set pins block is used only at the beginning of your program to send the WAV file player output to different pins.
Links
[1] https://www.parallax.com/product/8-gb-microsdhc-card/
[2] https://learn.parallax.com/support/reference/sound-library