MIDI notes played from list <-- how to?

ESPerion's icon

this is silly but here's the deal: i create a list containing notes values as int, then zl slice it to get the next note being played... until there's nothing left in the list.

1st i tried iter to "shoot" notes 1 by 1 to pipe, in the hope that pipe would delay them 1 by 1 as well... but NO, they are all sent to pipe at the same time simultaneously. so that's why i went the loop path and zl slice 1 the list.

now this's where the problem is: max stack overflow every time i play a chord on the midi keyboard. must be an error on my maxing??

the patch is attached... plz have a look if u can ~__~

jln's icon

forum don't like attached files. Paste it as text please, so we can
have a look at it.

Best,

Julien.

ESPerion's icon

oooh i didn't know that.. here's the text file...

thanks a lot for looking into this, err, issue ^o^~

Max Patch
Copy patch and select New From Clipboard in Max.

ESPerion's icon

...still helpless? >__

a few more hours and i'll be with the firing squads. but seriuosly, i can't find out why there's a "stack overflow" with this... the loop should be the culprit but why..?

Stefan Tiedje's icon

Arion wrote:
> now this's where the problem is: max stack overflow every time i play
> a chord on the midi keyboard. must be an error on my maxing??

I guess the attached patch is different than mine (it works for me)

Stefan

Max Patch
Copy patch and select New From Clipboard in Max.

--
Stefan Tiedje------------x-------
--_____-----------|--------------
--(_|_ ----|-----|-----()-------
-- _|_)----|-----()--------------
----------()--------www.ccmix.com

Stefan Tiedje's icon

Arion wrote:
> oooh i didn't know that.. here's the text file...
>
> thanks a lot for looking into this, err, issue ^o^~

the message object is not like a number, it does not pass what you send
in. The feedback causing the stackoverflow is the zl slice, the right
outlet will send a list to the messagebox which sends the same list as
before, this will never stop till the stack overflows...

There is a trace option which helps to track down probs like that, and
don't forget to do all the tutorials, there is some obvious lack of
basic understanding documented in your patch...

Stefan

--
Stefan Tiedje------------x-------
--_____-----------|--------------
--(_|_ ----|-----|-----()-------
-- _|_)----|-----()--------------
----------()--------www.ccmix.com

ESPerion's icon

thanks Stefan~ ^^ i realized that as well... it's all fixed now. but in order to have more control over lists there isn't any choice but to use the various exteral objects is there? cuz zl offers only the basics.

Stefan Tiedje's icon

Arion wrote:
> thanks Stefan~ ^^ i realized that as well... it's all fixed now. but
> in order to have more control over lists there isn't any choice but
> to use the various exteral objects is there? cuz zl offers only the
> basics.

zl usually delivers all I need, what are you missing? Beside that, there
are list specialised externals - Lobjects for example. Don't forget as
long you are just dealing with Midi, Max was able to do anyhthing you
want long before zl came up. I think its always a good exercise to try
to come along with the standard distribution as long you deal with
simple problems...

There are some collections though, which open new worlds (FTM for
example), but in your state of learning I'd recommend to stick with what
you got, it will keep you busy for a while and you'll learn a lot...

Stefan

--
Stefan Tiedje------------x-------
--_____-----------|--------------
--(_|_ ----|-----|-----()-------
-- _|_)----|-----()--------------
----------()--------www.ccmix.com