Skip to content
Pre-release

@neilcsmith-net neilcsmith-net released this Jul 30, 2020 · 1 commit to version5 since this release

This is the first beta release of PraxisCORE and PraxisLIVE v5. Windows and macOS bundles, as well as a zip bundle, are below. Linux users should use the zip bundle for now - alternative packaging for Linux to replace the previous .deb install is underway. Linux users may try the new AppImage based packaging, which also includes an embedded JDK from AdoptOpenJDK, or use the zip bundle that uses the system installed JDK. Simply make the AppImage executable and run it.

v5 is a major rewrite of both the core runtime and the IDE. Much legacy and deprecated functionality has been removed. All of PraxisCORE has now been rewritten around the new base actor system introduced in parallel in 4.4.0. PraxisCORE is now built on top of the Java module system, rather than the Apache NetBeans platform (the PraxisLIVE IDE is still based on Apache NetBeans). The build for PraxisCORE has been moved to Maven, and individual modules will be deployed to central for re-use in other projects.

Both PraxisLIVE and PraxisCORE require at least Java 11 - an open-source Java 11 JDK from AdoptOpenJDK is included in the binary packages.

PraxisLIVE nows supports running multiple projects at once. Distributed hub support has moved from the IDE into PraxisCORE, and is configured separately for each project. The default project configuration will run audio and video roots in separate Java processes.

The PraxisCORE runtime is included in the praxiscore folder inside the IDE. It can be copied out and run from the CLI for networking or project running, or embedded inside a project to make it standalone.

Video support is now based on libp5x, a modularised fork of Processing that uses LWJGL for OpenGL rendering.

Audio support is now based around JAudioLibs Pipes v2, which is also available as a standalone library including all the unit generators available in PraxisCORE. (Pipes Graph replicates much of the built-in functionality of the PraxisCORE audio code).

Known Issues

  • OpenGL window sometimes doesn't close on macOS when root is stopped. The old window is correctly closed and a new one created if started again. And the window is closed when stopping / cleaning the project.
  • On Windows, child processes of projects are sometimes not shutdown correctly when the project is stopped / cleaned.

Please report any problems at https://github.com/praxis-live/support/issues

Assets 6

@neilcsmith-net neilcsmith-net released this Aug 29, 2019

PraxisLIVE v4.4.0 primarily involves under-the-hood changes as we gear up towards PraxisLIVE v5. It also brings some helpful UI improvements and a major change in how containers work.

The bundled JDK in the default installers is still Java 8, although there is an experimental Windows installer with Java 11. There is no macOS bundle with JDK 11 yet due to Processing crashes found in testing. It is possible to use the Zip bundle with a JDK of choice for experimentation.

NB. Use of PraxisLIVE / praxislive without the space is now consistent, and reflected in installation folders and binary names. This should only affect you if you have custom shortcuts to the IDE.

Changes

