|

LiveBeats is a command-line based audio/visual live performance tool for browser. LiveBeats can generate various sounds and visual effects by commmands from keyboard. WebCam is required.

Chrome is recomemded.
Firefox may produce some abnormal sounds.
Edge can work but need so long initialization time.



Simple Tutorial:

TypeDescription
cam.a=1Set 'cam' object to visible
cam.v=.3Sound from 'cam' object is enabled. You can hear the sound from 'cam' by making motion in front of WebCam.
cam.effpointer=2'cam' object pointer is enabled.
cam.effmelt=lfo32*2'cam' object melt effect
bdo.s=crrrSet bass drum pattern to 'crrr'.
sdo.s=rrrrcrrrSet snare drum pattern to 'rrrrcrrr'.
hho.s=crSet Hi-hat pattern to 'cr'.
o1.s=aarrrrrrSet bass pattern.
o5.s=o1.sSet osc5 pattern same as osc1
o5.f=55Osc-5 base frequency to 55Hz
o5.out=o1FM mode from osc-5 to osc-1
o2.s=ageeagdedeaaSet Osc-2 pattern
o2.q=28Set Osc-2 filter Q
o2.c=lfo32*32+1Modify Osc-2 filter cutoff with LFO
o2.delay=.3Set Osc-2 delay effect
o3.s=gSet Osc-3 pattern
o3.f=Math.random()*1000+100Make random Osc-3 frequency
wav.hue=lfo16wav display color change
wav.rot=tickwav display rotation
wav.line=beat8*100Change wave display width with beat

Basics:

Everythings are controlled via commands from keyboard. For example, typing "o1.s=crrr" will set sequence 'crrr' to oscillator-1. Almost control commands take the assignment statement like 'object.property=formula'.

Each property is a 'number' or a 'string'. The 'number' property will be repeatedly evaluated until it has a number value. And the 'string' property will be repeatedly evaluated while the result is a string.

For example,
(osc-1 freq : number) o1.f=110 <-- '110' will be evaluated as a number
(osc-2 freq : number) o2.f=o1.f <-- 'o1.f' will be '110', and evaluated as a number
(osc-1 sequence : string) o1.s=abcde <-- 'abcde' will be evaluated as a string 'abcde'
(osc-2 sequence : string) o2.s=o1.s <-- 'o1.s' will evalueted as 'abcde'

formula can contain bultin variables,
tick --- count up per tick (sixteenth note)
lfo2 / lfo4 / lfo8 / lfo16 / lfo32 / lfo64 --- low frequency osillator (n-ticks cycle)
sh1 / sh2 / sh4 / sh8 / sh16 / sh32 / sh64 --- sample & hold value (changes every n-ticks)
beat4 / beat8 / beat16 / beat32 / beat64 --- trigger per n-ticks

For example,
o1.f=sh4*1000+100 --- random note using sample&hold
o1.c=lfo16*1000+100 --- filter sweep by lfo

Block Diagram:

Commands:

object.property=formulaAssign formula to object's property. Each formula will be evaluated per each step and reflected to sound/image result (there are some exception).
list [object name]list available objects or object's properties.
list midilist available MIDI ports, that can be used to specify 'cam.midi'.
list irlist available Impulse Response files, that can be used to specify 'master.ir'.
list pluginslist available visualizer plugins.
print <formula>evaluate the formula and print


Objects:


o1,o2,...o8Oscillators, including filter, volume and panning control. o1 and o5 are assumed to bassline. Following description is o1.x but others are same as o1.
o1.sstringSecquence for this osillator with MML-style string. Basically, this string is consist of chars 'rcdefgab', that means 'rest' or note name. Each char is assinged to one-step. Default value="r"
o1.gstringGate control for this oscillator with MML-style string. This is consist of chars 'rcdefgab'. r=mute, c=max volume and d,e,f,g... will decrease volume.
o1.vnumberVolume control
o1.fnumberBase frequency for note 'a'. default value is 110 for o1 and o5. otherwise 440.
o1.cnumberFilter cutoff. Specifying multiple number of current osc frequency.
o1.qnumberFilter Q-factor.
o1.dnumberDecay time.
o1.portanumberPortamento time.
o1.delaynumberSend to delay object (0.0 - 1.0)
o1.wavstringCustom waveform coeff string
o1.typenumberWave form (0:sine 1:sawtooth 2:square 3:custom)
o1.pannumberPanning control. (0(left) <-> 0.5(center) <-> 1.0(right))
o1.outobjectSpecify the output rourting. default='master'. FM modulation will be configured if you specify other oscillator like o1,o2,...

