pack vs pak

Discuss music production with Ableton Live.
Post Reply
disco judas
Posts: 324
Joined: Tue Jan 27, 2009 11:24 am

pack vs pak

Post by disco judas » Sun Oct 18, 2009 9:11 am

Hi

When sending lists into a poly~, like the 4 values of an adsr~, is there any reason to use pack instead of pak?
Last edited by disco judas on Tue Oct 20, 2009 10:31 am, edited 1 time in total.

deepee
Posts: 49
Joined: Thu Oct 11, 2007 11:28 am

Re: pack vs pak

Post by deepee » Sun Oct 18, 2009 9:54 am

No noob forum but they are very helpful over there - don't be afraid to ask, there maybe more to it than I think but...

in the ADSR situation there wouldn't be much use for the pack object. In fact pack seems to be a bit redundandt for me. I don't come across the situation where you only want output when the left input changes very often.

disco judas
Posts: 324
Joined: Tue Jan 27, 2009 11:24 am

Re: pack vs pak

Post by disco judas » Sun Oct 18, 2009 10:07 am

deepee wrote:No noob forum but they are very helpful over there - don't be afraid to ask, there maybe more to it than I think but...

in the ADSR situation there wouldn't be much use for the pack object. In fact pack seems to be a bit redundandt for me. I don't come across the situation where you only want output when the left input changes very often.

Ok, so pak - unpack is the combination to go for most times?

deepee
Posts: 49
Joined: Thu Oct 11, 2007 11:28 am

Re: pack vs pak

Post by deepee » Sun Oct 18, 2009 1:07 pm

Yeah, that's it. 'Pak' is relatively new but for all (most) intents and purposes replaces 'pack'

disco judas
Posts: 324
Joined: Tue Jan 27, 2009 11:24 am

Re: pack vs pak

Post by disco judas » Sun Oct 18, 2009 8:31 pm

deepee wrote:Yeah, that's it. 'Pak' is relatively new but for all (most) intents and purposes replaces 'pack'
thanks, is there a place I can see some history of which and when objects are added to the program. That would maybe give me a clue of what objects is more useful for a certain case

mo-seph
Posts: 34
Joined: Sat Mar 25, 2006 12:01 pm
Contact:

Re: pack vs pak

Post by mo-seph » Tue Oct 20, 2009 10:25 am

The difference is that pak will send a list out whenever any input receives a message, while pack will only trigger on the leftmost input.

I wouldn't say pak replaces pack, but they're useful in different situations. For instance, you might want to attach sliders to all the inputs of the pack, but only output the list e.g. on a note on triggering a bang in the left input.

disco judas
Posts: 324
Joined: Tue Jan 27, 2009 11:24 am

Re: pack vs pak

Post by disco judas » Fri Oct 23, 2009 10:31 am

thanks. Why did they use pack instead of pak in the max datascaling tutorial?

hoffman2k
Posts: 14718
Joined: Tue Jun 15, 2004 6:40 pm
Location: Belgium
Contact:

Re: pack vs pak

Post by hoffman2k » Fri Oct 23, 2009 10:47 am

disco judas wrote:thanks. Why did they use pack instead of pak in the max datascaling tutorial?
I guess because its setting values rather than triggering an event.
When triggering an event, you may want to use pack in order to have control over when the object outputs. When setting values, you want them to be set as fast as possible. Or in other words, as soon as a new value is received. You want all recent values to be sent out.

[Pak 0. 0.] will send out both values when it receives a value in either inlet.

[Pack 0. 0.] will send out both values when it receives a value or a bang in the first inlet.

disco judas
Posts: 324
Joined: Tue Jan 27, 2009 11:24 am

Re: pack vs pak

Post by disco judas » Thu Jan 21, 2010 1:18 pm

Does this make the pack work as pak?
Im making all value changes at the pack inlets trigger a bang to the leftmost inlet

