Switching with audio

Hi,

Is there a way to switch between two signals using the input signal?

I would like to feed a clock signal into the audio input and use this to swith inside sigma studio between signal paths (ie route track 1 to output 2, route track 2 to output 3, route track 3 to output 1 and back again . Ideally with the option to set the amount of pulses that have to come in until the signals are switched as well as the amount of pulses that have to come in to switch back again. I suppose there isn't a way to extract timing information out of a clock signal and switch referring to the tempo?

Thanks for helping

cheers,

Jens

  • 0
    •  Super User 
    on Oct 29, 2020 7:29 PM 25 days ago

         Hello Jens,

         Please help us understand some details about your application: 

    • What sort of clock pulses appear at your audio input?  How fast might they come?
    • What are the tracks to be switched?  Are these audio inputs as well?  Separate from the clock input?
    • When switching according to pulse counts, what adjustment range is needed?
    • When switching by tempo, at what range of tempo should the switching occur?
    • Which DSP are you designing with?

         Best regards,

         Bob

  • Hi Bob,

    Thanks for your answer. 

    I am using an adau 1701. The clock inputsignal is going to be 30 ms long square pulses (coming from a modular clock, not sure if the audio in is fine with such signals) or an audio signal (Bassdrum or similar) that is converted to a "on" signal using your comparator circuit you designed to extract trigger from incoming audio. 

    The incoming signals are somewhere around 125 bpm.

    The signals I want to switch are also "on" signals created with your circuit. the left input gets divided in 3 tracks each with different settings resulting in 3 tracks with different trigger signals. the right input should get the clocksignal through the audio in r and converts those to "on" signals as well. I want to use those to do several things. one would be to route track 1 onto output 2, track 2 onto output 3, track 3 onto output 1. the signals created from the audio coming in on channel are used to set gpio pins high which then are converted into triggersignals with 5 V and used to trigger synthesizer. I want to build in some variation tools. For example that on every 14th signal from the other input (the clock input) the outputs are switched for 2 signals and a couple of other things.

    I could probably extract midi clock of a midi signal using the teensy I am using to control the dsp but if this would work it would open the door to lots of other tempo releated functions within the dsp. I guess there is no way to get some kind of timing reference into the dsp other than doing it like this? At a later point I might add also CV in to get even more access and ability to change either parameters using I2C (when getting the cv into the teensy using an ad converter) or using the gpios.

    Regarding the switching range I think on and off will be fine even if possible I think it is going to get really trickyotherwise. Maybe there is a way to incorporate a second counter (one that activates switching on signal 14-16 and one that switches on every 14-16, 45-48 etc signal so variations could even occur not every bar. If this is possible obviously those things could be nested into each other allowing complex variations and a couple of "switching setups". I hope this makes sense.

    Cheers,

    Jens

  • 0
    •  Super User 
    on Oct 30, 2020 1:07 AM 25 days ago in reply to jenskuehnemann

         Hello Jens,

         Much of this goes over my head as I'm not familiar with MIDI.  Thus the project shown below does some of what I think you want, yet quite likely not what you really need.  It counts pulses from its right input, switching among three outputs when the count reaches a settable number, and back at a second number.

         The incoming Left channel splits into three tracks, here they are filtered differently to distinguish them.  The right channel accepts the clock input, which I simulated with a pulse gen.  Since the counter advances at the rise and fall of each beat. set the number of beats at twice desired.  Your Teensy can set these DC Sources via I2C.

         It's possible yet not trivial to count sample intervals between beats and work this into a bpm reading.   Also I suspect that everything you're looking for may exceed what a -1701 can handle.  Thus you may need to trade off features to keep your project manageable.

         Best regards,

         Bob

  • Awesome, thanks a lot for that. I will check as soon as I am coming home tomorrow. I didn't expect it to be that complex. Hopefully I won't reach the dsp's limits. Alternatively I will have to time within the teensy and switch using i2c.

    Thanks a lot for yozr help.

  • 0
    •  Super User 
    on Oct 30, 2020 2:03 AM 25 days ago in reply to jenskuehnemann

         Oops, I forgot to attach the project -- here it is:

    Trig-Sw.zip