pack vs pak
-
disco judas
- Posts: 324
- Joined: Tue Jan 27, 2009 11:24 am
pack vs pak
Hi
When sending lists into a poly~, like the 4 values of an adsr~, is there any reason to use pack instead of pak?
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.
Re: pack vs pak
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.
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
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?
Re: pack vs pak
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
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 casedeepee wrote:Yeah, that's it. 'Pak' is relatively new but for all (most) intents and purposes replaces 'pack'
Re: pack vs pak
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.
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
thanks. Why did they use pack instead of pak in the max datascaling tutorial?
Re: pack vs pak
I guess because its setting values rather than triggering an event.disco judas wrote:thanks. Why did they use pack instead of pak in the max datascaling tutorial?
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
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-----------
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-----------
Re: pack vs pak
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,
Re: pack vs pak
Yeah, that makes the pack object operate like a pak object.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-----------
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>
Re: pack vs pak
Nothing as tricky as hooking up an envelope object to a filter object no..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..
Just good old message ordering. Right to left.
Re: pack vs pak
Yes, but why would you do that when you have the 'pak' object?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
-
disco judas
- Posts: 324
- Joined: Tue Jan 27, 2009 11:24 am
Re: pack vs pak
hoffman2k wrote:Yeah, that makes the pack object operate like a pak object.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-----------
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