Threshold: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(→Example Flowgraphs: : Adding reference to the Audio Source page's Sound Detector example) |
||
(6 intermediate revisions by 3 users not shown) | |||
Line 13: | Line 13: | ||
; High (''R'') | ; High (''R'') | ||
: | : High threshold. Outputs 1 if input goes above it | ||
; Initial value | ; Initial value | ||
: Value to output before the input reach one of the thresholds. Can be any value, not just 0 or 1. | : Value to output before the input reach one of the thresholds. Can be any value, not just 0 or 1. | ||
== Example | == Example Flowgraphs == | ||
=== Simple Example === | |||
This flowgraph can be found at [[Media:threshold_example.grc]] | |||
[[File:Threshold_Example.png|800px]] | |||
[[File:Threshold_Result.png]] | |||
=== Advanced Example === | |||
This flowgraph can be found at [https://raw.githubusercontent.com/gnuradio/gnuradio/master/gr-pdu/examples/tags_to_pdu_example.grc] | |||
[[File:Tags_to_pdu_fg.png|800px]] | |||
=== Audio Example === | |||
The [[Audio_Source#Sound_detector_and_notifier|Sound detector and notifier]] example on the [[Audio Source]] page contains a simple threshold volume detector. | |||
== Source Files == | == Source Files == |
Latest revision as of 00:49, 7 January 2022
Output a 1 or zero based on a threshold value.
Test the incoming signal against a threshold. If the signal excedes the High value, it will change its output to 1, and if the signal falls below the Low value, it will change its output to 0.
Parameters
(R): Run-time adjustable
- Low (R)
- Low threshold. Outputs 0 if input goes below it
- High (R)
- High threshold. Outputs 1 if input goes above it
- Initial value
- Value to output before the input reach one of the thresholds. Can be any value, not just 0 or 1.
Example Flowgraphs
Simple Example
This flowgraph can be found at Media:threshold_example.grc
Advanced Example
This flowgraph can be found at [1]
Audio Example
The Sound detector and notifier example on the Audio Source page contains a simple threshold volume detector.
Source Files
- C++ files
- Here
- Header files
- Here
- Public header files
- Here
- Block definition
- Yaml