< Back to IRCAM Forum

Ambisonic decoding

Hi,

I would like to use Spat to play files recorded with soundfield microphone (bformat, 4 tracks) and decode them as an xy pair. Then I’d like to control the position and orientation of the xy pair. Although the doc and example patches are pretty clear about ambisonic encoding and combined encoding/decoding (spat.tut.04-Ambisonic), I’m not 100% sure about decoding only and could not find anything in the discussion about that.

What I would do is something like this patch:

  
----------begin_max5_patcher----------  
739.3ocyWksbaBCE8Y7WAid10CKxXbdJ+GYx3Q.JDkBRTIQhcyj7sWs.X6FZ  
rLsgo9AFz18dNm6hEutvCjw1iE.+a7uy2y60EddlozS30M1CTi1mWgDlsAjr  
xxJLXocIRgYRV1SeKLoeRZaMgVgklCD1MYChipwRLeGlhxTVPsVvwCvZk+9I  
DxC1sA.C1Pl+HgVtiiykVPGGuZSbTXbxR8qAK8if8O8uu6XVaKOzfsmAPnpS  
eudw2VrP+XoijuFKDnxA1Kw6kV92foiIIvQkjn+dZmrUyRKii2XXbzmw3oQW  
J9EEM9.aEOzTgN7tObLJGcETd8DizooZFCgvUwpeP3kXufTRQUfkW5sLDsDL  
XFA5YbwNEoTPXGRJ4jrVosXwaPvTRHRPxksTh9r2nPUWVsG3AVUE6kxJVFpR  
hqaXmjyqWkWinxbFWyQBid1p0rBqhXLOneZFmTRTnsBSKkOZoWfVL.RR92EC  
f+3NGbbXjdicq1PT56ev0+nEUQjGFw6Rhp.Pxwpy14ZaZkMu5Zytv+r.k+9X  
4PAWQNTvDxgfwpLljPSRz59m+SqPT9dUCh9t+s5zP+8G7u0B6lVovOxLhPMC  
RGQAFuHJcTAHdhBP3VamxsoqBiVOkRnqtTYz+CX5IPel3WfyUUP79.PloZSd  
ptCOKjLVTHbzn.bznv1oFEhSscxSubSbWai45aeUwOiYAUD5ueyBiTnm+7fp  
f0xy6IY+UI7OJDEplNpVY8Mpt63+zbxldjTTfOsQFnfHzfrX.keH8xY7.+OC  
OZWEeI7b1d9xgSjCvIZ9fSnCvIb9fSfCvYdxcbRbBlM0wIwIX9prTdZyEfSz  
Y64qFMINfljYCMqc.MqmMz.c.MvYCMwNfl3YCMQNflnYCMgNflvYCMANfloz  
uwdwGTSyyXtnyjFfnt25SLtd3lklgDpcnwh.N9YR+9SLyf3p6LJU2FqkauM4  
9D6Waa9vPNskX9jtEZO+1heA5bYIOA  
-----------end_max5_patcher-----------  

Is that correct for what I intend?
What is the effect of the 8 channels between spat.decoder~ and spat.pan~? Is the number of channels important in-between them?
Is there a shortcut to do that with only 1 spat.spat~ object?
How do I control the xy pair? Maybe with the listener message to the spat.span~?

Thank you very much for any info!
Cheers,

Benjamin

Hi Benjamin,

Sorry for the late reply.

