I'm fairly new to PD and am having trouble figuring out how to do something quite simple. I want to be able to get a bang whenever a certain sequence of two tones is heard by PD. I'm using fiddle~ to do the pitch detection and am able to detect single tones, but I want to be able to detect a sequence. For example, if I detect a pitch 61 followed by pitch 74, I want to output a bang. If I detect pitch 61 followed by any other value, I don't want any output.
In C, I would write something like:
if ((current_value == 74) && (last_value == 61)) do_something();
How do I do this in PD?