MP Assign common connection points clarification

Post your bug reports/problems here

Moderators: davidv, seb@plogue

tmpc
Posts: 69
Joined: Tue Jul 08, 2014 2:16 pm

MP Assign common connection points clarification

Postby tmpc » Mon Jun 19, 2017 8:06 pm

Howdy. I've had pretty good luck adjusting my layouts to take advantage of MP assignments, but I have one layout in particular that is still giving me some problems. In trying to improve the performance of this layout, I've realized that I don't fully understand what qualifies as legitimate top and bottom tie points for different MP devices and interconnects.

I understand that the audio and MIDI outside world inputs and outputs can be common connection points, but it's the stuff in between that I find confusing; specifically, MIDI processing. For example, if I use a MIDI channel filter followed by note range splitter, can the output of the splitter feed multiple devices assigned to different MPs?

I also have several Groups I've created for some common MIDI manipulations I do. Some of these contain nothing but MIDI bidules, but others are mixed; MIDI devices and numerical manipulations to control a Program Change Creator, for example. The result is a MIDI out, but is that suitable as a point to feed multiple devices with different MP assigns?

Audio outputs are less problematic for me, as I tend to do less to them before they hit the outputs on my MOTU interface. BUT, in this particular layout, I have a Gain and a Multi Gain bidule controlling the output level of four Aria Player instances. Although all four of the Aria Players are on the same MP, I have less clicks and pops mixing the two gain modules with a two channel Audio Dummy than sending them to the same two MOTU interface pins. Why? And, what if I wanted to mix the outputs of two Aria Player instances, assigned to two different MPs, into the Gain bidule; would that work properly? I guess the general question I'm asking is: Where are different MP audio output streams allowed to be mixed?

Thanks in advance for any clarification on this mystery. :)

seb@plogue
Site Admin
Posts: 9593
Joined: Tue Mar 02, 2004 7:23 pm
Location: Montreal
Contact:

Re: MP Assign common connection points clarification

Postby seb@plogue » Tue Jun 20, 2017 9:43 am

For example, if I use a MIDI channel filter followed by note range splitter, can the output of the splitter feed multiple devices assigned to different MPs?


No, the input/output devices and the audio/MIDI file players are the only ones who can do that.

The result is a MIDI out, but is that suitable as a point to feed multiple devices with different MP assigns?


No, that would require some way to flag the group as such so that I can add code to be able to handle this scenario.

Although all four of the Aria Players are on the same MP, I have less clicks and pops mixing the two gain modules with a two channel Audio Dummy than sending them to the same two MOTU interface pins. Why?


Are you assigning each Aria Player individually or the Multi Gain to MP?

Where are different MP audio output streams allowed to be mixed?


That should normally be everywhere but yes it seems to behave better if done just above the audio output device, although I can't figure out
why unless I made a tiny mistake I haven't been able to see yet (the audio device should be doing the same thing as any other bidules when dealing with connected bidules that are MP-assigned)

tmpc
Posts: 69
Joined: Tue Jul 08, 2014 2:16 pm

Re: MP Assign common connection points clarification

Postby tmpc » Tue Jun 20, 2017 4:18 pm

seb@plogue wrote:
Although all four of the Aria Players are on the same MP, I have less clicks and pops mixing the two gain modules with a two channel Audio Dummy than sending them to the same two MOTU interface pins. Why?

Are you assigning each Aria Player individually or the Multi Gain to MP?

They are all on 0, but if they weren't, I assume that that the Audio Dummy alone would be assigned to the non-zero MP, dragging everything above it along for the ride. Correct?

seb@plogue wrote:
Where are different MP audio output streams allowed to be mixed?

That should normally be everywhere but yes it seems to behave better if done just above the audio output device, although I can't figure out
why unless I made a tiny mistake I haven't been able to see yet (the audio device should be doing the same thing as any other bidules when dealing with connected bidules that are MP-assigned)

OK. So, in the multiple Aria Player example above, could I have different Aria Player instances assigned to different MPs, and then merged at the inputs to the Gain bidule? Would this also be true for the Multi Gain bidule? In that case, different MPs would be going into different inputs of the Multi Gain . . . which doesn't sound right to me. How should this be handled?

URM
Posts: 113
Joined: Fri Dec 31, 2004 1:37 pm
Location: Toronto
Contact:

Re: MP Assign common connection points clarification

Postby URM » Tue Jun 20, 2017 6:41 pm

Hi tmpc,

I usually put an MP assigned mixer or gain at the bottom for each core and then parameter link the volumes of the gains or mixers together for easy control. I'm pretty anal about MP assign though and only sum at the sound card or the audio recorder. Same at the top, if I bring external audio in that is going to multiple audio streams on different cores, I'll add individual gains at the top for each core. Works here as I treat each core like a separate audio machine and avoid any audio triangles/interconnections other than at the sound card or audio recorder.

Hope this helps.

Jamie

tmpc
Posts: 69
Joined: Tue Jul 08, 2014 2:16 pm

