Goal:
Now let’s program what will happen when we move the PitchSlider.
This code will change the pitch of the TextToSpeech voice every time that the slider is moved.
Steps:
- Under the section labeled Blocks select PitchSlider.
- Grab and place the block labeled “when PitchSlider.PositionChanged”.
- Under Blocks select TextToSpeech1.
- Grab and place the block labeled “set TextToSpeech1.Country”.
- Change “Country” to say “Pitch”.
- On the “when PitchSlider.PositionChanged” block, hover your mouse over “thumbPosition”.
- Then grab the “get thumbPosition” block and place it inside the “set TextToSpeech1.Pitch” block.