Forums > MaxMSP

[select] not accepting list no cool

September 1, 2010 | 7:56 am

Hello, advanced user friends,

after consulting [select] help and ref. file, I must admit sadly that this one doesn’t accept a list. This is bad.

I use [select] to do simple sequence for my music, like
[select 1 5 9 13] for 4/4 kick drum hits in counter that counts 1 to 16 situation. and I wish that I could pass some numberz as list to [select] dynamically, so if I use a counter that counts 1 to 923526464679830 then I can generates some hundreds of nums as a list and just pass to my [select] that does the music for me and for my fans. But [select] doesn’t accept list. and that ruins everything.
for now I use [switch] to jump between different [select n n n n...] that are pre-defined, but that seems to be somehow a pathetic joke for me in year 2010 with max version 5.

Do you have a [select] object that can accept a long or short list that you wrote in C++? or you have some workaround to do the same thing? or am I missing a built-in object that does it already? like [jit.selectthatyoucanputalistin~] object?

I think my question is clear, but if not, please tell me so that I can make a demo patch. for now, my patch is too messy that I’m a bit discouraged to copy/paste.

Thank you very much.


September 1, 2010 | 9:28 am

I don’t totally understand the question:

Do you:

A – want to *route* a list of numbers based on the first number (in which case – look at [route]).

or

B – send multiple bangs from a single select based on the contents of a list (in which case you should use [zl iter 1] just before your select.

or I suppose C – something else.

Either way it’s very easy to do either of those things – if you want to do something else, then explain what it is!

HTH

Alex


September 1, 2010 | 9:55 am

Please look at this patch in order to understand my question…
‘sorry I tried my best,
if you still can’t understand after looking at the patch,
then I’ll try even more, as it’s very important step forward to solve this problem for me.

let me know.

thank you

– Pasted Max Patch, click to expand. –

September 1, 2010 | 9:57 am

shit, I’m sorry, there was a typing mistake in previous patch…

– Pasted Max Patch, click to expand. –


Ch
September 1, 2010 | 11:29 am

Maybe you can use [zl sect] instead of [select] ?

– Pasted Max Patch, click to expand. –

September 1, 2010 | 3:28 pm

1.
maybe when an object does not do what you need, you´re just using the wrong object.

2.
[select] and [route] do only accept the "set" message when there is no argument (i.e only two outputs)

3.
you will never be able to split "hundreds" of numbers in a maxmsp external. there is a limit for
arguments and outputs.
this is the point where you should consider building your sequencer differently.


September 1, 2010 | 9:43 pm

use [zl reg] to store your big list of numbers, then as your counter counts up, test each value against the numbers in your [zl reg]. I think it’s [zl lookup] but if not, you should be able to find it easily (test incoming number against stored list, outputs index if found, otherwise no output). Then you bang your MIDI notes or whatever.

Also if you are doing step-sequence kinds of things using [counter], where the beats are regular, don’t use [select], use

%4
|
sel 0
|
bang midinote

this will give you "every 4th beat" regardless of where your counter is.

and as usual, there are about a hundred different ways to do just this…


September 1, 2010 | 11:22 pm

I’m with Roman and seejayjames on this one; re-evaluate your sequencer; there is a myriad of wais of doing what you want.

I’d go with counter, %4 as a starting point. Or even [counter 1 4]->[sel 1] should do it (unless my brain is somehow shorting out on my right now.


September 2, 2010 | 10:20 am

thank you for the replies!

[zl sect] was the perfect solution. it is perfect. I don’t know how much I owe you, Ch. Suddenly my sequencer looks elegant and I have much more expressive freedom while send out numbers than click,click,click on toggle boxes like a pathetic idiot. And the [zl] object is globally very interesting and promising. I was looking for some kind of array manipulation of numbers like in Supercollider’s pattern methods, and [zl] should be max’s answer for that. great…

for those of you who pointed out that my approach to sequencer, thanks to did so. I didn’t know that max has limited nums of arguments. for %, I know that it is very useful but not for this time. (the example I’ve posted is just for sake of simplicity, I do not wish to generate 4/4 kick with [zl]!!)

I’m thinking on learning Javascript to write my own system to do my sequence. a kind of number generator using different type of data input. One example I saw is an object that simply bangs two times when you send a bang. From that point I think I can develop b,b,b…b,b,ba,bang,ng,bang. kind of thing…long way to go…but loads of fun promised.

thanks again and if ever somebody have some good examples on scripting in max, I’ll be very interested.

best,

jae ho


September 2, 2010 | 1:48 pm

here’s a little patch which lets you populate the rows of a [matrixctrl] with random probability for each row. Change the numbers in the [uzis] in the subpatches for the number of steps (if you want 64 or whatever). It’s an easy way to generate sequences of on/off stages rather than manually clicking or painting, though you can always adjust them this way and save as presets, if you’ve generated something interesting and want to tweak it a bit.

Also don’t forget you can hold Shift to change how the dial responds (more precise)… number boxes (int and float) and sliders also respond to Shift.

– Pasted Max Patch, click to expand. –

September 4, 2010 | 5:37 am

Thank you seejay

I had closer look at your brilliant patch.
And it took some time to understand the logic in the sub-patch.

Though I assume that I have understood the most part,
it remains two questions to be more clear.

1. the use of [pack] object in the sub patch.
-is it for pack bang and index number? because the message box needs to be triggered by bang? and $2 tag in the message box means to take second argument in the [pack] which is the index num? (have a look at my comments on your sub-patch under)

2. I am still a bit confused how to use matrix control for sequencers.when I unpack the col,row,val from [matrixctrl] and display to integer boxes, it only shows the last col and the value. can you show me a simple example of matrixctrl usage in the musical context? it seems to be easy, but I’m blocked somewhere…(a while ago, noob4life offered me a sequencer code with [matrixctrl] and I still have not understood how it works.)

thanks again for your excellent patch. once I understand fully how it works and how to use it, I think it will be a massive tool for my music making process.

– Pasted Max Patch, click to expand. –

September 4, 2010 | 6:50 am

‘sorry,

I’ll answer to my own question. (the second one.)

check out ‘the pulseSequencer’ on this page.

http://www.xfade.com/max/examples/


Viewing 12 posts - 1 through 12 (of 12 total)