I’m not so sure to understand your intention here.
However here is a patch that could hopefully help you.

  
----------begin_max5_patcher----------  
2193.3oc2a01iiaaD9y69qfPo.4N.uFRTu5DjdWayG58gFzOjf1ftEGnknsY  
pLopnz5yWP1e6c3KRq1cszJmXKuo4xIaQQMb3y7LCGNz2Oe8UNKEehJcPeE5  
egt5pe95qtR2jpgqr2ekyVxmRyIRc2bREa2R4UNyLOqh9oJc6InbQclrfR9O  
zRIhwQDTZ8RZSGWUtdopitycssvq2JpqxoUZA2z5JAuRx9LU0lm27tMyIa0M  
67mJYj7FAWPpR2v3q+XIMsxLSV3oFETr9pWnu5CLbE8usuCKSKGwxe5FeuFA  
srd4xby31H5RpDlqjJlf2U7twyi8wdwIyPAAyCmomTpKsC.L2X7lolmpse45  
qUWl8aDl+GaHUHlDUsghnqVA5DRrReWBJcCgyo4RzRZ0NJkij.1LOilJxnk2  
iH7LSKED98uC8AiP.McIsTIj1WmssPTVQ3v.wuoQVPe29ta4ey27GQ+nnFkB  
8UTgVKPYLExjuGspTrEs7lUhxsfNVIPeBZSeyb8qvozLPI.gVQK2RyXjJJRq  
cf0CItCzBB5NVYUMIuKYBUxVOG8AkJ.S7ThjNCsihpkf35i0MG8mIRVJIGzq  
8vXK2HpyyTuCzgac1vVu4VmNy8CLrxYnR555bRIHiLlrpjsrtBFSlFLP9eqB  
MSoyuk2NVyzOYqnjdP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MgiPaBmLsIZDZSzjoMwiPahml7lGSBRSWRm3wrLm6zEwYTvyzENFOxr.lPz  
AOB0AOcpi+HTmIJh7n16wDtVdz4TeLETfTTX+oVpUFkp3rk7Shx1+4aAIgxM  
2pqmsSI8NVS+0UewgTltgUQSUGXq4m8WTfy0pw4Wt9+Qrskg3  
-----------end_max5_patcher-----------  

Hello T
Two questions in the same direction.
This is the best way to convert from B-format to binaural too, That is right?
The configuration 1 has a better binaural restitution that the configuration 2, That’s right? (See the patch)
When we move the sources via transform, the config 1 sounds with more coherence, but the two configurations are really very different on the high frequency. (I tested with street noise)

Thank you very much
Best
Raul

B-format-to-binaural.maxpat (41.6 KB)

Sorry this is the good Patch

B-format-to-binaural1.maxpat (44.3 KB)

Hi Raul,

You’re absolutely right.
At the moment there is no direct ambisonic-to-binaural transcoding available.
The solution is then to 1) decode the ambisonic signals and 2) virtualize the decoded loudspeakers in binaural.
Exactly as you did in your patch.

For the virtual speakers, you should use a “regular distribution” in 3D, as dense as possible.
Your “configuration 1” should be better than #2.
(of course more virtual speakers implies much more cpu…)

When it comes to moving the sound scene, it would be much more efficient to actually apply the rotation on the encoded ambisonic signals (using e.g. spat.hoatransform~).

Best,
T.

Thank you very much T for your answer.

I’m not very sure where insert <spat.hoatransform~> (see patch)

Thanks again
Best
Raúl

B-format with spat.hoatransform~ to binaural.maxpat

B-format-with-spat.hoatransform-to-binaural.maxpat (26.7 KB)

Yes, correct : [spat.hoatransform~] operates on Ambisonic-encoded signals i.e. it must be inserted (anywhere) before the [decoder~].

T.

Thanks so much

Hi T.

I have a question I am trying to decode various 3rd order ambi signals, channel order ACN, from example from BlueRipple’s O3A panner, or from Sound Particles (pic attached). From both of them I have the soundfield with a roll of 180 deg and yaw of -45. And I can’t figure out what I am doing wrong.

do you mind having a look at it please? I attached the max patch too. the spat.decoder by default should work in ACN right?

Cheers

Axel

Screen-Shot-2017-04-18-at-14.22.36-2.png

Here is the patch

Spat-Preview-HOA-Sound-Particles_Kilburn-other-aggregate-device.maxpat (43.4 KB)

Hello Axel,

I might be able to answer your question.
With most applications on the market, the X axis points forward and the Y axis points to the left (in Spat, X points to the right and Y points forward). As there’s a high chance that sound particles uses this convention, you must apply a 90° yaw before decoding the Ambisonic signals.

I’ve updated your patch by adding a “spat.hoatransform~” before the “spat.decoder~” (the decoder doesn’t accept any Yaw/Pitch/Roll messages).
Hope this will fix your issue.

Best regards,
Philippe.

Spat-Preview-HOA-Sound-Particles_Kilburn-other-aggregate-device_fixed.maxpat (44.7 KB)

Hi Pgilippe

Thanks for your quick answer. Ah ok, I was trying to yaw it on the decoder itself.