----------begin_max5_patcher----------
581.3oc0WtsabBCDF9ZhTdGPb8Vj8XLG5c84nJphSIwsfAAF0sMpu601rfnI
sKd2kBDsRqEC1l++OOiM7x82Y4jTcLu0w9i1e11x5EYDKcLUDqg.VNkwGSKh
a0czgm+8pju5b3z8D4GE53c753zuYiT+bGuccrH8YF+ouzjmJ5eP3PrK5fMg
3oZvDjpAj+a+vvnp5DE4BwOpy6GhCiKbNL17XQUrbxF69iUbAOtT2YmO0vhK
Fe9rLcPoh+.lNFk2Ux3xmf1Q3oSSK6m5oAicoQTbXvjgzqJ8XH5n+596Tsxl
C2L9pazl6LXiDMAaDxaolgXve4v.55wPWYRdiA9E70NkdAYIIw7mt7rifkCK
vxmcXXo0obDjtBCCgtg9.PilkbWNtB+63hbE3Be03JoSHp3miH998IQQCoOy
hhWk8Lwy.ZlTjkxVx82jS04rE30aEfZbwQ+llWa4AP2EkGyuqQDYM20.Bdmf
kSm4RCVErPP6ArXPYTDboX41JiHv6i7Ef36RWw7Exd.KyeZxP9RHr.GmP7Vo
iSLvWmVtWFeQ2M9ZXaukwW92ju5mSmBF+MewkV4pa7J21V00jNHrgSgsmn9r
7VAiGKXRLLoWn+rWOyxxx0c.MDpjkUWIqXOoD6G92KBlKtf8r3Lhbp2p0FVc
wgCLVb60kUs3vqu3P+eHW.UseHD0+cTdgiWsLq2gFoZ+MY81PwQ2DwodQg4E
GYaDmlI3YEGYaHmQUJD+sibyKts4nC06raf371NxAyJN3lEmJfr42zffc+I
-----------end_max5_patcher-----------

3phase
Posts: 4648
Joined: Fri Sep 26, 2003 3:29 am
Contact:

Re: pack vs pak

Post by 3phase » Thu Jan 21, 2010 1:24 pm

oh oh :| ... sounds like fun... hope it was a very complicated task like having an envelope modulating a filter or similar freaky stuff..
mac book 2,16 ghz 4(3)gb ram, Os 10.62, fireface 400,

hoffman2k
Posts: 14718
Joined: Tue Jun 15, 2004 6:40 pm
Location: Belgium
Contact:

Re: pack vs pak

Post by hoffman2k » Thu Jan 21, 2010 1:43 pm

disco judas wrote:Does this make the pack work as pak?
Im making all value changes at the pack inlets trigger a bang to the leftmost inlet

----------begin_max5_patcher----------
581.3oc0WtsabBCDF9ZhTdGPb8Vj8XLG5c84nJphSIwsfAAF0sMpu601rfnI
sKd2kBDsRqEC1l++OOiM7x82Y4jTcLu0w9i1e11x5EYDKcLUDqg.VNkwGSKh
a0czgm+8pju5b3z8D4GE53c753zuYiT+bGuccrH8YF+ouzjmJ5eP3PrK5fMg
3oZvDjpAj+a+vvnp5DE4BwOpy6GhCiKbNL17XQUrbxF69iUbAOtT2YmO0vhK
Fe9rLcPoh+.lNFk2Ux3xmf1Q3oSSK6m5oAicoQTbXvjgzqJ8XH5n+596Tsxl
C2L9pazl6LXiDMAaDxaolgXve4v.55wPWYRdiA9E70NkdAYIIw7mt7rifkCK
vxmcXXo0obDjtBCCgtg9.PilkbWNtB+63hbE3Be03JoSHp3miH998IQQCoOy
hhWk8Lwy.ZlTjkxVx82jS04rE30aEfZbwQ+llWa4AP2EkGyuqQDYM20.Bdmf
kSm4RCVErPP6ArXPYTDboX41JiHv6i7Ef36RWw7Exd.KyeZxP9RHr.GmP7Vo
iSLvWmVtWFeQ2M9ZXaukwW92ju5mSmBF+MewkV4pa7J21V00jNHrgSgsmn9r
7VAiGKXRLLoWn+rWOyxxx0c.MDpjkUWIqXOoD6G92KBlKtf8r3Lhbp2p0FVc
wgCLVb60kUs3vqu3P+eHW.UseHD0+cTdgiWsLq2gFoZ+MY81PwQ2DwodQg4E
GYaDmlI3YEGYaHmQUJD+sibyKts4nC06raf371NxAyJN3lEmJfr42zffc+I
-----------end_max5_patcher-----------
Yeah, that makes the pack object operate like a pak object.
Although you want to pay attention to the message ordering. Currently you're banging as a value is sent, but that may produce incorrect results if the bang reaches Pack before the value.

