Hi all,
I'm loading a series of images into a pix_buffer using folder_list and [open( messages. I would then like to send a bang event once all the images are loaded.
image? Maybe pix_buffer_write has something? 2) Is there a way to know when folder_list has finished outputting all the files?
This seemingly easy problem has me scratching my head. The best workaround I can think of at the moment is to just build in a long enough delay before triggering the finished event but that feels like a dirty hack.
Thoughts?
-martin
Hello Martin,
It should be quite simple with a [trigger] to get a bang when [folder_list] and [pix_buffer] have finished their job. To simplify :
[t b b b] | | | | | [folder_list] | | | [pix_buffer] | final bang
++
Jack
Le 05/03/2014 22:59, Martin Eckart a écrit :
Hi all,
I'm loading a series of images into a pix_buffer using folder_list and [open( messages. I would then like to send a bang event once all the images are loaded.
- Is there a way to find out when pix_buffer has finished loading an
image? Maybe pix_buffer_write has something? 2) Is there a way to know when folder_list has finished outputting all the files?
This seemingly easy problem has me scratching my head. The best workaround I can think of at the moment is to just build in a long enough delay before triggering the finished event but that feels like a dirty hack.
Thoughts?
-martin
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Here an example... ++
Jack
Le 06/03/2014 11:24, Jack a écrit :
Hello Martin,
It should be quite simple with a [trigger] to get a bang when [folder_list] and [pix_buffer] have finished their job. To simplify :
[t b b b] | | | | | [folder_list] | | | [pix_buffer] | final bang
++
Jack
Le 05/03/2014 22:59, Martin Eckart a écrit :
Hi all,
I'm loading a series of images into a pix_buffer using folder_list and [open( messages. I would then like to send a bang event once all the images are loaded.
- Is there a way to find out when pix_buffer has finished loading an
image? Maybe pix_buffer_write has something? 2) Is there a way to know when folder_list has finished outputting all the files?
This seemingly easy problem has me scratching my head. The best workaround I can think of at the moment is to just build in a long enough delay before triggering the finished event but that feels like a dirty hack.
Thoughts?
-martin
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
On 03/06/2014 11:24 AM, Jack wrote:
Hello Martin,
It should be quite simple with a [trigger] to get a bang when
yes. right now [pix_buffer] does synchronous loading of images, so [trigger] should be enough to detect whether an image has been loaded.
however, i would like to add asynchronous (threaded) image loading to [pix_buffer] as well, which will require in-patch feedback when images are loaded (through the outlet of [pix_buffer]). i imagine, this feedback will be modelled after the thread-loading messages emitted by [pix_image], e.g. something like:
<slot#> load defer <id> /tmp/image.png <slot#> load success <id> <slot#> load discard <id> <slot#> load fail <id>
but it's not there yet.
fmadrs IOhannes
Wow, thanks! You've fundamentally changed my understanding of [trigger]. I didn't realize it actually waited for the operation to complete before sending the next event.
Works great now, thanks again.
-martin
On Thu, Mar 6, 2014 at 5:24 AM, Jack jack@rybn.org wrote:
Hello Martin,
It should be quite simple with a [trigger] to get a bang when [folder_list] and [pix_buffer] have finished their job. To simplify :
[t b b b] | | | | | [folder_list] | | | [pix_buffer] | final bang
++
Jack
Le 05/03/2014 22:59, Martin Eckart a écrit :
Hi all,
I'm loading a series of images into a pix_buffer using folder_list and [open( messages. I would then like to send a bang event once all the images are loaded.
- Is there a way to find out when pix_buffer has finished loading an
image? Maybe pix_buffer_write has something? 2) Is there a way to know when folder_list has finished outputting all the files?
This seemingly easy problem has me scratching my head. The best workaround I can think of at the moment is to just build in a long enough delay before triggering the finished event but that feels like a dirty hack.
Thoughts?
-martin
_______________________________________________Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
On 2014-03-06 15:25, Martin Eckart wrote:
Wow, thanks! You've fundamentally changed my understanding of [trigger]. I didn't realize it actually waited for the operation to complete before sending the next event.
oh. this is somewhat crucial to understand how Pd works, and is covered in the documentation as "depth-first message passing": http://msp.ucsd.edu/Pd_documentation/x2.htm#s3.2
you might want to read the documentation of Pd whenever you find time (or a sooner) :-)
fgmasdr IOhannes