It looks like 90 degrees is not enough. there is some sort of roll that is happening in here that doesn’t make sense to me. How could we check it? Do you have blueripple’s panner to try it out? I’m trying to understand if it’s my fault somehow, but I can’t figure it out. with the 90 deg if Iposition the source in front it stays there, but if I start panning it around in circle it goes to the opposite direction.

Let me know how we could check this thing out, it would be awesome.

Thanks for your help.

Axel

Hi,

Indeed, Philippe is absolutely right: most Ambisonic tools uses X axis pointing forward while in Spat, X points to the right and Y points forward.
Consequently you may have to apply a 90° (yaw) shift.

Otherwise, be very careful about the used normalization (SN3D / N3D). Make sure spat.decoder~ matches the normalization used in the BlueRippleSound encoder.

The loudspeaker layout is not super-well conditioned. The decoding sound field might therefore be (spatially) distorted.

I dont have the BlueRipplePanner, so hard to test.
Maybe you could encode a signal (say white noise) is each cardinal directions and try to listen to each one of these independently.
(and/or share the encoded files so that I can try it out).

Best,
T.

Hi T.

I tried at first with Sound Particles, and bounced down with SN3D normalisation. I can clearly hear that is going the other way around. I checked my speakers and they are fine.

This is the encoded file from Sound Particles.

https://we.tl/pLJdcVNxrj

ps: how would you improve this system? maybe moving the front and back speakers closer to create a spherical array more then elliptical?

Cheers

Axel

Just for debugging purpose, here is a patch with a “good” loudspeaker layout.

Also: it seems that Sound Particles supports various HOA sorting (i.e. ACN / SID / FuMa).
Make sure you use ACN sorting as this is the default in Spat.
If you’re using another kind of sorting you’d need to insert a spat.hoasorting~ prior to decoding.

  
----------begin_max5_patcher----------  
2276.3oc6bsziiaiD9b2+JD7oDfVFpJIJItmlAIG1SYOjiKBFHaw1VYrkZHI  
2S2IHyu8kOjjkl1xc0upzX1DLwxp3qOVr3G+H4L9Ou7hEqptS0rv6e48e8t3  
h+7xKtvZxX3ht2uXw9r6VuKqwlsEkpuTs52WbkKoV0csVy6pxxWkUtoOgl16  
2orozao5P6NUa682nbM2Ba189stjKOrunTmAaq.cFuIqc81hxMepVst0Urnn  
kAW4gBymwA1uiKCFplhbaipgnOBKNV2tV2U4Fi+0kWZ93Jh858pllrMpGzsK  
Jut5Izkmo6hy2cgPSWLLDMODmu+FLS+su1qUMpx1r1hpxwNTvVoo15t+Cue6  
Y3jlIznQ2sVtW0pp+p2GzPa81rxR0tFOH9I35ZJ1TlsawUuW+1bQxwmYrMM0  
M3JsAyfXoDQIDN+PLHmYHN47iwHfKk5+KUXFoilNR2OFjcqJ+S5VQWpOk01V  
Wr5Pqia3hgAbS+nNyNX9IUY1J2nVfMMazxacLSTv2QwL++12lYNRTv4lijLD  
4FA1fVQbzxXTblYIomdVRD72Zn9eaqgDF5n3cKcd9EQfjWuEMWWseulL5Ac3  
75pa7xNjWT4ccwNk2VUsx6G92+mO58we5W790eI7m+w9xrqnTst5PY63t3Cc  
RTEOfAgK0ANPbr8A.8NjAWw0UksME+gs5sI6Lu5vJc.PSQtZLPF42BwEipgR  
cbiMoOVWXB8OkGcZU+b8wFeowINe3xYVa5bS6rqIgZWfwQE4hYhOcLSj3z8P  
70a8.85Z2nJy8pze9xmq.O5ZxnNnP2wSbu.Od.x3oPhmZnvyYfusZyliC6D7  
EElIQOU2AlJFQcfCedRpinGQ+4bzoOwd9JKNU08s1sEpubaQSwphcEs2OtEq  
t95FUWO4A5c1Us9yp775rMMqqq1sa7bx06JV+41s0UG1rcrcGv29vB3R31Gl  
vpM6qbjFCVppy0fejEpCFlE9L7UhDyiH2dffH4LCG344cFBLcZspJKZqpWp8  
z5WW7LFV1UbqZ4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BP7vCYn7fGCOvjL8VCm.JvgG  
0hHAuSxSAM8ama3B.eEVUiB.CAFWlMfBfXTtORQtOxnbejhbejQ49HE49Hix  
8QJx8QFk6iTj6iLJ2GoH2GYTtORQtOxnbejhbeDYDPTXpQFYpQJL0HiL0.El  
ZfQlZfBSMvHSMPgoFXjoFnvTCLxTCTXpAFYpAJL0.iL0.ElZfQlZfBSMvHSM  
PgoFXjoFnvTCLxTSgnlQdZJzzLxRSgjlQNZJTzLxPSgflQ9YJzybdr4T18Li  
ZDoHQjQhPJ7f7AmfWyCG5kexh.oSVD3CPAj.DedHjzUtf7ckKHoqbA46JWPR  
W4Bx2UtfjtxEjuqbAIckKHeW4BR5JWP9txEjzUtf7ckKHoqbA46peQRL0HeL  
0HIlZjOlZfDSMvGSMPhoF3ioFHwTC7wTCjXpA9XpIESyXHMI2CeS4IMimOsh  
jjJxFbHslJeKoRRyAeRNHMSmuI5jXB4iHjzJE7sPAoURYbgTRzx.i7xzHl4i  
YFHQMC7wMCjHmA9XmARzy.e7y.IBZlt1IJ+0VBdI+0VBdY9KIEsY7IMSRzcA  
7AGj.bP9fSHA3DxGbhH.mH9fif.bD7AmXBvIlO3jP.NI7AmTBvIkO3HI.GIi  
zfTnkAN4kIQLyHyLPgZFXjaFnPNCLxNCTnmAF4mAJDzbIMK3ck1GAI2ijO+i  
fT.jjuHHAooXR9liIHQBI4iERPhlVxGOsfzBYR9VISPYgdIaqzKnHCRxlNHA  
EQhR1TIJnHgVxlFZAkMXHYaGFBJa+Rx19uDT1bpjscmJnr0cIa6cWP4fMjrc  
xFBJRej7ctOT9GanfO3HdWAmHRiVL5dhdeMZQ5BcC36TCIce2A7E9P.N3yDM  
teSZxt4laU0McUoEHK1m86U0C+jQsXeQo6U6uajKpUlejfc42YIqd81hV051  
C0teuktK18q00ByuYu0kGJ5NsacK+WW9+.nyISHB  
-----------end_max5_patcher-----------  