bdo,sdo,hho,cyopercussive sound oscillators. specialized to bdo:bass-drum, sdo:snare-drum, hho:hihat, cyo:cymbal. Following description is bdo.x but others are same as bdo.
bdo.sstringSecquence for this osicllator with MML-style string. This string is consist of chars 'rcdefgab', that means 'rest' or note name. Each char is assinged to one-step. Default value="r"
bdo.vnumberVolume control
bdo.pannumberPanning control. (0(left) <-> 0.5(center) <-> 1.0(right))

delayDelay effects. This object receive sounds from 'cam' and 'o1'-'o8' and add feedback delay effect.
delay.tnumberDelay time control. delay time is tempo synced. default=8 (8th note)
delay.fbnumberDelay feedback ratio

saySpeech object. This object use SpeechSynthesis API.
say.tstringSpecify text to speak. it can be sync to beat if comma separated
say.vnumberspeech volume
say.pnumberspeech pitch
say.rnumberspeech rate

mastermaster control
master.vnumbermaster volume. default value is 1.0
master.temponumbertempo control. default value=120
master.gstringmaster step effect control. Each char is assigned to overall effect of one-step. available chars are "0123456789", each number has each type of effect. "0" is no effect.
master.revnumberReverb level. 'master.ir' should abe set
master.irnumberSelect Impulse Response file for reverb effect. Available values are listed by 'list ir' command.

Visualizer Plugins:

Visualizer effects are modules that visualize output sounds. Visualizers are implemented as plugin modules. Currentry, 'vj_wave' and 'vj_matrix' are available and defaultly be loaded. Plugin codes is just a JavaScript function that create a dom-element and draw. 'vj_simplewave.js' is a simple sample code. If you make your own plugin, that can be loaded by drop to LiveBeats.

Detail spec is here : vjpluginspec.html

Followings are default loaded visualizers. Especially txt plugin and cam plugin has special functions not only for visual effects.

txt plugin is a command-line display plugin. this plugin displays the texts from keyboard input and always placed on top of other plugins.

txtCommand inputs.
txt.anumberalpha value of txt object (0.0 - 1.0)
txt.wnumberwidth of txt object (0.0 - 1.0)
txt.hnumberheight of txt object (0,0 - 1.0)
txt.xnumberx pos of txt object. (0:far left - 0.5:center - 1.0:far right)
txt.ynumbery pos of txt object. (0:top - 0.5:center - 1.0:bottom)
txt.znumberzoom factor of txt object. fit to window size if 1.0
txt.rotnumberrotation of txt object in degree.
txt.colstringtext color. e.g. '#fff'. hue(value) function is also available.

cam plugin displays image from WebCam, detect mootions, and output audio/MIDI signals.

camDipslay WebCam image and generate sound from motion detect.
cam.anumberalpha value of cam image (0.0 - 1.0)
cam.wnumberwidth of cam image (0.0 - 1.0)
cam.hnumberheight of cam image (0.0 - 1.0)
cam.xnumberx pos of cam image. (0:far left - 0.5:center - 1.0:far right)
cam.ynumbery pos of cam image. (0:top - 0.5:center - 1.0:bottom)
cam.znumberzoom factor of cam image. fit to window size if 1.0
cam.rotnumberrotation of cam image in degree.
cam.effhuenumberhue rotation of cam image in degree.
cam.effpointernumbermotion pointer type. 0:none, 1:star, 2:line
cam.effposternumberposterize.
cam.effmotionnumbermotion effect. 0:none, 1:motion to red, 2:motion to white, 3:motion to fire effect
cam.effscannumberscanline effect.
cam.effkaleidonumberkaleidscope effect. 0:none, 1:dual, 2:quad, 3:octa
cam.scalestringSpecify scale of cam sound with MML-style string. In default, 2 octave pentatonic scale, 'cdega>cdega>c'
cam.midinumberUse MIDI message instead of built-in oscillator sound. 0:build-in oscillator(Non-MIDI), otherwise specify midi port number that is listed in 'list midi' command. Note that the Web MIDI API should be available. defalut=0.
cam.vnumberSound volume
cam.delaynumberSound send level to delay object

'wav' module displays waveform or spectrums.

