• dewdrop_world

    Is there a way in pd to have a sequence of symbols that you can output one at a time?

    I saw a thread on this forum suggesting that data structures would be useful for this, but I couldn't get it to work -- [append] has no method for "symbol." (Unfortunately I can't find that thread again now.)

    Then I found an old pd list post where Miller Puckette admitted that data structures had not been fully debugged. So, even though the documentation states that symbols may be stored in data structures, it seems this is not actually the case.

    Is there any other way?

    I find it hard to imagine that it would be completely unsupported to have a sequence of strings? (Because nobody ever needed to do this before...?)

    At worst, I suppose I could store numbers in a table and just require that sections have numeric identifiers instead of meaningful names. It would really be a shame if I had to do that, though.


    posted in technical issues read more
  • dewdrop_world


    I have a pd-extended patch that used to work perfectly, back when I was on Ubuntu 10.04 (upgraded during the summer). Now it crashes pd when I try to start the gem window a second time.

    I simplified the patch to include only pix_video --> pix_texture --> rectangle and the control bits that start and stop the video. This reproduces the crash (attached).

    The idea is that the toggle should turn on the gem window and capture video from the built-in webcam -- then, clearing the toggle should stop video processing. You should be able to keep going like that, but it crashes when you enable video a second time.

    I can avoid the crash by closing the patch and reopening, but this isn't convenient for long programming sessions where I might need to start and stop the video dozens of times in an hour.

    It's probably something simple I'm doing wrong. Would someone mind taking a look at the patch?



    posted in pixel# read more
  • dewdrop_world

    Okay, I have been fighting with this for about 7-8 hours now, and it just isn't working.

    The basic outline of the patch, now with gem objects (and leaving out some details) is:

    [pix_crop] -- the x and y offsets are driven by a subpatch that acts like a nested loop
    [pix_blob] -- mode 4 = alpha channel

    ... and the x, y and size outlets are packed into a list and sent out by OSC.

    The problem is that pix_blob very frequently outputs nothing. This really shouldn't happen, if all the objects were doing what I think. Explanation --

    Suppose in one frame, I crop the image to the top left quadrant and calculate pix_blob just for that quadrant. Then, on the next frame, I crop to the top right quadrant and get pix_blob again. The successive frames may have very different blob coordinates, and I'd expect to get the different sets of coordinates each time. Instead, pix_blob goes silent sometimes.

    I thought, maybe it goes quiet because there was no change -- but these are different areas of the image, and the likelihood of having the same centroid in two different slices of the image seems rather low.

    Or maybe it's because the frames are so different that pix_blob doesn't know what to do. (I have no way to guess, in the absence of documentation of exactly what pix_blob is doing.)

    Sorry to keep posting so much about this, but I really have to get this working, documentation is not answering my questions, and my previous thread (link) has gone dead. I'm starting to get a bit desperate. At this point, I may have no choice but to chuck out the vast majority of the data I was hoping to get from the camera and go for just one, simple, dumb centroid. Rather frustrating.

    Thanks in advance -- I will give credit in the concert program to people who can help me get this running.


    PS You also need a 320x240 black image. saved as "black320x240.png" - I made one with GIMP. Or just delete the pix_composite part.


    posted in pixel# read more
  • dewdrop_world


    Been a while... my webcam -> gridflow -> OSC -> SuperCollider patch is working really well in Linux. But now a problem -- I need to make this available to some students who are running Windows. [#camera] doesn't work in Windows (unless something changed since the last stable release).

    So then I thought, the first time I tried to use gridflow, I couldn't figure out how to use [#camera] so I ended up doing [metro] --> [gemdead] --> [pix_video] --> [#from_pix]. Then I found... in Windows, no Gem integration ("couldn't create" [gemdead] and [#from_pix]).

    ... which pretty well hoses a major project for the semester.

    So I'm evaluating alternatives. Main question for here is: Is there any way to get webcam input into gridflow under Windows? (I'm guessing no.)

    If not, what would be the next best thing?

    The gridflow objects I'm using are:

    [#moment 1]
    [#fold +] and [#redim] to sum the pixels

    Is it feasible to replace these with Gem or other objects?

    Would appreciate some ideas, soon if possible -- if I'm going to get this project off the ground, I need to do it quickly.

    Patch attached. (Also uses mrpeach OSC objects, i.e., pd-extended.)



    posted in pixel# read more
  • dewdrop_world

    I'm trying to follow the struct tutorial here: http://puredata.info/Members/ggkarman/Tutoriales/datastruct_en_02/view

    It's not working.

    I'm attaching my test patch, which replicates the tutorial's objects through page 3, as far as I can see. I only changed the names and included just one float in the struct instead of 3.

    ~~ test patch contents
    [pd struct1] contains [struct struct1 float x]
    [pd data1] contains nothing

    [traverse data1(
    | [button]

    Sending the "traverse" message causes the pointer to say "pointer: list 'data1' not found." That's rather different from what the tutorial says it should do.

    pd extended 0.43.3 on Ubuntu



    posted in technical issues read more
  • dewdrop_world

    Spent the better part of today reverse engineering gridflow's "multiblob" example patch -- time well spent, actually, as I now have a much better idea what it's actually doing than I would if I had just cribbed the example.

    The only trouble is, it's s-s-l-l-l-l-o-o-o-o-o-o-w-w-w-w-w-w-w-w-w, chewing anywhere from 30-60% CPU according to Ubuntu system monitor. So I'm wondering how to pick up the pace. My patch is attached.

    First obvious thing is, reduce the image size by another factor of two. After [#downscale_by 4 smoothly], the image is 320x256. I may not need that much resolution, but I'd prefer to keep that as a last resort.

    Second thing -- I'm not sure how much efficiency I'm losing by reading the webcam using gem and then converting to gridflow. I ended up doing it that way because I simply could not get [#camera] to grab images at all. The #camera panel does identify the laptop's built-in webcam (BisonCam,_NB_Pro) but 'bang'ing a [#camera 0] only produces this error.

    error: [#io.videodev in /dev/video0 0] inlet 0 method bang: alloc_image: ioctl VIDIOCGMBUF: Invalid argument

    (Ubuntu Lucid (2.6.33-29-realtime), 64-bit, pd 0.42.5-extended, installed gridflow from the puredyne PPA https://launchpad.net/~puredyne-team/+archive/ppa/+files/gridflow_9.12-1%7Eppa1%7Elucid1_amd64.deb)

    Beyond that, I don't know enough about what gridflow is doing under the hood to use it more efficiently. Any pointers?



    posted in pixel# read more
  • dewdrop_world

    Do any users of gridflow happen to know why none of the pddp_open objects in gf_tutorial_intro can load?

    doc_h_loadbang: bang
    pddp_open pure-data-1
    ... couldn't create
    pddp_open pure-data-2
    ... couldn't create

    pure-data-1.pd thru 9 exist under gridflow/doc/tutorials, but the other referenced files (especially GridFlow-4, introduction to live video, which is the most interesting to me) appear to be nowhere in the distribution.

    Just hoping somebody might know about this... I'm not quite ready to join Yet Another Mailing List just for this issue.


    posted in extra~ read more
  • dewdrop_world

    Just discovered in pd-extended (from the [gate] help patch) that setting the open outlet by passing a number to the right-hand inlet also pops that number out the left outlet.

    So if I want to send data out one of two outlets and not pollute one of those outlets with the outlet index, I actually have to make a [gate 3] and never use outlet=1.

    This is (IMO) counterintuitive enough that's it's worth asking what is the rationale.

    No big deal, I'll just add the extra dummy outlet. Just curious.

    posted in technical issues read more
  • dewdrop_world

    E.g., open the help patch H05.filter.floyd.pd. Right click on the array -> properties -> array window -> "View list."

    can't read "0": no such variable
    can't read "0": no such variable
        while executing
    "array_viewlist .gfxstub13fd070 $0-array1 0"
        invoked from within
    ".gfxstub13fd070.listview invoke"
        ("uplevel" body line 1)
        invoked from within
    "uplevel #0 [list]"
        (procedure "tk::ButtonUp" line 23)
        invoked from within
    "tk::ButtonUp .gfxstub13fd070.listview"
        (command bound to event)
    I saw this in pd extended 0.41 under win7 and thought it was the usual M$ uncooperativeness. But I saw it again just now in 0.39 on my mac.
    It is a [i]real bother[/i] when trying to write an array of scale degrees for instance, when you want them to be integers but dragging the points gives you floats. Certainly there's a way to view/change the values [i]as numbers[/i] other than saving the patch and opening it in a text editor? (That won't go over too well with my student...)

    posted in technical issues read more
  • dewdrop_world

    New to pd, but not new to computer music or to programming (I've been using supercollider for many years). I'm looking at pd to get familiar with data flow programming in preparation for (potential, so far un-materialized) teaching jobs in the future -- don't care to spend $500+ for MSP when I don't see myself using it for production in the foreseeable future!

    I'm looking for an object that's basically a signal-rate integrator, where the next output sample value is the previous value + the input signal. Ideally it could reset to zero on receipt of a bang, but if that isn't possible, I can work around it using some snapshot magic. (Or, if it loops back to start when it reaches a certain output value, I can work with that too.)

    I searched the forum and found only this, but this is for purely control signals: http://puredata.hurleur.com/sujet-2402-bouncing-counter - I need it at audio rate for tabread4~.

    Sorry if this is too basic a question -- searching the help is a bit less than convenient.

    Thanks :)

    posted in technical issues read more

Internal error.

Oops! Looks like something went wrong!