I’m making an Arduino-based (drum)sequencer, and started thinking what it actually should output. Trigger signals are usually 1-10 ms long pulses, while clock signal is 50-50 pulse width square wave?
When triggering drums, is there any downside to having those longer clock-like pulses? When making a sequencer, I could just make it count the clock signal pulses and have output be high as long as the clock pulse originally is. That wouldn’t need any internal sample rate or time counting in code to have pulses that have certain length. Also, the user could vary the pulse width of the original clock signal and even use the output of the sequencer as a gate signal instead of just a trigger.
Hi!
I’ve built an Arduino-based clock divider, and I’m currently working on an Arduino-based drum sequencer too. This is exactly what I do. The output pulse length is sync’ed to the input pulse length. This means both the rising and falling edges of the clock signal can trigger an interrupt on the Arduino, and a timing-critical operation (timing the pulse length) is eliminated.
Cheers!
Frequently in hardware trigger sequencers, clock dividers, etc., a long gate is produced which goes through a logic AND with the input clock signal, so the output is on the same amount of time as the clock.
Depends on the design of the drum, but usually drums have a gate to pulse converter on the input, so they can be triggered with (the rising edge of) a pulse or gate of just about any length.