wavWave form display.
wav.anumberalpha value of wav image (0.0 - 1.0)
wav.wnumberwidth of wav image (0.0 - 1.0)
wav.hnumberheight of wav image (0,0 - 1.0)
wav.xnumberx pos of wav image. (0:far left - 0.5:center - 1.0:far right)
wav.ynumbery pos of wav image. (0:top - 0.5:center - 1.0:bottom)
wav.znumberzoom factor of wav image. fit to window size if 1.0
wav.blurnumberwhole blur effect.
wav.rotnumberrotation of wav image in degree.
wav.effbnumberblur effect around lines. .bcol will be used. default=0
wav.effxnumberx-offset effect. default=0
wav.effynumbery-offset effect. default=0
wav.effznumberzoom effect. default=1
wav.effrnumbererase rate effect
wav.fillnumberfill mode. 0:line 1:fill
wav.linenumberstroke line width
wav.typenumber0:waveForm 1:spectrum 2:circle
wav.colstringwav form color. e.g. '#fff'. hue(value),hsv(h,s,v) function is also available.
wav.bcolstringwav blur color. e.g. '#fff'. hue(value),hsv(h,s,v) function is also available.

'mat' module is charactor based 'matrix' like effect.

wavMatrix effects.
mat.anumberalpha value of mat object (0.0 - 1.0)
mat.wnumberwidth of mat object (0.0 - 1.0)
mat.hnumberheight of mat object (0,0 - 1.0)
mat.xnumberx pos of mat object. (0:far left - 0.5:center - 1.0:far right)
mat.ynumbery pos of mat object. (0:top - 0.5:center - 1.0:bottom)
mat.znumberzoom factor of mat object. fit to window size if 1.0
mat.blurnumberwhole blur effects.
mat.rotnumberrotation of mat object in degree.
mat.effbnumberblur effect around chars. bcol will be used. default=0
mat.effxnumberx-offset effect. default=0
mat.effynumbery-offset effect. default=0
mat.effznumberzoom effect. default=1
mat.effrnumbererase rate effect
mat.fillnumberfill mode. 0:line 1:fill
mat.colstringcharactor color. e.g. '#fff'. hue(value),hsv(h,s,v) function is also available.
mat.bcolstringblur color. e.g. '#fff'. hue(value),hsv(h,s,v) function is also available.

Variables:

Pre-defined variables can be used in formula.
tick'tick' is a count-up value from start of LiveBeats. Always integer. For example, it can be used as a rotation, e.g. 'wav.rot=tick'
s0 - s24preset sequence pattern. can be used to o1.s-o8.s (may be also for bdo.s-cyo.s)
sh8, sh16, sh32, sh64shX are sample and hold random value. It will be changed to next random value per each X-tick step. value range is 0.0-1.0, for example, it can be used to 'wav.x=sh8'.
lfo8, lfo16, lfo32, lfo64lfoX are low frequency oscillator (LFO) values. These are equivalent to the function 'lfo(X)'. These are X-tick periodic value in the range of (0.0-1.0). Wave form is triangle. For example, it can be used as 'o1.pan=lfo16'.

Functions:

Pre-defined functions can be used in formula.
lfo(value)Low frequency oscillator (LFO) function. This function makes periodic oscillated value. The period is specified tick by 'value'. value range is (0.0 - 1.0).
hue(value)'hue(value)' will convert number(0.0-1.0) to color string. This is equivalent to hsv(value,1,1). That can be used as 'wav.col' or 'txt.col'.
hsv(h,s,v)'hsv(h,s,v)' will convert h:hue, s:saturation, v:brightness to color string. That can be used as 'wav.col', 'txt.col'.

MML-style string:

o1.s - o8.s, bdo.s, sdo.s, hho.s and cyo.s are described in MML-style string.
rr[len]Rest. default length is used if no len is specified.
c,d,e,f,g,a,b<c|d|e|f|g|a|b>[#|+|-][len]Note name. following #,+,- will shift semitone. Default length is used if no len is specified.
ll[len]Set default length. Initial default length=16, equivalent to l16. (sixteenth)
oo[n]Set octave. default=o4
>>Octave Down
<<Octable Up

GitHub:

GitHub repository is available at:
http://github.com/g200kg/LiveBeats/

License:

IR files are from: http://www.voxengo.com/impulses/, licensed under: IMreverbs1 license.txt
Others: MIT License