PION Logo

PION

? What is PION?

PION is an acronym for Plug-In Over Network. It is a paradigm for creating cross-platform plug-ins.

Most audio, video, and image editing software support adding additional features and effects by using plug-ins. Usually these plug-ins need to be redeveloped for a specific platform such as Windows, Mac, Linux, Android, or iOS. Mobile platforms have many restrictions and technical challenges making traditional plug-ins impossible or needlessly complicated to develop. The PION paradigm is a way to develop plug-ins that can be used on every platform, are simple to make, have little administrative overhead, and can approach native performance.

How does it work?

Plug-ins are developed using the latest web technology (primarily HTML and JavaScript or Web Assembly) and are hosted in a web browser. The host app interacts with the plug-in through the local network. Here are the steps for hosting a plug-in:
  1. The host app creates an embedded web browser or web view (an external browser could be used as well).
  2. The host app creates a simple TCP server on 127.0.0.1 or ::1 (localhost) on an available port.
  3. The host app directs the web view to navigate to the plug-in's URL, appending the port number as a parameter (if not the default port), such as: https://domain.com/plugin.html?port=7065
  4. The plug-in opens a WebSocket to 127.0.0.1 or ::1 (localhost) on the port provided (or the default port).
  5. The host and plug-in communicate through this connection to exchange information through JSON or raw data.

Ideally standard protocols would be defined for audio, video, and image processing. Multiple plug-ins could be hosted in multiple webviews or HTML iframe elements on different ports.

+ What are the advantages?

PION has many advantages over traditional plug-in development:

- What are the disadvantages?

! Where can I see it in action?

PION is in supported in the GoldWave Audio Editor. Use Options | Plug-in | Effect | Plug-in Over Network to add plug-ins. Copy and paste the following links to add PION effects to GoldWave (click to copy).
  • https://goldwave.com/pion/echo.html
  • https://goldwave.com/pion/mix.html
  • https://goldwave.com/pion/scan.html

Get Started!

Follow these steps to get started:
  1. Download the pion.js code, which is the core API of all audio effects.
  2. Create a new effect.html file or start with one of the example files and change it as needed.
  3. Create an EffectData structure and fill in the details for your effect. Check out the examples for details.
  4. Make an onload function that sets up the PION connection and sets the callbacks (OnConnect, OnClose, OnError, OnCommand, and OnData).
  5. The OnCommand callback sets, gets, or resets effect parameters.
  6. The OnData callback processes the audio data for the effect.

Plug-in Over Network, PION, PIONAPI and PION logo are trademarks of GoldWave Inc.

Facebook Instagram
Copyright © 2024 GoldWave® Inc.