Skip to content

Commit fbaac5b

Browse files
committed
Sound effect descriptions
1 parent ba4b48e commit fbaac5b

File tree

2 files changed

+40
-22
lines changed

2 files changed

+40
-22
lines changed

src/sfeQwiicBuzzer.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,6 @@ uint8_t sfeQwiicBuzzer::address()
127127
return _theBus->address();
128128
}
129129

130-
/*------------------------- Sound Effects ---------------- */
131-
132130
sfeTkError_t sfeQwiicBuzzer::playSoundEffect(const uint8_t &soundEffectNumber, const uint8_t &volume)
133131
{
134132
sfeTkError_t err;
@@ -171,7 +169,6 @@ sfeTkError_t sfeQwiicBuzzer::playSoundEffect(const uint8_t &soundEffectNumber, c
171169
return err;
172170
}
173171

174-
// SIREN SLOW X1
175172
sfeTkError_t sfeQwiicBuzzer::soundEffect0(const uint8_t &volume)
176173
{
177174
sfeTkError_t err;
@@ -198,7 +195,6 @@ sfeTkError_t sfeQwiicBuzzer::soundEffect0(const uint8_t &volume)
198195
return off();
199196
}
200197

201-
// SIREN FAST X3
202198
sfeTkError_t sfeQwiicBuzzer::soundEffect1(const uint8_t &volume)
203199
{
204200
sfeTkError_t err;
@@ -224,7 +220,6 @@ sfeTkError_t sfeQwiicBuzzer::soundEffect1(const uint8_t &volume)
224220
return off();
225221
}
226222

227-
// YES SLOW
228223
sfeTkError_t sfeQwiicBuzzer::soundEffect2(const uint8_t &volume)
229224
{
230225
sfeTkError_t err;
@@ -239,7 +234,6 @@ sfeTkError_t sfeQwiicBuzzer::soundEffect2(const uint8_t &volume)
239234
return off();
240235
}
241236

242-
// YES FAST
243237
sfeTkError_t sfeQwiicBuzzer::soundEffect3(const uint8_t &volume)
244238
{
245239
sfeTkError_t err;
@@ -254,7 +248,6 @@ sfeTkError_t sfeQwiicBuzzer::soundEffect3(const uint8_t &volume)
254248
return off();
255249
}
256250

257-
// NO SLOW
258251
sfeTkError_t sfeQwiicBuzzer::soundEffect4(const uint8_t &volume)
259252
{
260253
sfeTkError_t err;
@@ -269,7 +262,6 @@ sfeTkError_t sfeQwiicBuzzer::soundEffect4(const uint8_t &volume)
269262
return off();
270263
}
271264

272-
// NO FAST
273265
sfeTkError_t sfeQwiicBuzzer::soundEffect5(const uint8_t &volume)
274266
{
275267
sfeTkError_t err;
@@ -284,7 +276,6 @@ sfeTkError_t sfeQwiicBuzzer::soundEffect5(const uint8_t &volume)
284276
return off();
285277
}
286278

287-
// LAUGH
288279
sfeTkError_t sfeQwiicBuzzer::soundEffect6(const uint8_t &volume)
289280
{
290281
sfeTkError_t err;
@@ -346,7 +337,6 @@ sfeTkError_t sfeQwiicBuzzer::soundEffect6(const uint8_t &volume)
346337
return off();
347338
}
348339

349-
// LAUGH FAST
350340
sfeTkError_t sfeQwiicBuzzer::soundEffect7(const uint8_t &volume)
351341
{
352342
sfeTkError_t err;
@@ -407,7 +397,6 @@ sfeTkError_t sfeQwiicBuzzer::soundEffect7(const uint8_t &volume)
407397
return off();
408398
}
409399

410-
// CRY SLOW
411400
sfeTkError_t sfeQwiicBuzzer::soundEffect8(const uint8_t &volume)
412401
{
413402
sfeTkError_t err;
@@ -454,7 +443,6 @@ sfeTkError_t sfeQwiicBuzzer::soundEffect8(const uint8_t &volume)
454443
return off();
455444
}
456445

457-
// CRY FAST
458446
sfeTkError_t sfeQwiicBuzzer::soundEffect9(const uint8_t &volume)
459447
{
460448
sfeTkError_t err;

src/sfeQwiicBuzzer.h

Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -107,52 +107,82 @@ class sfeQwiicBuzzer
107107
sfeTkError_t playSoundEffect(const uint8_t &soundEffectNumber, const uint8_t &volume);
108108

109109
private:
110-
/// @brief Plays sound effect 0
110+
/// @brief Plays sound effect 0 (aka "Siren")
111+
/// Intended to sound like a siren, starting at a low frequency, and then
112+
/// increasing rapidly up and then back down. This sound effect does a
113+
/// single "up and down" cycle.
111114
/// @param volume Volume (4 settings; 0=off, 1=quiet... 4=loudest)
112115
/// @return 0 for succuss, negative for errors, positive for warnings
113116
sfeTkError_t soundEffect0(const uint8_t &volume);
114117

115-
/// @brief Plays sound effect 1
118+
/// @brief Plays sound effect 1 (aka "3 Fast Sirens")
119+
/// Intended to sound like a siren, starting at a low frequency, and then
120+
/// increasing rapidly up and then back down. This sound effect does this
121+
/// cycle of "up and down" three times rapidly.
116122
/// @param volume Volume (4 settings; 0=off, 1=quiet... 4=loudest)
117123
/// @return 0 for succuss, negative for errors, positive for warnings
118124
sfeTkError_t soundEffect1(const uint8_t &volume);
119125

120-
/// @brief Plays sound effect 2
126+
/// @brief Plays sound effect 2 (aka "robot saying 'Yes'")
127+
/// Intended to sound like a robot saying the word "yes".
128+
/// It starts at a low frequency and quickly ramps up to a high frequency,
129+
/// then stops. This can be interpreted by most to be an affirmative
130+
/// sound to any question you may ask your buzzing robot.
121131
/// @param volume Volume (4 settings; 0=off, 1=quiet... 4=loudest)
122132
/// @return 0 for succuss, negative for errors, positive for warnings
123133
sfeTkError_t soundEffect2(const uint8_t &volume);
124134

125-
/// @brief Plays sound effect 3
135+
/// @brief Plays sound effect (aka "robot yelling 'YES!'" - faster)
136+
/// Intended to sound like a robot saying the word "yes".
137+
/// It starts at a low frequency and quickly ramps up to a high frequency,
138+
/// then stops. This can be interpreted by most to be an affirmative
139+
/// sound to any question you may ask your buzzing robot. As this sound
140+
/// is done more quickly, it can add enthusiasm to the buzzing sound.
126141
/// @param volume Volume (4 settings; 0=off, 1=quiet... 4=loudest)
127142
/// @return 0 for succuss, negative for errors, positive for warnings
128143
sfeTkError_t soundEffect3(const uint8_t &volume);
129144

130-
/// @brief Plays sound effect 4
145+
/// @brief Plays sound effect (aka "robot saying 'No'")
146+
/// Intended to sound like a robot saying the word "no".
147+
/// It starts at a high frequency and quickly ramps down to a low frequency,
148+
/// then stops. This can be interpreted by most to be an negative
149+
/// sound to any question you may ask your buzzing robot.
131150
/// @param volume Volume (4 settings; 0=off, 1=quiet... 4=loudest)
132151
/// @return 0 for succuss, negative for errors, positive for warnings
133152
sfeTkError_t soundEffect4(const uint8_t &volume);
134153

135-
/// @brief Plays sound effect 5
154+
/// @brief Plays sound effect 5 (aka "robot yelling 'NO!'" - faster)
155+
/// Intended to sound like a robot saying the word "no".
156+
/// It starts at a high frequency and quickly ramps down to a low frequency,
157+
/// then stops. This can be interpreted by most to be an negative
158+
/// sound to any question you may ask your buzzing robot. As this sound
159+
/// is done more quickly, it can add enthusiasm to the buzzing sound.
136160
/// @param volume Volume (4 settings; 0=off, 1=quiet... 4=loudest)
137161
/// @return 0 for succuss, negative for errors, positive for warnings
138162
sfeTkError_t soundEffect5(const uint8_t &volume);
139163

140-
/// @brief Plays sound effect 6
164+
/// @brief Plays sound effect 6 (aka "Laughing Robot")
165+
/// Intended to sound like your robot is laughing at you.
141166
/// @param volume Volume (4 settings; 0=off, 1=quiet... 4=loudest)
142167
/// @return 0 for succuss, negative for errors, positive for warnings
143168
sfeTkError_t soundEffect6(const uint8_t &volume);
144169

145-
/// @brief Plays sound effect 7
170+
/// @brief Plays sound effect 7 (aka "Laughing Robot Faster")
171+
/// Intended to sound like your robot is laughing at you. As this sound
172+
/// is done more quickly, it can add enthusiasm to the buzzing sound.
146173
/// @param volume Volume (4 settings; 0=off, 1=quiet... 4=loudest)
147174
/// @return 0 for succuss, negative for errors, positive for warnings
148175
sfeTkError_t soundEffect7(const uint8_t &volume);
149176

150-
/// @brief Plays sound effect 8
177+
/// @brief Plays sound effect 8 (aka "Crying Robot")
178+
/// Intended to sound like a robot is crying and sad.
151179
/// @param volume Volume (4 settings; 0=off, 1=quiet... 4=loudest)
152180
/// @return 0 for succuss, negative for errors, positive for warnings
153181
sfeTkError_t soundEffect8(const uint8_t &volume);
154182

155-
/// @brief Plays sound effect 9
183+
/// @brief Plays sound effect 9 (aka "Crying Robot Faster")
184+
/// Intended to sound like a robot is crying and sad. As this sound
185+
/// is done more quickly, it can add enthusiasm to the buzzing sound.
156186
/// @param volume Volume (4 settings; 0=off, 1=quiet... 4=loudest)
157187
/// @return 0 for succuss, negative for errors, positive for warnings
158188
sfeTkError_t soundEffect9(const uint8_t &volume);

0 commit comments

Comments
 (0)