This would be more correct:

<pre><code>
----------begin_max5_patcher----------
572.3oc2WtsiaBCDF9Z3ovxWSQ9PLA5c84nZUEmxttELHvnl1U66dwFXKoJA
b0RrPQQJHOYP9++yyX67pqCLo5bdKD7YvWANNu553nCoB3LN1AVFeNsHtUmF
Tj+ypjuC8F9IY9YoNrDj.3SQEckbQQtT+F3wfmpDRQbYtN8uzviKlkdUmbJe
xXzgPxeUmOHOXRr3YnG.xE8S4SiYUGKSegKd9aM4oxgDwQTejGfbHR8fR7Y8
CP9n2eGdlVC813SD3L00x+sdtvDejJ5attpu793j4jcHyohp3kYyHTLhM36O
a5D0wo+.fTe72DFQuEiTUMdu+XcRgCwZDQOndfoHM2tEpXWkUXeVDCGdb6.V
ci1.a.nPKXcZzLqSoK57fM24ckI4M22Flwp.ceyhEACjfPzjfsbMvQaUCrRK
C8+jR3aQISPCEoaSvjP+v.BgEs.fB2Z.02E2ak6aoxvNElTrLs2pIEKD1Cca
SzAyIwwGZRLdJB635jfhdv6OhHlyBxibUAgFnt3kYjft0jHoSJqDKRBCOfv3
k7PxjEWvnGf6byLtpYjYX6byLswjQlIXtYzY.K3h+8+MpmEU7KcXaUWS5jtl
tnD3uSTVdqjKhk7dmOKovKR5EdVVtX98VK4Y0U8Mbih.7zU4soZhrCkjIXhX
cJgMgRXqII79agCaJkH1agiYBlrKkXWPfqKIpcquolrMP+4TVmSqpIjc4DxD
MEXeNsVam5xT1jSTS3DytbJzjsB1iZ5iTO0O3M2+.7ej9vE
-----------end_max5_patcher-----------
</code></pre>

hoffman2k
Posts: 14718
Joined: Tue Jun 15, 2004 6:40 pm
Location: Belgium
Contact:

Re: pack vs pak

Post by hoffman2k » Thu Jan 21, 2010 1:45 pm

3phase wrote:oh oh :| ... sounds like fun... hope it was a very complicated task like having an envelope modulating a filter or similar freaky stuff..
Nothing as tricky as hooking up an envelope object to a filter object no..
Just good old message ordering. Right to left. :D

deepee
Posts: 49
Joined: Thu Oct 11, 2007 11:28 am

Re: pack vs pak

Post by deepee » Thu Jan 21, 2010 1:46 pm

disco judas wrote:Does this make the pack work as pak?
Im making all value changes at the pack inlets trigger a bang to the leftmost inlet
Yes, but why would you do that when you have the 'pak' object?

disco judas
Posts: 324
Joined: Tue Jan 27, 2009 11:24 am

Re: pack vs pak

Post by disco judas » Thu Jan 21, 2010 5:30 pm

hoffman2k wrote:
disco judas wrote:Does this make the pack work as pak?
Im making all value changes at the pack inlets trigger a bang to the leftmost inlet

