Logic OR behaving as XOR [SOLVED]


#1

I'm building an 8-step sequencer, with 4 controls: three knobs to select three possible "active/on" steps and a general probability knob:

8step.axp (15.2 KB)

The "stepnr" inlet is just an 0-7 counter. The three active step ("BLU1-3") controls work as intended. The probability control ("BLUprob") is giving me trouble though: when probability is turned up to max the final logic OR object suddenly acts like an XOR - instead of triggering every step it triggers every step EXCEPT the ones selected by the 3 "active step" controls, effectively inverting the pattern. Lower probability values work fine.

Any idea what's going on here?


#2

Extra strangeness: If I monitor the final trigger output with a disp/b or /chart object, the 3 selected triggers are visible, but the random ones from the "%bang in" are not - the sample player that the triggers eventually go to does trigger on those steps though!


#3

After some more checking: there are problems with the active step controls after all. If two adjacent steps (eg. 0+1, 4+5, 7+0...) are set to active, only the one with the lower step nr will trigger (i.e. the earlier one, except for 7+0).

This leads me to believe that all these issues are related to the pulse length of bools? At maximum clock speed it still affects immediately adjacent active steps though.


#4

Yup. The == bools were toggles and not pulses, messing up the whole system.
Logic "and" gates between the == and mux8 objects, connected to the global clock pulse sorted it all out!

Once again I solved it while talking to myself here xD
Sorry for keeping making these topics, it just really helps me work it out when I verbalise it!


#5

this is expected behaviour. not all short pulses can be seen with a display object.


#6

yeah I guess it's better to monitor pulses with a counter


#7

Don't apologize, this type of thread is extremly useful, as very likely someone else will have a similar problem but has not thought to ask, or if nothing else it's something to consider when writing a new object that one might not have thought of otherwise.