Re: MP Assign common connection points clarification

Postby tmpc » Tue Jun 20, 2017 7:22 pm

URM wrote:Hi tmpc,

I usually put an MP assigned mixer or gain at the bottom for each core and then parameter link the volumes of the gains or mixers together for easy control. I'm pretty anal about MP assign though and only sum at the sound card or the audio recorder. Same at the top, if I bring external audio in that is going to multiple audio streams on different cores, I'll add individual gains at the top for each core. Works here as I treat each core like a separate audio machine and avoid any audio triangles/interconnections other than at the sound card or audio recorder.

Hope this helps.

Jamie

Hi Jamie. Thanks for the info. I don't use any audio ins, but this is good info to have in case I ever do. As your core mixers/gain controls are MP assigned, you are combining the different cores right at the output device; not one level above as I did using an Audio Dummy. I assume you only assign the mixer/gain bidules to a core and let them drag everything above them to that core. True?

URM
Posts: 113
Joined: Fri Dec 31, 2004 1:37 pm
Location: Toronto
Contact:

Re: MP Assign common connection points clarification

Postby URM » Tue Jun 20, 2017 10:08 pm

Yeah exactly, MP assigned mixers get summed at the audio card as well as at the audio recorder - nothing else below. Connections above automatically get MP assigned and pulled by the mixer's MP assignment.

Took a lot of experimenting and some great guidance from Seb to get MP assignment working properly here, but it's been mostly click free ever since I adopted this method a few years back. Only clicks or audio interupts I get now are due to CPU overloads.

Good luck with it.

JensJohansson
Posts: 42
Joined: Sun Nov 04, 2012 10:48 am
Contact:

Re: MP Assign common connection points clarification

Postby JensJohansson » Wed Jun 21, 2017 11:31 am

The result is a MIDI out, but is that suitable as a point to feed multiple devices with different MP assigns?


seb@plogue wrote:No, the input/output devices and the audio/MIDI file players are the only ones who can do that.


I have a similar issue and I've had some initial success experimenting with some MIDI loopback devices (they create a "fresh" output device). In other words, the MIDI information leaves and re-enters bidule through a wormhole in the operating system.

This is if you can accept the added delay of what I assume is one buffer.

One solution might be if there was some sort of "MP decoupling flag" on the MIDI dummy (or, maybe a separate sort of bidule). Signifying, we don't care if this MIDI information is processed in strict order with all other audio/MIDI/etc events as long as the information at least gets passed on to whatever thread it belongs to, in the internal order it arrived. Would probably only make sense for MIDI.

Screenshot - 2017-06-21 , 18_21_33.png
Screenshot - 2017-06-21 , 18_21_33.png (11.45 KiB) Viewed 720 times

tmpc
Posts: 69
Joined: Tue Jul 08, 2014 2:16 pm

Re: MP Assign common connection points clarification

Postby tmpc » Wed Jun 21, 2017 6:05 pm

JensJohansson wrote:I have a similar issue and I've had some initial success experimenting with some MIDI loopback devices (they create a "fresh" output device). In other words, the MIDI information leaves and re-enters bidule through a wormhole in the operating system.

Whoa! Now that's a clever work around. But, how did you make these port devices? What are they?

. . . and most important of all, will these MIDI "wormholes" allow me to hear my finished piece of music before I start working on it? This could be invaluable in avoiding wasted time on bad ideas. :lol:

JensJohansson
Posts: 42
Joined: Sun Nov 04, 2012 10:48 am
Contact:

Re: MP Assign common connection points clarification

Postby JensJohansson » Thu Jun 22, 2017 6:50 am

tmpc wrote:
JensJohansson wrote:I have a similar issue and I've had some initial success experimenting with some MIDI loopback devices (they create a "fresh" output device). In other words, the MIDI information leaves and re-enters bidule through a wormhole in the operating system.

Whoa! Now that's a clever work around. But, how did you make these port devices? What are they?

. . . and most important of all, will these MIDI "wormholes" allow me to hear my finished piece of music before I start working on it? This could be invaluable in avoiding wasted time on bad ideas. :lol:


Here is LoopMIDI for PC:

https://www.tobias-erichsen.de/software/loopmidi.html

Macs are apparently clever enough to do it natively:

http://www.johanlooijenga.com/tools/12- ... ports.html

Let me know if you get a future time loop going. It sounds extremely useful :)

tmpc
Posts: 69
Joined: Tue Jul 08, 2014 2:16 pm

Re: MP Assign common connection points clarification

Postby tmpc » Thu Jun 22, 2017 7:49 am

JensJohansson wrote:I have a similar issue and I've had some initial success experimenting with some MIDI loopback devices (they create a "fresh" output device). In other words, the MIDI information leaves and re-enters bidule through a wormhole in the operating system.

Here is LoopMIDI for PC:

https://www.tobias-erichsen.de/software/loopmidi.html

Macs are apparently clever enough to do it natively:

