Add wait() finite state machine schema
3
schemas/wait_fsm.svg
Normal file
3
schemas/wait_fsm.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 8.7 KiB |
@@ -9,7 +9,7 @@ wait(noiseThreshold: int, silenceThreshold: int)
|
|||||||
Suspends the script execution and waits for incoming sound through connected microphone. When the function detects sound with level greater than `noiseThreshold`, it waits until the level of the sound is less than `silenceThreshold`. After that it resumes the script execution.
|
Suspends the script execution and waits for incoming sound through connected microphone. When the function detects sound with level greater than `noiseThreshold`, it waits until the level of the sound is less than `silenceThreshold`. After that it resumes the script execution.
|
||||||
|
|
||||||
The algorithm can be described using following model of finite states machine:
|
The algorithm can be described using following model of finite states machine:
|
||||||
[[model/wait_fsm.svg]]
|
[[schemas/wait_fsm.svg]]
|
||||||
|
|
||||||
##### Example
|
##### Example
|
||||||
This function could be useful in some ear-training scenarios, when you need to i.e. play some notes and then wait for a user to repeat them and then do the same in another key, like:
|
This function could be useful in some ear-training scenarios, when you need to i.e. play some notes and then wait for a user to repeat them and then do the same in another key, like:
|
||||||
|
|||||||
Reference in New Issue
Block a user