Hi T

Thanks again.

I can’t figure out why but after that day everything worked fine again. The point is that I opened the same patch and it was fine. No clue.

Cheers for that anyway

Axel

Hello,

I tried to use the patch of RAULQUILEZ “B-format with spat.hoatransform~ to binaural.maxpat” to convert bformat to binaural sound (I attach the patch to this message). But I failed to get any results on my sound when I am applying a rotation. It seems that the transformation is not taken into account…

Is this spatch still working ?

Cheers,

N.

B-format-with-spat.hoatransform-to-binaural.maxpat (26.7 KB)

Hi,

The support for spat v4 is discontinued. I’m sending you a (tentative) patch for b-format to binaural conversion using spat v5. (I hope you can upgrade)
The main limitation (was in v4, and still in v5) is that the B-format (or HOA) stream needs to be decoded over a set of virtual loudspeakers, prior to binauralization. There is yet no support for “direct transcoding” from Ambisonics to binaural (a pity).

The attached patcher is mostly “pedagogical”. Feel free to adapt it to your needs.
Also, have a look at “spat5.tuto-bformat” for additional information.

Best,
T.

  
----------begin_max5_patcher----------  
5200.3oc6cs0iiiar94d9UPXbBPBP2dDI00yS6tYwj8gylDjM.I4zyfAxVzt  
0NxR9nKcOSBx7a+vKR1T1Rxkrna6MXGra2tEkUUrpheUwhEo9Wu4tYKx9LqX  
F5+F8H5t69Wu4t6jWRbg6p+66lsI7yKSBKj21rkYa1vRKmcupsR1mKkW+IVX  
z1mxRYnh30ogIEM2QZ0l3zDVo7qiqu31vxkOEmt9i4rkkJxioj4V2ibIdheg  
w9heQnysPen9KsnZwhDl9iYUVZYQ7+TcML+KrijYUkMzzR6lSC2Hu4YeadbX  
RCKtMmUv6SgkwYoihihijOrrE+7CD+Yhq8ueyaD+39IJMWDmFVkGlD+OkLEJ  
aEp7IFhRPIYUQEaYgehkuSDmDmxVlUkJ+tjt5TcdGP0Lj.641XrmME6Za4Rb  
tG4HDCbYBIP7KpyUTKMNtSWi4XRMVdFmyXRszKOkkvGFrjkxtGEuBkxXQrnQ  
OdvW1IH9dy4cIr+Mv3gSxQ5RW6yQ5lD+LadjFq7bX9NdbWiO5+gwJMs8slay  
+miukkmOVXkfoxtiss7m9Zci1xKxN40xphEY4Qr7kYIY4pGr0bJl5Iddc+o8  
OU0ir7KaYp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ISrUc0z.TrPU  
Kj6t6h1InV6aZF7OjyXoilCsDrji3HaVF1E10mGLlQYtpMKX4+AtSuQyaBAk  
kz90IffcjxQrt863YPUn5871A9M+627+CYITURA  
-----------end_max5_patcher-----------  