http://www.johanlooijenga.com/tools/12- ... ports.html

Thanks, Jens. I will try this out.

It's been great finally getting the last pieces to this puzzle. My thanks to all who responded.

I've had great success balancing the MPs out on my "right on the edge" setup; the ticks and pops are gone with headroom to spare. I had to duplicate a lot of bidule MIDI processing to accomplish it, but it works. The "wormhole" technique could simplify this, but I'll have to see if it saves anything MP processing-wise.

I wonder if it is possible to do this with audio? I don't really have a need for that right now, but it would be good to know.

URM
Posts: 113
Joined: Fri Dec 31, 2004 1:37 pm
Location: Toronto
Contact:

Re: MP Assign common connection points clarification

Postby URM » Thu Jun 22, 2017 9:22 am

You can do something similar with audio too if you have an audio loop back feature in your sound card or if you use a virtual audio cable or a virtual audio patcher like Jack, all of which will allow you take audio out of Bidule and back into Bidule as new audio that isn't mp assigned. There will be some latency as a result of the audio going out and back in which can be a problem for time critical things.

Yeah mp assign does create a lot of duplicate things across the cores, I usally have duplicate midi sources like HID extracters and step sequencers at the top of each core and duplicate mixers, loopers, filters, reverbs and efx matrices at the bottom and all the logic in between which feels a bit wasteful, but the CPU gain by utilising all the cores makes it worthwhile for me as I can get more complex synths running at the same time by spreading them across the cores.

To make things easier to control, I parameter link across cores so that all the mixers' sliders etc. are all linked together and controlled by external midi controllers. Didn't want to have to buy duplicate midi controllers too so parameter linking duplicate items across cores to the same midi controllers was essential with this style of building in Bidule. I always parameter link tons of stuff across cores without issue.

Glad to hear you're making progress, it's pretty awesome when all cores are chugging along creating sound without unintential clicks. It took me about a year or two to convert over from my old style of building on one core, but once I got this working on my quad it was like it was like getting three new machines.

JensJohansson
Posts: 42
Joined: Sun Nov 04, 2012 10:48 am
Contact:

Re: MP Assign common connection points clarification

Postby JensJohansson » Thu Jun 22, 2017 11:59 am

tmpc wrote:I've had great success balancing the MPs out on my "right on the edge" setup; the ticks and pops are gone with headroom to spare. I had to duplicate a lot of bidule MIDI processing to accomplish it, but it works. The "wormhole" technique could simplify this, but I'll have to see if it saves anything MP processing-wise.


I don't think it matters so much processing-wise at all, I don't think the MIDI bidules consume almost any CPU cycles in comparison, I mean it's usually about processing a few events per buffer as opposed to generating (or processing) 44100 full floats per second (all assuming that sample rate).

MIDI considered strictly as data rate on a physical wire at an absolute maximum is 3kbytes/sec of small ints (I do realize internal bidule MIDI wires do not have this limitation, but if you drive it from a physical MIDI interface that will be the absolute maximum data rate).

The data rate alone of an audio signal is 176400 kbyte/s, some 60 times larger than the absolute full load MIDI maximum, but the difference will be many many times larger than 60:1 in actual use.

It seems to me also from experience with bidule that MIDI processing is usually like "a piss in Mississippi" but seb could probably settle it.

Anyway.............. to use looback MIDI interfaces would not be for CPU preservation.

You would use it for ease of understanding and ease of changing the layout. Or if a MIDI bidule has some non deterministic internal state system that would not be the same in a parallel copy of it..

I do have to say, an MP-decoupling MIDI bidule would be pretty neat .. :-) but there is probably no hurry. I am still a bit on the fence if these midiloopback things really work/ really are necessary/ are safe enough for production/ etc etc etc

JensJohansson
Posts: 42
Joined: Sun Nov 04, 2012 10:48 am
Contact:

Re: MP Assign common connection points clarification

Postby JensJohansson » Thu Jun 22, 2017 12:10 pm

JensJohansson wrote:I do have to say, an MP-decoupling MIDI bidule would be pretty neat .. :-) but there is probably no hurry. I am still a bit on the fence if these midiloopback things really work/ really are necessary/ are safe enough for production/ etc etc etc


Or, if my intuition is correct and the CPU use for audio bidules in typical use is many orders of magnitude larger than for MIDI bidules, perhaps all the MIDI bidules should just automatically run on the default thread. Somehow... :) And the other threads fail more gracefully than they do now if something irregular happens when MIDI data is passed between threads.

After all, the way I understand it, MIDI data that slips one buffer in time is not such a big deal. Audio data that slips one buffer in time would be a trainwreck.. a glitch.

Then you could get rid of these "don't ever cross the streams" / "diamond shapes" rules at least when it comes to MIDI? For audio it would be more strict and sensitive.

I probably am misunderstanding something.


Return to “Bidule Bugs and Problems”

Who is online

Users browsing this forum: Bing [Bot] and 3 guests