Monday, 2 April 2018

Wothke backend scriptplayer VU meter addon using CODEF

As recently I have been making CODEF versions of the myriad of mod and chiptune players which Juergen Wothke has been creating in Javascript, I decided to make a simple VU meter addon - which would work (in theory) with ANY of them! 
(NOTE: As long as the player uses the scriptprocessor.js and backend_XXX.js files).

Simply add this line into your CODEF HTML code, along with the other scripts being called.

<script src=""></script>

How the script works can be demonstrated in the URLs below. 

It can then be called using the following command:

The variables are pretty self-explanatory, but detailed below for clarity.
context = name of the destination CODEF canvas the VU meter is to be drawn upon.
Xpos / Ypos = the X and Y co-ordinates on the destination CODEF canvas you want the VU meter to be drawn.
EQ_WIDTH = the width in pixels of the VU meter.
EQ_HEIGHT = the height in pixels of the VU meter.
numBars = the number of bars in your VU meter.
BAR_WIDTH = the width in pixels of EACH individual bar.
SPACER_WIDTH = the width of the space between each bar (including the bar itself).
EQcolour = the required colour (in HEX) - i.e. #FF0000 (Red).
circles = if you want the EQ to be in circles or bars (see above) - if you want circles, set to=1, if bars, set to=0

For example:
Hope you like! Feel free to use it in your own screens!

EDIT: The URL link was not working. Now fixed.
EDIT # 2: New feature added!

No comments:

Post a Comment