Re: problem or bug with chorder or merging chains
Joel Roth <[email protected]> Fri, 10 Jun 2016 12:34:08 -1000
| Newsgroups | gmane.comp.audio.ecasound.general |
|---|---|
| Message-ID | <20160610223408.GA23608@sprite> |
Hi Charles, Great to see another application for ecasound! Charlie Laub wrote: > As part of a real time chainsetup I am using chorder to interleave two > channels from an existing stream into two of four channels. This is done > with each of two separate chains, which then must be combined again into a > single four channels stream so that it can be processed with a LADSPA > plugin, after which is it sent on to real time outputs. An example of > ecasound commands for this is shown below: > > ecasound -d -z:mixmode,sum \ > > -a:pre -i:HeCanOnlyHoldHer.flac -f:16,2,44100 -pf:pre.ecp -o:loop,1 \ > > -a:woofer,tweeter -i:loop,1 \ > > -a:woofer -pf:woofer.ecp -chorder:1,0,2,0 \ > > -a:tweeter -pf:tweeter.ecp -chorder:0,1,0,2 \ > > -a:woofer,tweeter -o:loop,2 \ > > -a:delay -i:loop,2 -el:mTAP,0,0.006,0,0.006 -o:loop,3 \ > > -a:DAC1,DAC2 -i:loop,3 \ > > -a:DAC1 -chorder:1,3 -f:16,2,44100 -o:alsahw,2,0 \ > > -a:DAC2 -chorder:2,4 -f:16,2,44100 -o:alsahw,3,0 > > > > The problem is that channels 3 and 4 of the stream have no output - they > seem to be muted or absent. I think the problem is that the initial -f:16,2,44100 propagates through the rest of the chain setup, limiting the number of channels exposed to two. >From the man page, the -f option, "sets the audio stream parameters for subsequent audio objects". Loop objects are audio objects, so there should be -f:16,4,44100 in the setup before a four-channel signal goes to a loop object. I'm not exactly sure where it should go, but it might be worth amending this line: > -a:woofer,tweeter -o:loop,2 \ to -a:woofer,tweeter -f:16,4,44100 -o:loop,2 \ Or more conservatively, changing > -a:woofer,tweeter -i:loop,1 \ to -a:woofer,tweeter -f:16,4,44100 -i:loop,1 \ Hope this helps! ~Joel > To troubleshoot I did a number of permutations using various LADSPA plugins, > removing the -el: plugin calls, switching channels between DAC1 and DAC2, > etc. All signs point to a problem in which the line: > > -a:woofer,tweeter -o:loop,2 \ > > Is not properly merging the chains (summing the channels), or the lines: > > -a:woofer -pf:woofer.ecp -chorder:1,0,2,0 \ > > -a:tweeter -pf:tweeter.ecp -chorder:0,1,0,2 \ > > are not creating four channels streams that can then be summed together into > a single 4-channel stream. > > > > Background and Motivation: > > The above chainsetup is implementing a stereo crossover for a 2-way > loudspeaker and is used for realtime processing and playing of files (as > shown above). Background on this type of approach can be found here: > > http://rtaylor.sites.tru.ca/2013/06/25/digital-crossovereq-with-open-source- > software-howto/ > > I have created some LADSPA plugins for filtering (ACDf) and fractional delay > (mTAP). The mTAP plugin requires that all channels are sent through ONE > instance of the plugin and not the usual separate instance of a monophonic > plugin per channel. mTAP has eight channels built into it, so the idea is to > merge all the channels in the chainsetup (after processing using high and > low pass filters) into an N-channel stream that is then run through mTAP and > the appropriate amount of delay is applied to each channel. Because the user > may have multiple stereo DACs connected to the system, the N-channel stream > is typically split up into N/2 2-channel substreams, which are sent out to > N/2 DACs. In the above example there are four total channels (stereo input, > woofer and tweeter chains). In another common implementation there is only > one input channel but this might be split into 2,3,4 or more streams for a > monophonic 2-, 3-, 4- or more way crossover. In either case, there must be > merging of chains their channels into a single stream for mTAP to process > and then pairs of channels from this gathered stream are sent to output > devices (e.g. DACs) in realtime. > > > > I am not sure if I am not implementing -chorder correctly or if there is a > bug in its implementation. Perhaps I am not understand how to correctly > combine channels from multiple chains and that is the cause of the problem. > I have confirmed that the LADSPA plugins are working correctly. The same > behavior occurs even if no LADSPA plugins are used. > > > > Any help or advice is appreciated. > > > > -Charlie > > > > ------------------------------------------------------------------------------ > What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic > patterns at an interface-level. Reveals which users, apps, and protocols are > consuming the most bandwidth. Provides multi-vendor support for NetFlow, > J-Flow, sFlow and other flows. Make informed decisions using capacity > planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e > _______________________________________________ > Ecasound-list mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/ecasound-list -- Joel Roth ------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e _______________________________________________ Ecasound-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ecasound-list