Creating sound visualisation with animated 2d illustration

Hello all,
I am planning to make a relatively sophisticated visualisation of abstract sounds using a 2d animation that has to do realtime sound generation and waveform visualisation and also blending of various simple geometric shapes using BlendModes.
Target is a html5 since it needs to run as part of a website.
I have started using plain JavaScript and the Tone.JS library but as a fomer AS3 / Air developer I am getting a bit annoyed with this whole JS mess … :wink:
I also tried to use the phaser.io framework but then I thought maybe this could be a good way to start a Haxe/openFl project.
Is this something that can be done with openFL?
Is there a viable sound creation and analysis library for that?
The Illustration has been created in Illustrator ( see excerpt image )
Illu
and I was wondering if the blendModes of Illustrator can be replicated.

Thanks a lot

To generate sounds, this SampleDataEvent PR will need to be merged. I just tested it today, and it needs some tweaks, but it’s nearly there.

For analysis, it looks like OpenFL Does not yet implement SoundMixer.computeSpectrum(). However, you would have access to the raw sound data if you are generating it, so maybe that’s not necessary.

I’m not aware of any libraries that add capabilities that go beyond what OpenFL provides. If you find any libraries for Flash/AS3, it may be possible to port them to OpenFL/Haxe, though.

OpenFL implements a number of blends modes that are available in Flash, and should be similar to the blend modes Illustrator/Photoshop and other Adobe tools.

I don’t know if every blend mode is available. It may depend on which blend modes are supported by Canvas/WebGL in HTML5 (or Cairo/OpenGL for native targets).

Thanks Josh.
Unfortunately I would rely quite a lot on computeSpectrum for changing colours and shapes in sync with the audio.
I remember there was a sound library called standingwave ( GitHub - maxl0rd/standingwave3: Flash ActionScript3 dynamic audio library ) but that used alchemy as well. Not sure if porting would be so straightforward.

Hm. Seems that I am stuck with JS for now.

It is possible to make JS libraries available to Haxe/OpenFL (when targeting html5) by using what Haxe calls “externs”.

That should allow you to write most of your code in Haxe.

Thanks again Josh,
will look into this for sure.