PraxisCORE runtime

  • Core
    • New base module providing simpler and more robust base root class and other utility classes. The new root implementation is currently used by generic data patches root:data and internal services. These changes will allow for removal and replacement of a lot of remaining legacy v1 code in v5.
    • The container component (core:container) now allows for exposing ports of any child component via its ports property (see IDE improvements below too). This is a map of IDs to relative port addresses. All specific input / output components (eg. audio:container:in) are now deprecated.
      • Known issue - removing a mapped port will disconnect all connections to the port, including those inside the container (the API is missing the ability to find only outside connections at present).
      • Known issue - deleting a container will sometimes leave child components connected. Always delete connections first. Workaround is to save and reload.
    • Added tell(ControlAddress to, ... msg) and tellIn(double seconds, ControlAddress to, msg) for sending messages to other components, and self() and self(String controlID) for getting own address. core:routing:send is now a re-codeable component.
    • Added @Config.Preferred annotation, mirroring Java's BeanInfo terminology for properties that are particularly important to display to "humans". See Graph Editor improvements for one usage. Added this annotation to value of core:variable component.
    • Tidy up and simplify core API. All Value types now use of() for wrapping a native Java type, parse for converting from text, etc. Call has shorter and simpler creation methods, and uses List<Value> for arguments. Many other methods are replaced, with older versions deprecated for removal in v5.
    • Catch errors rather than just exceptions during code context creation. Ensure that amongst other things, an UnsatisfiedLinkError won't take down the component factory service.
    • Functions in the code API that map through to Processing's PApplet have been deprecated. As part of the modularity effort for v5, only video modules will be able to require the Processing module. These can be accessed directly on the PApplet instance (and in v5 by static importing those functions) when it is known Processing is available.
    • Provided new Info builder class for creating ComponentInfo - currently of minimal end-user use until code components allow for info to be customized.
  • Video
    • video:code:p3d - added mappings for all supported Processing hint() values.
    • Deprecated video:gl:send and video:gl:receive - built-in support for Syphon and Spout. In v5 these can be better supported by adding libraries to projects. Prior to that, switch on display of deprecated components in the palette under Options/General/Components.
    • FIX video:code:p3d - now correctly resets hints and sphere detail on code change, which is not handled by the default settings in Processing. Only a problem since v4.3 started reusing the PGraphics3D.

PraxisLIVE IDE

  • Core
    • New table based property editors for array and map based properties. TAB will add new rows automatically, DELETE will remove a row. Copy & paste is supported.
    • Updated base IDE to Apache NetBeans 11.1.
  • Graph editor
    • Added support for showing properties on graph nodes next to related port. Default shows only "preferred" (see above) properties, but options (scene popup) provided to show/hide all. Double-click the value to edit directly. Showing all properties is good for debugging, but adds a little overhead due to syncing and rendering required. To remove or rename a mapping, use the map editor on the ports property.
    • Inside a container, a new popup menu option on ports allows adding the port to the container with an ID of choice.
    • ESC can now be used to go up from a container.
  • Code editor
    • Experimental inline hints from NetBeans 11.1 to show parameter names in method calls. Still some quirks and off by default - enable in the View menu.
Assets 7

@neilcsmith-net neilcsmith-net released this May 23, 2019 · 12 commits to master since this release

PraxisLIVE v4.3.0 brings optional support for running on and coding with Java 11, and the IDE platform is updated to Apache NetBeans 11.0. There are also some improvements for working with OpenGL, and some usability enhancements to the IDE.

The bundled JDK in the default installers is still Java 8, although there is an experimental Windows installer with Java 11. There is no macOS bundle with JDK 11 yet due to Processing crashes found in testing. It is possible to use the Zip bundle with a JDK of choice for experimentation.

NB. Use of PraxisLIVE / praxislive without the space is now consistent, and reflected in installation folders and binary names. This should only affect you if you have custom shortcuts to the IDE.

Changes

PraxisCORE runtime

  • Core
    • Added support for running on and (optionally) coding with Java 11 and above.
  • Video
    • Provided .smooth property in video root to allow Processing's smoothing to be switched off for performance improvements or select needs (eg. fixed pixel rendering).
    • video:code:p3d now keeps existing underlying PGraphics on code changes for performance (small possibility of rendering regressions)
    • Added support for point and line shaders.
    • Added find() to PShader and PShape so that underlying Processing types can be extracted. eg. shader.find(processing.opengl.PShader.class)

