Author |
Message |
jamos

Joined: Jun 01, 2004 Posts: 514 Location: Eugene, Oregon, USA
Audio files: 4
G2 patch files: 41
|
Posted: Sat Aug 17, 2013 2:18 pm Post subject:
A good multiplexer? |
 |
|
Can anyone point me to a patch that contains a good, reliable, fast-as-possible 8 or 16 channel interslot multiplexer? I am unable to make mine work reliably.
Thx x 10^6 |
|
Back to top
|
|
 |
Tim Kleinert
Joined: Mar 12, 2004 Posts: 1148 Location: Zürich, Switzerland
Audio files: 7
G2 patch files: 236
|
Posted: Sat Aug 17, 2013 5:40 pm Post subject:
|
 |
|
Many different ways to do multiplexers, all with different pros and cons in terms of DSP efficiency and features.
Do you need maximum throughput rate?
Do you need all channels available simultaneously at the output stage? |
|
Back to top
|
|
 |
jamos

Joined: Jun 01, 2004 Posts: 514 Location: Eugene, Oregon, USA
Audio files: 4
G2 patch files: 41
|
Posted: Sat Aug 17, 2013 10:02 pm Post subject:
|
 |
|
Excellent questions. Tim. I suppose on the face of it, throughput is most important.. but right now I'm looking for examples to pick apart to figure out why mine is not working.
This is for a rather strange application: a pantomorph. for this I need responsiveness, ie speed, with minimum DSP load. Actually I don't even need a multiplexer, I'm most interested in the demultiplexer; the multiplexer is inherent in the design.
Briefly: the pantomorph I am working on does not multiplex signals, but instead weights the signals using a matrix of control sequencers, which are controlled with a staircase waveform. These are then summed and placed on a bus. I need to demultiplex them using the same staircase. However, what I'm finding is that I cannot get the timing right: when I break the staircase down with an a/d and then use those bits to trigger S/H modules (or even T/H), I am capturing bad data: I cannot align the sample time properly with the multiplexed signal.
The full patch is complex and dependent on controller settings, which is why I am not posting it. I need to break the system down a bit to isolate the relevant components and then experiment with them. Perhaps then I will post an example. In the meantime, working examples would help a lot. |
|
Back to top
|
|
 |
Tim Kleinert
Joined: Mar 12, 2004 Posts: 1148 Location: Zürich, Switzerland
Audio files: 7
G2 patch files: 236
|
Posted: Sun Aug 18, 2013 2:14 am Post subject:
|
 |
|
If maximum throughput is the prime consideration, things become more klutzy because some useful modules cannot run at audio-rate (eg. the mux modules) and others require triggering, which basically halves the system frequency.
Having all channel outputs available simultaneously is the next challenge, because this requires some kind of S/H-scheme which has to be efficient enough.
Here's a 8 into 2 multiplexer (one signal and one pointer channel) which meets the criteria of maximum throughput (8 channels @ 12kHz), all channels available, and max DSP efficiency. It's built around an exponential counter circuit which generates 8 consecutive one-sample 12kHz triggers when connected to a AD module. This is used to multiplex and de-multiplex the signals as efficiently as possible.
If max throughput isn't important, things become easier. In the above case, the DIY expo counter circuit could be replaced by an 8-counter module triggered at 48kHz. The throughput will be halved however (6kHz). If you go down back to control rate, things again become a lot easier, because now you have the mux and demux modules at your disposal. Throughput for 8 channels would be 3kHz in this case.
The biggest Houdini-style multiplexing schtick I ever had to pull off was 64 audio sawtooth oscillators through 2 channels via linear inter-/extrapolation.
cheers
Description: |
Multiplexing 8 channels into 2, at maximum possible bandwidth (12kHz); all channel outputs available simultaneously. |
|
 Download |
Filename: |
8xMuxer_12kHz_TK.pch2 |
Filesize: |
2.12 KB |
Downloaded: |
3773 Time(s) |
|
|
Back to top
|
|
 |
Tim Kleinert
Joined: Mar 12, 2004 Posts: 1148 Location: Zürich, Switzerland
Audio files: 7
G2 patch files: 236
|
|
Back to top
|
|
 |
jamos

Joined: Jun 01, 2004 Posts: 514 Location: Eugene, Oregon, USA
Audio files: 4
G2 patch files: 41
|
Posted: Sun Aug 18, 2013 8:40 am Post subject:
|
 |
|
Thanks you master, this is the wisdom I was seeking. I will go to the wilderness to meditate a few days on this.
Seriously, thanks. I am going camping for a few days starting tonight, and I will start poring over these when I return. |
|
Back to top
|
|
 |
jamos

Joined: Jun 01, 2004 Posts: 514 Location: Eugene, Oregon, USA
Audio files: 4
G2 patch files: 41
|
|
Back to top
|
|
 |
Tim Kleinert
Joined: Mar 12, 2004 Posts: 1148 Location: Zürich, Switzerland
Audio files: 7
G2 patch files: 236
|
Posted: Tue Sep 03, 2013 12:02 am Post subject:
|
 |
|
jamos wrote: | It works perfectly with the control-sequencer level multiplexing I am doing, but in the process it revealed a quirk of the control sequencer: the output lags the input by 8 clock cycles. |
The control sequencer has no lag. I have often used it in sample-accurate processes. It's robust.
What you are experiencing is interslot bus latency. The 4 busses are not sample-accurate, but have a delay of 24 samples. In your example, the multiplexed signal (bus 4) arrives 24 samples later at the demultiplexer stage than the pointer (bus 3), which, with a counter loop length of 16 samples, creates the effect of 8 samples delay (24 minus 16), but it's actually more.
The computationally cheap solution is to pass the pointer through another interslot bus at the multiplexing stage, so multiplexed signal and pointer arrive in sync at the demultiplexer. You lose an interslot bus though. Otherwise, you have to compensate at the demultiplexer stage by adding offset. |
|
Back to top
|
|
 |
jamos

Joined: Jun 01, 2004 Posts: 514 Location: Eugene, Oregon, USA
Audio files: 4
G2 patch files: 41
|
Posted: Tue Sep 03, 2013 11:38 am Post subject:
|
 |
|
That makes sense. My multiplexer output is subject to the latency twice, once at the input, once at the output. OK, knowing that little fact I can compensate accordingly.
Are the FX buses subject to a similar latency? |
|
Back to top
|
|
 |
Tim Kleinert
Joined: Mar 12, 2004 Posts: 1148 Location: Zürich, Switzerland
Audio files: 7
G2 patch files: 236
|
Posted: Tue Sep 03, 2013 12:33 pm Post subject:
|
 |
|
jamos wrote: | Are the FX buses subject to a similar latency? |
As far as I remember, no. Some of my patches require bidirectional communication between multiple voices (acting as macros) and the FX area (for controlling them) and I don't remember any extra latency being introduced by the VA-to-FX-part of the roundtrip.
In a way this makes sense. The DSP allocation algorithm flexibly assigns individual patch voices and their respective FX areas to different DSPs, so it would be undesirable (think phase cancellation effects etc.) if some of the voices of a polyphonic patch would have latency (because they are calculated on another DSP) and others not.
Why the interslot busses however DO have this latency is strange. Must be a bottleneck issue probably. If you think of it, at 4 slots with up to 32 voices each, there's potentially already quite some signal bussing between DSPs going on. (Also not forget things like LFOs in mono mode, which also have to be shared around.) |
|
Back to top
|
|
 |
|