Hi,

The support for spat v4 is discontinued. I’m sending you a (tentative) patch for b-format to binaural conversion using spat v5. (I hope you can upgrade)
The main limitation (was in v4, and still in v5) is that the B-format (or HOA) stream needs to be decoded over a set of virtual loudspeakers, prior to binauralization. There is yet no support for “direct transcoding” from Ambisonics to binaural (a pity).

The attached patcher is mostly “pedagogical”. Feel free to adapt it to your needs.
Also, have a look at “spat5.tuto-bformat” for additional information.

Best,
T.

  
----------begin_max5_patcher----------  
5200.3oc6cs0iiiar94d9UPXbBPBP2dDI00yS6tYwj8gylDjM.I4zyfAxVzt  
0NxR9nKcOSBx7a+vKR1T1Rxkrna6MXGra2tEkUUrpheUwhEo9Wu4tYKx9LqX  
F5+F8H5t69Wu4t6jWRbg6p+66lsI7yKSBKj21rkYa1vRKmcupsR1mKkW+IVX  
z1mxRYnh30ogIEM2QZ0l3zDVo7qiqu31vxkOEmt9i4rkkJxioj4V2ibIdheg  
w9heQnysPen9KsnZwhDl9iYUVZYQ7+TcML+KrijYUkMzzR6lSC2Hu4YeadbX  
RCKtMmUv6SgkwYoihihijOrrE+7CD+Yhq8ueyaD+39IJMWDmFVkGlD+OkLEJ  
aEp7IFhRPIYUQEaYgehkuSDmDmxVlUkJ+tjt5TcdGP0Lj.641XrmME6Za4Rb  
tG4HDCbYBIP7KpyUTKMNtSWi4XRMVdFmyXRszKOkkvGFrjkxtGEuBkxXQrnQ  
OdvW1IH9dy4cIr+Mv3gSxQ5RW6yQ5lD+LadjFq7bX9NdbWiO5+gwJMs8slay  
+miukkmOVXkfoxtiss7m9Zci1xKxN40xphEY4Qr7kYIY4pGr0bJl5Iddc+o8  
OU0ir7KaYpu4rY2ilsJIKjyheXXI+n3dMk.krSkFlyEikr7OxRCOvpoH7YVz  
GCKKyiWTUx1+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SuQyaBAk  
kz90IffcjxQrt863YPUn5871A9M+627+CYITURA  
-----------end_max5_patcher-----------  

Hi,

The support for spat v4 is discontinued. I’m sending you a (tentative) patch for b-format to binaural conversion using spat v5. (I hope you can upgrade)
The main limitation (was in v4, and still in v5) is that the B-format (or HOA) stream needs to be decoded over a set of virtual loudspeakers, prior to binauralization. There is yet no support for “direct transcoding” from Ambisonics to binaural (a pity).

The attached patcher is mostly “pedagogical”. Feel free to adapt it to your needs.
Also, have a look at “spat5.tuto-bformat” for additional information.

