Skip to content

Bonsai 2.3

Compare
Choose a tag to compare
@glopesdev glopesdev released this 25 Mar 19:19

The new Bonsai 2.3 release is finally out just in time for the Chinese New Year! This release has been overdue for many months now and I believe it completes a cycle of rounding up all major language and editor features we have been working on since last year. Existing workflows should update flawlessly, but workflows that are designed in Bonsai 2.3 will not run in Bonsai 2.2. Also, the editor will now display a notification for new updates, but you will need to go to the package manager to install them.

Most importantly, we have created a community feed so that any Bonsai user can now directly contribute and share examples and packages with all other users. We hope this will accelerate the dissemination of existing Bonsai applications and support most of the learning material that we will be publishing over the next few months (more details below).

Bonsai 2.3 also introduces the "Bonsai Gallery", a new concept for sharing Bonsai applications. The idea is you can take any workflow you have been working on and export it into a NuGet package automatically from the File -> Export -> To Gallery... menu. When you do this, Bonsai will figure out for you all the dependencies that are needed to get the workflow running, as well as any content (images, videos, sounds, etc) that are part of the application and will generate a Gallery package. Once this package is generated, you can install it in other computers or share it with other users, and Bonsai will take care of installing any missing dependencies on the new computer which may be required to run the package. Basically the workflow will become a plug-and-play Bonsai application that can self-install on any computer that can run the Bonsai editor.

On the same vein, we are expanding the set of available Bonsai examples to cover many missing areas, including computer graphics, tracking and other closed-loop interactive setups, GPU processing, generative sound, etc. Because of this, we would like to invite all of you to submit examples (or suggestions of examples) that you would like to see distributed with Bonsai. Think of any useful application you have already done (or seen being done) with Bonsai, or an idea for a new application that you would really like to see developed in Bonsai. This is your chance to see them implemented and they will become available in the Gallery for easy redistribution.

Another new code sharing concept introduced in Bonsai 2.3 are workflow "Snippets". You create a snippet by selecting a collection of nodes, right-clicking on them and choosing "Save Snippet As...". This will save the workflow snippet into the snippets folder with any name that you like. Once that is done, your snippet will be automatically loaded into the toolbox such that you can place it in other parts of the workflow where you need to perform similar operations, or even in entirely new workflows. Basically these snippets become reusable Bonsai code patterns.

Many other features and enhancements are listed below. In the following weeks I hope to post more announcements regarding new learning documentation and examples, so keep tuning in regularly. Also let us know if you are curious about any one particular enhancement by asking questions in the forums.

Release highlights

Updates to the editor

  • Support for high DPI displays.
  • Improvements to the visual layout algorithm: workflows should now in general look nicer, with less kinks and bends.
  • Export a workflow to several different bitmap formats in addition to SVG.
  • Support for exporting a workflow and related content as a self-contained redistributable package.
  • Support for exporting bits of workflow as "code snippets" which are then immediately searchable in the toolbox.
  • Added the new Bonsai Gallery to the Tools menu. Any published packages containing the tags "Bonsai" and "Gallery" will be listed.

Language updates

  • New observable-sharing operators: BehaviorSubject, AsyncSubject.
  • New reactive operators: DistinctBy, DistinctUntilChangedBy.
  • Generalized Zip and CombineLatest to support higher-order sequences.
  • Updated SelectMany to avoid automatically unrolling enumerable sequences.

Package updates

  • New and improved shader package with support for compute shaders and full-screen viewport effects.
  • Updated the shader resource and GLSL editor from modal to modeless so you can keep them open while doing other things.
  • New Audio modules: UpdateSource, UpdateListener for generating 3D positional sound.
  • New Dsp modules: Shift, BitBuffer.
  • New Vision packages: HoughCircles, HoughLines, SparseOpticalFlow, Centroid.
  • Dsp updates: Rescale now supports clamping of output values.
  • Vision updates: GoodFeaturesToTrack now supports specifying a region of interest in which to search for features.
  • Many bug-fixes and performance improvements.