Subpatch inlets scaling values


#1

Hi. I have a patch which is behaving strangely and can't figure it out.

I and sending unipolar values into the inlet of a subpatch but the values get strangely scaled once inside. It is an MPE voice subpatch, so I'm not sure if that has something to do with it... because when i try it with a new subpatch in a new project, it works fine...

the values are all being multiplied by 4. Does that make sense?

any tips?


#2

This is more like a work around rather than a fix: you could just divide by 4 to scale it back?


#3

Yes that is what I did. But I was wondering why it was doing this. Is this a documented behavior?


#4

Sorry no clue why it does it.


#5

is it your own subpatch or one from the community? can you share the patch or a screenshot?


#6

My own.


Doesn't make much sense to share the patch but here is a screenshot...
As you can see it is a four voice Polyphonic (mpe) subpatch.
All those divide by 4 objects are correcting for these inlets' weird behavior. What is strange is that I don't seem to be getting this behavior on all inlets.

When I map these inlets directly to a debugging outlet, the numbers come out multiplied by 4.


#7

What happens if you change the polyphony to 2? I don't know how you measure the values inside the subpatch, but if you put them to an outlet again, this will be multiplied by 4, once for each voice.


#8

hehe, was about to write the same :slight_smile:


#9

Aha. Ok so it is the outlet, not the inlet, that is multiplying the value by the number of voices. Right?

That explains why my ADSRs were not modulating much! I was reducing my modulation by a factor of 4, thinking that it was the inputs doing this.

Thanks for the clarification.


#10

think about it this way, how else could it behave? it basically has to add the four voices together if you have an outlet from 4 voices. as @Captain_Burek says, try decreasing the poly value to 2, the inlet should now multiply by 2.


#11

Sure it makes perfect sense. I'm just used to the max msp / pure data bang event paradigm where the value that would come out would just be the last one received, not their sum. In general this is the main thing I have to get used to in axoloti. Everything is treated as a signal. All inlets and outlets are always "on". In max, when using non-signal connections, you can have several outs going into a single in, and the inlet gets updated with the last event.


#12

@lokki I now realize that the proper way to get the envelope back out of a polyphonic voice subpatch is to use patch/polyindex and a demux to multiple outputs....