----------begin_max5_patcher----------
581.3oc0WtsabBCDF9ZhTdGPb8Vj8XLG5c84nJphSIwsfAAF0sMpu601rfnI
sKd2kBDsRqEC1l++OOiM7x82Y4jTcLu0w9i1e11x5EYDKcLUDqg.VNkwGSKh
a0czgm+8pju5b3z8D4GE53c753zuYiT+bGuccrH8YF+ouzjmJ5eP3PrK5fMg
3oZvDjpAj+a+vvnp5DE4BwOpy6GhCiKbNL17XQUrbxF69iUbAOtT2YmO0vhK
Fe9rLcPoh+.lNFk2Ux3xmf1Q3oSSK6m5oAicoQTbXvjgzqJ8XH5n+596Tsxl
C2L9pazl6LXiDMAaDxaolgXve4v.55wPWYRdiA9E70NkdAYIIw7mt7rifkCK
vxmcXXo0obDjtBCCgtg9.PilkbWNtB+63hbE3Be03JoSHp3miH998IQQCoOy
hhWk8Lwy.ZlTjkxVx82jS04rE30aEfZbwQ+llWa4AP2EkGyuqQDYM20.Bdmf
kSm4RCVErPP6ArXPYTDboX41JiHv6i7Ef36RWw7Exd.KyeZxP9RHr.GmP7Vo
iSLvWmVtWFeQ2M9ZXaukwW92ju5mSmBF+MewkV4pa7J21V00jNHrgSgsmn9r
7VAiGKXRLLoWn+rWOyxxx0c.MDpjkUWIqXOoD6G92KBlKtf8r3Lhbp2p0FVc
wgCLVb60kUs3vqu3P+eHW.UseHD0+cTdgiWsLq2gFoZ+MY81PwQ2DwodQg4E
GYaDmlI3YEGYaHmQUJD+sibyKts4nC06raf371NxAyJN3lEmJfr42zffc+I
-----------end_max5_patcher-----------
Yeah, that makes the pack object operate like a pak object.
Although you want to pay attention to the message ordering. Currently you're banging as a value is sent, but that may produce incorrect results if the bang reaches Pack before the value.

This would be more correct:

<pre><code>
----------begin_max5_patcher----------
572.3oc2WtsiaBCDF9Z3ovxWSQ9PLA5c84nZUEmxttELHvnl1U66dwFXKoJA
b0RrPQQJHOYP9++yyX67pqCLo5bdKD7YvWANNu553nCoB3LN1AVFeNsHtUmF
Tj+ypjuC8F9IY9YoNrDj.3SQEckbQQtT+F3wfmpDRQbYtN8uzviKlkdUmbJe
xXzgPxeUmOHOXRr3YnG.xE8S4SiYUGKSegKd9aM4oxgDwQTejGfbHR8fR7Y8
CP9n2eGdlVC813SD3L00x+sdtvDejJ5attpu793j4jcHyohp3kYyHTLhM36O
a5D0wo+.fTe72DFQuEiTUMdu+XcRgCwZDQOndfoHM2tEpXWkUXeVDCGdb6.V
ci1.a.nPKXcZzLqSoK57fM24ckI4M22Flwp.ceyhEACjfPzjfsbMvQaUCrRK
C8+jR3aQISPCEoaSvjP+v.BgEs.fB2Z.02E2ak6aoxvNElTrLs2pIEKD1Cca
SzAyIwwGZRLdJB635jfhdv6OhHlyBxibUAgFnt3kYjft0jHoSJqDKRBCOfv3
k7PxjEWvnGf6byLtpYjYX6byLswjQlIXtYzY.K3h+8+MpmEU7KcXaUWS5jtl
tnD3uSTVdqjKhk7dmOKovKR5EdVVtX98VK4Y0U8Mbih.7zU4soZhrCkjIXhX
cJgMgRXqII79agCaJkH1agiYBlrKkXWPfqKIpcquolrMP+4TVmSqpIjc4DxD
MEXeNsVam5xT1jSTS3DytbJzjsB1iZ5iTO0O3M2+.7ej9vE
-----------end_max5_patcher-----------
</code></pre>

Thank you.
That is also how its done in msp tutorial 16. I guess that is from pre-pak days

Post Reply