• jancsika

    Yes, [tabwrite~] can pause writing, but then how does it wrap around if you don't pause before the end? AFAICS there is no reliable way to make it do that.

    I'm still not sure what you're after:

    1. write $tabsize samples to an array starting at $offset and wrapping around the end as necessary (could probably be done by adding a second arg to the start method of tabwrite~)
    2. write $arbitrary number of samples to an array starting at $offset and wrapping around the end as necessary (similar to above)
    3. continuously write blocks to an array, incrementing the offset of the next block and wrapping around the end when necessary (probably need a different class for this)

    posted in technical issues read more
  • jancsika

    Boy, I'd really like to go ahead and do #3 above as well. Yes it makes the SVG obnoxiously large, but I think the benefit of controlling the font outweighs that cost. (And it appears optimizers can still get the file size back down to normal if needed.)

    posted in technical issues read more
  • jancsika

    ... in the meantime you can add styling to your SVG by adding this right below the opening <svg> tag:

    <style type="text/css"><![CDATA[
    svg {
        font-family: "DejaVu Sans Mono";
    }
    
    .cord.signal {
        stroke-width: 2;
        stroke: #808095;
    }
    
    .cord.control {
        stroke-width: 1;
        stroke: #565;
    }
    
    .msg .border {
        stroke: #ccc;
        fill: #f8f8f6;
    }
    
    .obj .border {
        fill: #f6f8f8;
        stroke: #ccc;
    }
    ]]></style>
    
    

    You'll just have to fish through the rest of the css stylesheet for other styles, but you get the idea...

    posted in technical issues read more
  • jancsika

    @sdaau_ml Yeah, there are a few options here:

    1. Quick-and-dirty: I can go ahead set svg presentation attributes for object background and line stroke color to sane defaults. That way when you copy the outerhtml you'll get a readable patch in the default style (but no possibility to style the exported SVG according to the GUI presets). Those attys get overridden by CSS props so that should work with the current styling system.
    2. I can insert the CSS stylesheet as CDATA in the svg. That adds about 10k to the file size, probably less if the SVG is optimized/minified. This way the current style can be applied, minus editmode grid/background image.
    3. I can embed dejavu font in the SVG. That adds 337k to every exported SVG, but it's the only way to guarantee that the font is correctly chosen. It can probably be minified somehow but I'm not sure how to do that.

    Probably #2 is the best way to start.

    posted in technical issues read more
  • jancsika

    Oops, I forgot about the CSS styling and fonts. Let me investigate.

    posted in technical issues read more
  • jancsika

    Hm, this should be super simple to implement.

    In the meantime, you should be able to choose "Help" -> "Open DevTools", click the Elements tab, then right-click the svg element and choose "Copy Outer HTML"

    Then paste it into an editor and save it with ".svg" at the end.

    posted in technical issues read more
  • jancsika

    Hi all,

    Purr Data 2.17.0 has been released.

    This includes some commits from GSoC applicants Gabriela Bittencourt
    and Rukshan Senanayaka. Note also that though we're not yet versioning
    the web app, it has also benefited from a large number of commits from
    GSoC applicants: Prakhar Agarwal, Sanket Bhukan, Akash Negi, and
    Gunjan Yadu. Thanks to all for your contributions.

    ChangeLog:

    • incremental search in the help browser (Gabriela Bittencourt)
    • new declare -zoom option, useful for teaching (AG)
    • pddplink now accepts a symbol on its 1st inlet, loses its superfluous outlet (AG)
    • major cleanup of the GUI presets, especially the dark ones work much better now (JW)
    • styling the svg background "lock" image to match the chosen preset style (Rukshan Senanayaka)
    • arm64 support for the OBS Debian/Ubuntu builds (AG)

    posted in news read more
  • jancsika

    The closer PD's user experience gets to Max the more people will expect it to be Max and complain about it not being Max.

    That doesn't tend to happen. E.g., [expr] has been a core Pd Vanilla object for some time. It interprets its args as Max-style ints/floats, but (quite rightly) nobody requests adding the int/float difference to the core.

    Also, Pd-l2ork and Purr Data have opportunistically pulled improvements from Max when backward compatible. I don't think I've had any complaints about it being insufficiently Max-like.

    I did have a user request the strange Max feature of hiding all wires and xlets. But they didn't even complain when I implemented it as GUI preset named "footgun." :)

    posted in technical issues read more
  • jancsika

    @ingox It makes me think of the various ways flags are used for commands on the command line in Gnu/Linux. It would be neat if someone did research to actually measure how much time is wasted with figuring which commands have flags that can be combined, which commands use subcommands instead of flags, which mix the two, which use double flags for full words, which don't, etc.

    E.g., "git checkout -b". That bothers me so much.

    posted in technical issues read more
  • jancsika

    @ingox That's just playing musical chairs for Pd's unnecessary inconsistencies. For example, [pipe] has essentially the same interface as [pack] with a trailing float argument to set the delay. But [pipe] does not convert arbitrary messages to lists.

    posted in technical issues read more
  • jancsika

    Hehe-- I guess technically [pack] converts arbitrary methods into "[null] 1 2 3" internally. But immediately calls its own list handler, so I guess it's moot (unless or until someone unwittingly tries to do something with the selector in the implementation and forgets to check for NULL).

    posted in technical issues read more
  • jancsika

    especially since IIRC Max's [pack] object does use "set x" messages this way

    That's a good reason to look into adding a "set" method to Pd's [pack].

    looks at code for Pd's [pack]

    Oh, wow-- I didn't realize that it already has an "anything" method. This means that arbitrary methods will get converted to a list which then gets resent to the object as a list.

    So if you have [hello 1 2 3(---[pack s f f f], the anything method handler converts the "hello" method to "list hello 1 2 3" and resends it so that the list gets distributed among the inlets.

    Lots of great details here:

    • inconsistency with [select] and many other core objects which don't autoconvert like this
    • requires allocating and freeing heap memory on every call to the anything method
    • makes it impossible to ever implement the set method without breaking backward compatibility

    Anyhow, if you'll tell me your desired line to add to the Purr Data docs about the lack of "set", I'll add it.

    While I could also add a check and a warning for "set" messages being sent to [pack], that risks being noisy to users who-- possibly through the use of a nested abstraction library they didn't create-- are relying on the current behavior.

    posted in technical issues read more
  • jancsika

    But this simple symbol concatenation is a bit missing in pd.

    One reason to be a bit cautious about adding it atm is that there is an internal limitation imposed on the length of symbols in lots of places throughout the source code.

    And that limitation is helpful-- even the process of creating a symbol in Pd requires stepping through each character of the string itself.

    So if someone created a beautiful text processing library that worked on Pd symbols, you'd hit all these weirdo problems with performance. Even printing stuff to the Pd Window to debug would be problematic because the symbols would be truncated to 1000 characters.

    posted in technical issues read more
  • jancsika

    For each element of the list, you can do [$1$2( where $1 is the previous output (or empty symbol at the beginning), and $2 is the next element of the list.

    Not as fast as doing it with an external, but if you know your upper bound for your list size you can measure the worst-case and it may perform well enough for your use-case.

    Someone can probably do an example patch of this.

    posted in technical issues read more
  • jancsika

    Hi all,

    Purr Data is participating again as an organization in Google Summer of Code. Anyone interested in applying is welcome-- visit the Google Summer of Code page for more info:

    https://summerofcode.withgoogle.com/

    And our Purr Data page there:

    https://summerofcode.withgoogle.com/organizations/6001000428601344/

    We also have a project ideas page here:

    https://git.purrdata.net/jwilkes/summer-of-code-ideas-list

    I just added the idea of building a General Midi synthesizer using only Pd Vanilla abstractions. :)

    posted in news read more
  • jancsika

    Report: Demo goblins ate my demo!

    Luckily, I always plan for demo goblins so the talk went on alright.

    posted in patch~ read more
  • jancsika

    Ok, I see it. Purr Data's search function didn't find it, which is unfortunate.

    posted in patch~ read more
  • jancsika

    @whale-av What is 51_string~.pd? I don't see that in the PMPD docs.

    posted in patch~ read more
  • jancsika

    Oops, forgot Matt's abstraction:

    glock~.pd

    posted in patch~ read more
Internal error.

Oops! Looks like something went wrong!