PraxisLIVE IDE

  • Core
    • Updated underlying IDE platform to Apache NetBeans 11.0, which also brings support for running on Java 11+.
    • Added support for building projects using Java 11+. Right-click on a project, select Properties and set the Java version. Can only be done before the project is built (restart the hub, set and build again).
    • Added Browse in System action on folders in projects and in File Manager to open folders in system file browser for easier media management, etc.
  • Graph editor
    • Open code editor rather than property editor by holding down SHIFT while double-clicking / pressing ENTER on a component.
    • Duplicate selected component(s) using menu item or CTRL-D/CMD-D. Equivalent to copy & paste but without having to wait for sync to complete manually.
    • FIX exporting component(s) without adding to palette now works correctly.
    • FIX keyboard actions select lists forcing output text to lower case.
  • Code editor
    • Added import groups to editor so that (most) automatic imports sort after default imports and don't fail due to guarded section.
    • Auto-formatting the code (CTRL-SHIFT-F) no longer forces newlines between annotations.
  • Build infrastructure
    • Updated build system to download NetBeans platform so that both PraxisLIVE and PraxisCORE can be built easily outside of the NetBeans IDE.
    • Added support for building the Windows and macOS distributions into the build script.
Assets 7
  • v4.2.0
  • 54b590d
  • Compare
    Choose a tag to compare
    Search for a tag
  • v4.2.0
  • 54b590d
  • Compare
    Choose a tag to compare
    Search for a tag

@neilcsmith-net neilcsmith-net released this Apr 4, 2019 · 33 commits to master since this release

PraxisLIVE v4.2.0 provides updates to the Processing, GStreamer binding, Tinkerforge and JNA libraries, as well as providing a few additional features.

Changes

