How much in this list ?
-
LevraiBernardo
- Site Admin
- Posts: 110
- Contact:
There's no way that I know of that will give you the number of items without jumping within the list, but it's possible to retrieve the number and jump back to whatever the current entry is:
Assuming a Button is used to trigger the process, you'll need two each of PassEventFlow, Variable and WaitOneCycle modules. Plus of course the Combo or List:
1) Button.Out > WaitOneCycle[1] > PassEventFlow[1].Pass.
2) Set PassEventFlow[1].In to a number higher than the number of entries will ever be.
3) PassEventFlow[1].Out > Combo.List
4) Button.Out > WaitOneCycle[1] > WaitOneCycle[2] > PassEventFlow[2].Pass.
5) PassEventFlow[2].Out > Combo.List
6) Button.Out > Variable[1].Affect
7) Combo.List > Variable[1].In
Variable[1].Out > PassEventFlow[2].In
9) Button.Out > WaitOneCycle[1] > Variable[2].Affect
10) Combo.List > Variable[2].In
Variable[1].Out will hold the original entry (remember that counting starts at 0), while Variable[2].Out holds the number of entries.
There's probably other ways of doing this, but this is the simplest way I could think of right now.
Assuming a Button is used to trigger the process, you'll need two each of PassEventFlow, Variable and WaitOneCycle modules. Plus of course the Combo or List:
1) Button.Out > WaitOneCycle[1] > PassEventFlow[1].Pass.
2) Set PassEventFlow[1].In to a number higher than the number of entries will ever be.
3) PassEventFlow[1].Out > Combo.List
4) Button.Out > WaitOneCycle[1] > WaitOneCycle[2] > PassEventFlow[2].Pass.
5) PassEventFlow[2].Out > Combo.List
6) Button.Out > Variable[1].Affect
7) Combo.List > Variable[1].In
9) Button.Out > WaitOneCycle[1] > Variable[2].Affect
10) Combo.List > Variable[2].In
Variable[1].Out will hold the original entry (remember that counting starts at 0), while Variable[2].Out holds the number of entries.
There's probably other ways of doing this, but this is the simplest way I could think of right now.
Bjørn S
Yes actually, there is no way to retrieve the length of a list, except the solution posted by Bsork.
It's a leak of Usine, I'll try to find something simple like an outlet.
It's a leak of Usine, I'll try to find something simple like an outlet.
Olivier Sens
www.brainmodular.com
www.brainmodular.com
Yes, Olivier, a "len" outlet would be sometimes helpful, specially in the sampler (for the file list). That would allow special tricks.
vincent michel
composer & novelist
composer & novelist
-
LevraiBernardo
- Site Admin
- Posts: 110
- Contact:
I agree with Vincent. It would be great, Senso.
Anyway, many thanks to Bsork. Incredible, but that works. (Now I understand why it's called Usine
.
Anyway, many thanks to Bsork. Incredible, but that works. (Now I understand why it's called Usine
Glad to be of help!
I too agree with the len outlet idea. In fact, by coincidence I yesterday tried to find a good way to automate a saving process with a sampler and a preset manager in a patch, and a len outlet would make that easier.
(I think I'll end up not doing the automating thing anyway. That is however not because of a missing outlet.)
I too agree with the len outlet idea. In fact, by coincidence I yesterday tried to find a good way to automate a saving process with a sampler and a preset manager in a patch, and a len outlet would make that easier.
(I think I'll end up not doing the automating thing anyway. That is however not because of a missing outlet.)
Bjørn S
ok,ok!
I'll implement some "list length functions" very soon.
I'll implement some "list length functions" very soon.
Olivier Sens
www.brainmodular.com
www.brainmodular.com
-
LevraiBernardo
- Site Admin
- Posts: 110
- Contact:
It's so good to feel understood... Thank you, Mr Senso.
Who is online
Users browsing this forum: No registered users and 31 guests