Best,
T.

  
----------begin_max5_patcher----------  
5200.3oc6cs0iiiar94d9UPXbBPBP2dDI00yS6tYwj8gylDjM.I4zyfAxVzt  
0NxR9nKcOSBx7a+vKR1T1Rxkrna6MXGra2tEkUUrpheUwhEo9Wu4tYKx9LqX  
F5+F8H5t69Wu4t6jWRbg6p+66lsI7yKSBKj21rkYa1vRKmcupsR1mKkW+IVX  
z1mxRYnh30ogIEM2QZ0l3zDVo7qiqu31vxkOEmt9i4rkkJxioj4V2ibIdheg  
w9heQnysPen9KsnZwhDl9iYUVZYQ7+TcML+KrijYUkMzzR6lSC2Hu4YeadbX  
RCKtMmUv6SgkwYoihihijOrrE+7CD+Yhq8ueyaD+39IJMWDmFVkGlD+OkLEJ  
aEp7IFhRPIYUQEaYgehkuSDmDmxVlUkJ+tjt5TcdGP0Lj.641XrmME6Za4Rb  
tG4HDCbYBIP7KpyUTKMNtSWi4XRMVdFmyXRszKOkkvGFrjkxtGEuBkxXQrnQ  
OdvW1IH9dy4cIr+Mv3gSxQ5RW6yQ5lD+LadjFq7bX9NdbWiO5+gwJMs8slay  
+miukkmOVXkfoxtiss7m9Zci1xKxN40xphEY4Qr7kYIY4pGr0bJl5Iddc+o8  
OU0ir7KaYpu4rY2ilsJIKjyheXXI+n3dMk.krSkFlyEikr7OxRCOvpoH7YVz  
GCKKyiWTUx1+ohZMUspRnMRpXYqZtby00e7EOkku2rJOKoQU15tZjBVczVUZ  
bYQ4WZwistgMbUtnsGnt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iUfjmUaCjDCb.DiESjVFr+HV3goS  
ILDJgMAkHPnDwDThBgRSMTNLDGBlH6wMZfSRHrIHDA.gHlfPT.DxH5Ha.Dx1  
DDxA.gbLAgbAPHWSPHO.DxyDDxG.g7MAgB.Pn.iLfEBz.1LXCf.GLB5.FB7.  
1H3CXH.DXifPfg.QfMBFAFBHA1HnDXHvDXifSfg.TfMBRAFBTA1HXEXHfEXi  
fVPffVPLBZAABZAwLwR.JXBifVPffVPLBZAABZAwHnEDHnEDifVPffVPLBZA  
ABZAwHnEDHnEDifVPffVPLBZAEBZA0HnETHnESNMdXHEHC0Dk.B1FxrqolhR  
XHTZxROLj7sXhxKRQIL.JYl9DA.kHFgRT.TZxdOvfJYRrQxhjjVXPzBaDZQ.  
QKhQnEEDslr9BRxVONQbpBy9f2BZBZbva+rCdymc7a8r9eimc3a6L41MV8le  
5fhAe+VmoJJN6mju1t93OxRqTUmdyKWr1RhEqWEmjrLKI6nW5aM0R+LUq6dA  
q0buhsVBIvFi84hk4TL0i3J+D+CNN5a4c02A27krcrCrHha01k3Y6H+jOg5P  
uu0Q2p5qQ1SKKbfhBVA9V1pOwuD9dj9gW6rvz00ulx7z2SK4YaEGOj0R84zf  
c2eUY157vn35yDq1u2tuu1PJm25guvslsgKPia9N5Fd6TFeuRpymT92kkDg9  
yYhsDR7PpD88L0ixcMUiMmgXkez9+YH5uaLyAZ59k9Vy8c5bKe0v9crAudrd  
KdgDhkYluGBQRa1dp0Upm1b1OB2Z5d3i82Mtn6gxTOWaOobg5aSwRYk8ACGO  
yQwf0Im0X+1GcCcotl0RY1ro0ebuKTSoAC+rGDi0eUaYF.4edwB3iWB90gKv  
GtXD0ymJRh4A772DQCMjdRq+J2H+s9gg3E0tk96RpXCiwFtbISrUc0z.TrPU  
Kj6t6h1InV6aZF7OjyXoilCsDrji3HaVF1E10mGLlQYtpMKX4+AtSuQyaBAk  
kz90IffcjxQrt863YPUn5871A9M+627+CYITURA  
-----------end_max5_patcher-----------