PraxisCORE runtime

  • Core
    • Updated JNA library to v5.2.0
    • Added mapTo() to Linkable.Int and Linkable.Double` to allow conversion to objects
  • Tinkerforge
    • Updated Tinkerforge bindings library to v2.1.22
  • Video
    • Updated Processing library to v3.5.3, along with revised JOGL version (fixes OpenGL on some graphics cards, but with the potential for regression - please report an issue if affected).
    • Added new Processing square() and circle() method mappings in video:gl:p2d and video:gl:p3d, as well as equivalents in video:custom. (The new push() and pop() are not currently mapped as pushing and popping styles requires work to not break PraxisCORE's sharing of surfaces).
    • Updated GStreamer bindings library to gst1-java-core v1.0-beta2 (the bindings are maintained by PraxisLIVE, and a lot of work to stabilise and improve them has been sponsored over the last month).
    • Revised video:capture to use a top-level GStreamer pipeline rather than a bin when creating custom capture sources - fixes issues with using elements with dynamic pads like decodebin in custom sources.
    • Fix video:capture and video:player keeping a copy of the last frame when sources change - often see a quick flash of old content.

PraxisLIVE IDE

  • Graph editor
    • Automatically select and focus newly added or pasted components.
    • Improve keyboard actions for controls (.) and connections (~ and !) by automatically applying component field if selection exists, as well as preferring items that start with the provided text in the select lists.
Assets 6
  • v4.1.1
  • 1417a62
  • Compare
    Choose a tag to compare
    Search for a tag
  • v4.1.1
  • 1417a62
  • Compare
    Choose a tag to compare
    Search for a tag

@neilcsmith-net neilcsmith-net released this Oct 18, 2018 · 36 commits to master since this release

Bug fix release of PraxisLIVE v4.1 - see https://github.com/praxis-live/praxis-live/releases/tag/v4.1.0 for full changes

Fixes

PraxisLIVE IDE

  • IDE
    • Fix import action not showing on resources folder in projects.

PraxisCORE runtime

  • Core
    • Fix issues with clear and accumulate in new Data Pipe API - not behaving correctly with clear functions returning new objects, or accumulate where the source packet was in the list being accumulated (graph recursion).
Assets 7
  • v4.1.0
  • c4fc662
  • Compare
    Choose a tag to compare
    Search for a tag
  • v4.1.0
  • c4fc662
  • Compare
    Choose a tag to compare
    Search for a tag

@neilcsmith-net neilcsmith-net released this Aug 24, 2018 · 39 commits to master since this release

PraxisLIVE v4.1 brings some useful new usability features to the IDE, and extends PraxisCORE with some features that weren't ready in time for v4.0. In particular, the Data Pipes API is a generic form of the mechanism by which audio and video buffers are passed through the graph, and will allow for extensions such as efficient geometry manipulation, data analysis and code sharing. There's also a range of bug fixes in both PraxisCORE and PraxisLIVE.

Changes

PraxisLIVE IDE

  • IDE
    • Automatically open and close project files when building projects and restarting the hub.
    • New wizard for exporting custom component (.pxg) files, with option to also add to palette (resource and library options to follow)
    • Reset code menu action now defaults to the last saved / imported code, with option for component default.
    • Automatically show a drop down of suggested values for integer properties with a range up to 16.
    • Templates for new patch files no longer shown in the Resources subfolder.
    • Hide .git folder and other files that shouldn't be visible from project file view.
    • FIX various fontsize issues, including hidden buttons on start page and table row height.
    • FIX shutdown save issue with exit menu item due to action being called off EDT.
    • FIX added StartupWMClass in .deb to stop multiple dock icons appearing on Ubuntu 18.04 (in second deb build)
  • Graph editor
    • Port category shown in port tooltip if present (currently only applies to data ports).
    • Copy and paste options added to popup menu.
    • Unused colour options menu removed (until custom graph colours return).

PraxisCORE runtime

  • Core
    • Added ability to load a String property from a file using the Type.Resource annotation - use eg. @P(1) @Type.Resource String text; Like all resources, this is background loaded - use @OnChange() and @OnError() to run a method when updated, etc.
    • Added Data Pipes API (see below)
    • Added Struct type for wrapping multiple DataObject or arrays in a single DataObject (see below).
    • Added asyncCompute() to Ref, for arbitrary background computation.
    • Added bind to Ref for automatically managing listeners, etc. eg. thingRef.bind(Thing::addListener, Thing::removeListener, e -> something()); will automatically add / remove the lambda listening on (fictional) type Thing.
    • Added suggested values to Type.Integer annotation.
    • Update PBytes collector to write object without caching - streams using a single DataObject won't break.
    • FIX Ref init() calling Supplier and replacing object too eagerly.
    • FIX ensure flush is called on inputs and triggers - errors not always logged.
    • FIX ensure links are cleared on Input types when reset.
  • MIDI
    • List available MIDI devices as suggested values.

Data Pipes API

The new Data Pipes API allows for passing arbitrary types around the node graph. It works similarly to the existing support for audio and video buffers, and is similar to programming with the existing audio API. Ports are typed using generics, and only ports of the same type may be connected together. The type shows as the port category in the UI.

Unlike control messages, but like audio and video, data is pulled through the graph from a sink. The Data.Sink type cab be provided with functions for controlling what happens when multiple connections are made to ports. You must pass an object representing the data to the sink process method - the returned object may be the same or different depending on how you configure the processing graph.

eg. to provide a list of PVector geometry to draw (NB. you can cache a list of geometry, but remember that if you change the PVectors inside it, you'll have to reset them - they are not copied by default!)

Component 1 (core:custom)

@Out(1) Data.Out<List<PVector>> out;

public void init() {
    Data.link(
        Data.supply(this::geometry),
        out
    );
}

List<PVector> geometry() {
    // generate geom
    return list;
}

Component 2 (video:gl:p3d)

@AuxIn(1) Data.In<List<PVector>> geom;

@Inject Data.Sink<List<PVector>> sink;

public void setup() {
    Data.link(in, sink.input());
}

public void draw() {
    // passing empty list means we'll do nothing if not connected to previous component
    for (PVector v : sink.process(Collections.emptyList()) {
        // do something with v
    }
}

In a similar way you can share code from components by passing interfaces, in particular the Java 8 functional types.

Struct API

Struct is an extension of DataObject that can wrap other data objects or primitive arrays and handles reading / writing as a single entity, for use in particular with PBytes streams. eg.

static class ColouredPoint extends Struct {
    PVector position = register(new PVector());
    PVector color = register(new PVector(255,100,0));
}
Assets 7
  • v4.0.0
  • 7da8161
  • Compare
    Choose a tag to compare
    Search for a tag
  • v4.0.0
  • 7da8161
  • Compare
    Choose a tag to compare
    Search for a tag

@neilcsmith-net neilcsmith-net released this May 14, 2018 · 54 commits to master since this release

A major focus for v4 is relicensing the Praxis CORE runtime as LGPL. There will be better support for building standalone projects from the IDE. And there will also be a focus on the use of Praxis CORE as a general purpose Java runtime / library in other fields that can benefit from distributed real-time coding / hot code reloading.

Of course, Praxis LIVE's primary use for interactive / live creative coding hasn't been neglected in this release! There are a range of new features, a revised patching UI and a big push to remove legacy code and add features to allow remaining legacy components to be re-codeable.

In development of this release, the project has been restructured and much legacy code removed. Projects from v3 that were not making use of deprecated features or components should still work, although you may see warnings / errors on first build. File an issue if you have difficulties.

Windows and macOS downloads now include OpenJDK 8. This is currently Azul's Zulu build.

Changes

Praxis LIVE IDE

  • Core
    • New start page with modular sections.
      • Option to download and install examples as project templates, with update check.
      • Option to download and install custom components into the palette, with update check.
      • Check for GStreamer libraries and download link.
    • Tweaked UI (this is the first major Praxis LIVE version not to change look and feel!) with added space between elements. The default font size has been increased (14pt) - this can be changed by running Praxis LIVE with eg. --fontsize 12, either from the command line or by editing the configuration file.
    • Semantic version checking. Update checking is now based on semantic versioning. Version is written into project files and custom components, and a warning issued if running on a lower version. CLI usage outputs version - full version validation for distributed hubs coming.
    • New root wizard changed with fewer options and different templates for audio (output added automatically) and video (OpenGL, always on top, output added). User defined templates to follow.
    • Fake properties for input port controls (see CORE change) - easily send eg. note to synth from property tab / component editor.
    • Default user directory updated to .praxislive4 (CORE now has a different default user directory - .praxiscore4)
  • Graph editor
    • New graph UI with colour-coded types and bezier connections, and responsive to font size.

Praxis CORE runtime

  • Core
    • Praxis CORE is relicensed under the LGPL.
    • Embedded runtime compiler removed - the runtime no longer includes a fork of the Java compiler and relies on the compiler provided by the JDK (a JDK is now a runtime requirement, but will be included in the Windows and Mac bundles)
    • Code templating revised - built-in components are now pre-compiled (easier development and testing; faster project builds) but still re-codeable - source templates are built using an annotation processor.
    • Input ports now also have a control - eg. you can now send messages to an input port from MIDI, OSC, another patch or the IDE directly.
    • New timing API introduced, which will eventually allow hubs to run from alternative clock sources (eg. soundcard).
    • Use of setup() in non-video components has been deprecated in favour of init() - this is for consistency to avoid the confusion with setup() being called later in video components (also see video improvements)
    • The Argument type has been replaced by Value and it or any subtype can now be used for input methods and property fields. Optional<> may also be used for types that do not have a default empty representation (eg. Optional<ControlAddress>)
    • Default imports for custom components have been updated to include java.util.stream.* and java.util.function.*, as well as org.praxislive.core.* - some types that were deprecated due to name clashes (eg. @Port) have been removed.
    • All code has been refactored under org.praxislive, and various classes and modules restructured (eg. to separate legacy components and Swing dependencies) - this should only be a breaking change for projects if you have imported internal types into your custom components.
    • FIX - projects without additional libraries created in v3.4+ should run correctly with the command line player / standalone.
  • Audio
    • New audio:looper component for live sampling.
    • New Looper UGen based on Player with multi-channel record capability.
    • New Phasor UGen - similar to sawtooth LFO but with controllable min / max values.
    • The simple atan-based overdrive UGen has been rewritten not to use GPL code. It might sound a little different.
  • Video
    • video:composite and video:x-fader are now completely rewritten and re-codeable.
    • New API to add render and alpha queries to video input ports (required for above, but usable elsewhere)
    • GStreamer support completely rewritten. video:player and video:capture are now fully re-codeable. The video player has additional functionality, included an end-of-stream signal and zoom. The capture component now defaults to the automatic video source (confusing for new users).
    • New VideoPlayer and VideoCapture types can be used in video:custom components - see code of above for example usage (making these components copy the Processing Video API and extend PImage was considered but rejected for performance reasons).
    • All video components now also support init() and update() methods. They are called prior to the rendering cycle - you cannot draw anything and input images will not have been updated.
    • Processing and JOGL libraries updated to 3.3.7.
    • GStreamer and JNA libraries updated.
    • FIX default MacOS capture pipeline no longer worked.
Assets 6
Pre-release

@neilcsmith-net neilcsmith-net released this Apr 13, 2018 · 56 commits to develop since this release

This is a release candidate for Praxis LIVE v4.0.0 (see release notes below) - there is no installer -

  • Download and unzip file
  • Run bin/praxis_live (Linux / OSX) or bin/praxis_live64.exe (Windows 64) or bin\praxis_live.exe (Windows 32).

Praxis CORE no longer contains its own fork of the Java compiler. You need a full Java 8 JDK to run with. Java 9 and 10 are not currently supported. The full release installers for Windows and Mac will include OpenJDK. For now, try eg. https://www.azul.com/downloads/zulu/ and make sure to choose the installer for the latest version of Java 8.

Please report any issues at https://github.com/praxis-live/support/issues

Assets 3
  • v3.5.0
  • c9f7d1a
  • Compare
    Choose a tag to compare
    Search for a tag
  • v3.5.0
  • c9f7d1a
  • Compare
    Choose a tag to compare
    Search for a tag

@neilcsmith-net neilcsmith-net released this Jan 24, 2018 · 101 commits to master since this release

This release makes preparations for v4 development, introduces much improved support for offscreen surfaces in video pipelines, adds access to underlying Processing images/graphics, and fixes some bugs.

This is the last planned release in the v3.x series - bug fixes will be backported.

Changes

Runtime

  • Core
    • Deprecated @Port and replaced with @Config.Port - former will be removed in v4 because of name collision.
    • Improve feedback if Error thrown (rather than Exception) as can happen with the library support added in v3.4
  • Audio
    • Deprecated Table and replaced with AudioTable - former will be removed in v4 because of name collision.
  • Video
    • Improved support for @OffScreen PGraphics in video:custom. Added support for scaleWidth and scaleHeight properties (1.0 is default and same as output), as well as persistent to control whether the surface can be released after drawing each frame (default true to keep content).
    • Added support for @OffScreen in video:gl:p2d and video:gl:p3d. Adds ability for multi-pass shader FX amongst other things - some additional components using this to follow. NB. the field types are PGraphics2D and PGraphics3D respectively. There is not currently support for 3D graphics in 2D components, or vice versa - this is planned.
    • Added find() method in video:gl:p2d and video:gl:p3d, as well as related PImage and PGraphics2D/3D to get access to underlying Processing types for use with libraries, etc. For example -
    @In(1) PImage in;
    @OffScreen(scaleWidth = 0.5, scaleHeight = 0.5, persistent = false) PGraphics2D scratch;
    ...
    find(processing.core.PGraphics.class).get();
    in.find(processing.core.PImage.class).ifPresent(img -> { // do something with image } );
    scratch.find(processing.core.PGraphics.class).get();
    • Updated Syphon libraries to support use with standard OpenGL Core Profile (no longer required to set renderer to legacy OpenGL 2)
    • FIX major issue introduced in 3.4 where code couldn't be edited / new components couldn't be added if a video root had been restarted.

IDE

  • Core
    • Added an action in the Help menu to open Core JavaDoc in the browser. NB. All codeable components have access to the methods defined in DefaultCodeDelegate. For specific additional functionality see -
      • core:custom : CoreCodeDelegate
      • audio:custom : AudioCodeDelegate
      • video:custom : VideoCodeDelegate
      • video:gl:p2d : P2DCodeDelegate
      • video:gl:p3d : P3DCodeDelegate
      • tinkerforge:custom : TFCodeDelegate
    • Add/remove multiple libraries at a time.
  • Code editor
    • Added code templates to ease creation of annotations - type the shorthand then TAB - use ENTER to move through the different values. eg.
      • ptnd
      @P(...)
      @Type.Number(min = ..., max = ..., def = ...)
      double ...
      • ptnp
      @P(...)
      @Type.Number(min = ..., max = ..., def = ...)
      Property ...
Assets 6
  • v3.4.0
  • 289e328
  • Compare
    Choose a tag to compare
    Search for a tag
  • v3.4.0
  • 289e328
  • Compare
    Choose a tag to compare
    Search for a tag

@neilcsmith-net neilcsmith-net released this Dec 21, 2017 · 107 commits to master since this release

This release brings support for adding third-party libraries to projects as well as a range of bug fixes.

Changes

Runtime

  • Core
    • Added support for using additional Java libraries (JAR files) in projects.
    • Added Ref<T> type for managing references to any object across code changes.
    • Added Optional<T> find(Class<T> type) method for searching component lookups for useful objects (eg. PApplet)
    • Added JavaDoc to core user-code API.
    • Added possibility to extend script commands from other modules, added glob wildcard support to file-list PCL script command, and added ls, pwd, cd and add-libs commands.
    • Fix core:routing:delay and possibly other components broken by switch to Value in previous release.
  • Audio
    • Fix loading of 32-bit float audio files.
  • Video
    • Added renderer specific lookup, and merge into video root lookup; added PApplet to lookup when OpenGL renderer in use.
    • Updated JOGL library to version used in Processing 3.3.6 to fix Raspbian rendering issues.
    • Better error protection in case of Exceptions thrown by renderer - video window should no longer be left open and the video patch should still be controllable.
  • TinkerForge
    • Updated TinkerForge library too v2.1.16 for new bricklet support.

IDE

  • Core
    • Added simple UI for managing third-party libraries in project properties.
  • Code editor
    • Added Core JavaDoc to build process. Documentation now shows up in code completion, and Show JavaDoc action (right-click on type/method) now functions.

Additional libraries

To add a *.jar file to a project, open the project properties window (right-click on main project folder). Select files to import - files will be copied into the hidden config folder, and available in the classpath. Libraries can only be removed if the project isn't active.

Ref / find()

Ref<T> is a safe way to manage references across code changes. The reference must be initialized before use. Handlers can be added for onReset() and onDispose() - the former will be called every code change, the latter when the root is stopped or the reference deleted. If the referred object is AutoCloseable it will be closed automatically on disposal.

Use eg.

@Inject Ref<List<String>> strings;

public void setup() {
    strings.init(ArrayList::new);
    strings.apply(l -> {
        if (l.isEmpty()) {
            l.add("A String");
        }
    });
    List<String> lst = strings.get(); // same list across code changes
}

find() can be used to lookup useful classes, such as PApplet.

eg. mixing Ref and find() inside a core:custom (not a video custom component) we can get direct access to the PApplet.

import processing.core.PApplet;

                 
@Inject Ref<PApplet> p5;
    

public void setup() {
    p5.init(() -> find(PApplet.class).orElse(null));
    p5.ifPresent(a -> a.registerMethod("draw", this));
    p5.onReset(a -> a.unregisterMethod("draw", this));
}

public void draw() {
    p5.ifPresent(p -> {
        p.resetMatrix(); 
        p.noStroke();
        p.fill(255,100,0,150);
        p.rect(0,0,p.width,80);
        p.fill(255);
        p.textSize(36);
        p.text("TESTING", 20, 50);
    });
}
Assets 6
You can’t perform that action at this time.