state machine frequence detecting

Hello, I need an idea for detecting frequencies. I have got an audio signal and I would check if a sequence of frequences are in the signal eg: I have got this frequencies: 100Hz, 600Hz, 800Hz, so I would create a statemachine that accepts this sequence of frequencies like frequence statemachin st; for each audio sample if signal has st.getFrequence then st.next else st.reset if st.final then accept Frequences and the order of the frequences are stored in a configuration file, so the state machine can have a lot of states. In some cases I can have got something like 100Hz, 600Hz, 800Hz, delay, 100Hz, 600Hz, 800Hz | 1 | | 2 | So the sequence must be accepted if one of the frequence block (1 || 2) is in the final state. I have read the howto about the Boost finale statemachine, but I can not make a decision if the Boost statemaschine is the correct structure to solve this problem. Can anyone help me to discuss the pro / cons for the Boost statemachine in this case? Thanks a lot Phil

On Jul 22, 2012, at 11:34 AM, Kraus Philipp
I need an idea for detecting frequencies. I have got an audio signal and I would check if a sequence of frequences are in the signal
I have read the howto about the Boost finale statemachine, but I can not make a decision if the Boost statemaschine is the correct structure to solve this problem.
Can anyone help me to discuss the pro / cons for the Boost statemachine in this case?
This may be a bit of a stretch, but if you could represent your sequence of frequencies as a container of int values, perhaps Boost.Xpressive? This kind of pattern-matching is a specialized kind of state machine, and Boost has a couple such libraries. (See also Boost.Regex.)
participants (2)
-
Kraus Philipp
-
Nat Goodspeed