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.
Type | Description |
---|---|
cam.a=1 | Set 'cam' object to visible |
cam.v=.3 | Sound 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=crrr | Set bass drum pattern to 'crrr'. |
sdo.s=rrrrcrrr | Set snare drum pattern to 'rrrrcrrr'. |
hho.s=cr | Set Hi-hat pattern to 'cr'. |
o1.s=aarrrrrr | Set bass pattern. |
o5.s=o1.s | Set osc5 pattern same as osc1 |
o5.f=55 | Osc-5 base frequency to 55Hz |
o5.out=o1 | FM mode from osc-5 to osc-1 |
o2.s=ageeagdedeaa | Set Osc-2 pattern |
o2.q=28 | Set Osc-2 filter Q |
o2.c=lfo32*32+1 | Modify Osc-2 filter cutoff with LFO |
o2.delay=.3 | Set Osc-2 delay effect |
o3.s=g | Set Osc-3 pattern |
o3.f=Math.random()*1000+100 | Make random Osc-3 frequency |
wav.hue=lfo16 | wav display color change |
wav.rot=tick | wav display rotation |
wav.line=beat8*100 | Change wave display width with beat |
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
object.property=formula | Assign 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 midi | list available MIDI ports, that can be used to specify 'cam.midi'. |
list ir | list available Impulse Response files, that can be used to specify 'master.ir'. |
list plugins | list available visualizer plugins. |
print <formula> | evaluate the formula and print |
o1,o2,...o8 | Oscillators, 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.s | string | Secquence 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.g | string | Gate 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.v | number | Volume control |
o1.f | number | Base frequency for note 'a'. default value is 110 for o1 and o5. otherwise 440. |
o1.c | number | Filter cutoff. Specifying multiple number of current osc frequency. |
o1.q | number | Filter Q-factor. |
o1.d | number | Decay time. |
o1.porta | number | Portamento time. |
o1.delay | number | Send to delay object (0.0 - 1.0) |
o1.wav | string | Custom waveform coeff string |
o1.type | number | Wave form (0:sine 1:sawtooth 2:square 3:custom) |
o1.pan | number | Panning control. (0(left) <-> 0.5(center) <-> 1.0(right)) |
o1.out | object | Specify the output rourting. default='master'. FM modulation will be configured if you specify other oscillator like o1,o2,... |
bdo,sdo,hho,cyo | percussive 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.s | string | Secquence 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.v | number | Volume control |
bdo.pan | number | Panning control. (0(left) <-> 0.5(center) <-> 1.0(right)) |
delay | Delay effects. This object receive sounds from 'cam' and 'o1'-'o8' and add feedback delay effect. | |
---|---|---|
delay.t | number | Delay time control. delay time is tempo synced. default=8 (8th note) |
delay.fb | number | Delay feedback ratio |
say | Speech object. This object use SpeechSynthesis API. | |
---|---|---|
say.t | string | Specify text to speak. it can be sync to beat if comma separated |
say.v | number | speech volume |
say.p | number | speech pitch |
say.r | number | speech rate |
master | master control | |
---|---|---|
master.v | number | master volume. default value is 1.0 |
master.tempo | number | tempo control. default value=120 |
master.g | string | master 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.rev | number | Reverb level. 'master.ir' should abe set |
master.ir | number | Select Impulse Response file for reverb effect. Available values are listed by 'list ir' command. |
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.
txt | Command inputs. | |
---|---|---|
txt.a | number | alpha value of txt object (0.0 - 1.0) |
txt.w | number | width of txt object (0.0 - 1.0) |
txt.h | number | height of txt object (0,0 - 1.0) |
txt.x | number | x pos of txt object. (0:far left - 0.5:center - 1.0:far right) |
txt.y | number | y pos of txt object. (0:top - 0.5:center - 1.0:bottom) |
txt.z | number | zoom factor of txt object. fit to window size if 1.0 |
txt.rot | number | rotation of txt object in degree. |
txt.col | string | text color. e.g. '#fff'. hue(value) function is also available. |
cam plugin displays image from WebCam, detect mootions, and output audio/MIDI signals.
cam | Dipslay WebCam image and generate sound from motion detect. | |
---|---|---|
cam.a | number | alpha value of cam image (0.0 - 1.0) |
cam.w | number | width of cam image (0.0 - 1.0) |
cam.h | number | height of cam image (0.0 - 1.0) |
cam.x | number | x pos of cam image. (0:far left - 0.5:center - 1.0:far right) |
cam.y | number | y pos of cam image. (0:top - 0.5:center - 1.0:bottom) |
cam.z | number | zoom factor of cam image. fit to window size if 1.0 |
cam.rot | number | rotation of cam image in degree. |
cam.effhue | number | hue rotation of cam image in degree. |
cam.effpointer | number | motion pointer type. 0:none, 1:star, 2:line |
cam.effposter | number | posterize. |
cam.effmotion | number | motion effect. 0:none, 1:motion to red, 2:motion to white, 3:motion to fire effect |
cam.effscan | number | scanline effect. |
cam.effkaleido | number | kaleidscope effect. 0:none, 1:dual, 2:quad, 3:octa |
cam.scale | string | Specify scale of cam sound with MML-style string. In default, 2 octave pentatonic scale, 'cdega>cdega>c' |
cam.midi | number | Use 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.v | number | Sound volume |
cam.delay | number | Sound send level to delay object |
'wav' module displays waveform or spectrums.
wav | Wave form display. | ||
---|---|---|---|
wav.a | number | alpha value of wav image (0.0 - 1.0) | |
wav.w | number | width of wav image (0.0 - 1.0) | |
wav.h | number | height of wav image (0,0 - 1.0) | |
wav.x | number | x pos of wav image. (0:far left - 0.5:center - 1.0:far right) | |
wav.y | number | y pos of wav image. (0:top - 0.5:center - 1.0:bottom) | |
wav.z | number | zoom factor of wav image. fit to window size if 1.0 | |
wav.blur | number | whole blur effect. | |
wav.rot | number | rotation of wav image in degree. | |
wav.effb | number | blur effect around lines. .bcol will be used. default=0 | |
wav.effx | number | x-offset effect. default=0 | |
wav.effy | number | y-offset effect. default=0 | |
wav.effz | number | zoom effect. default=1 | |
wav.effr | number | erase rate effect | |
wav.fill | number | fill mode. 0:line 1:fill | |
wav.line | number | stroke line width | |
wav.type | number | 0:waveForm 1:spectrum 2:circle | |
wav.col | string | wav form color. e.g. '#fff'. hue(value),hsv(h,s,v) function is also available. | |
wav.bcol | string | wav blur color. e.g. '#fff'. hue(value),hsv(h,s,v) function is also available. |
'mat' module is charactor based 'matrix' like effect.
wav | Matrix effects. | |
---|---|---|
mat.a | number | alpha value of mat object (0.0 - 1.0) |
mat.w | number | width of mat object (0.0 - 1.0) |
mat.h | number | height of mat object (0,0 - 1.0) |
mat.x | number | x pos of mat object. (0:far left - 0.5:center - 1.0:far right) |
mat.y | number | y pos of mat object. (0:top - 0.5:center - 1.0:bottom) |
mat.z | number | zoom factor of mat object. fit to window size if 1.0 |
mat.blur | number | whole blur effects. |
mat.rot | number | rotation of mat object in degree. |
mat.effb | number | blur effect around chars. bcol will be used. default=0 |
mat.effx | number | x-offset effect. default=0 |
mat.effy | number | y-offset effect. default=0 |
mat.effz | number | zoom effect. default=1 |
mat.effr | number | erase rate effect |
mat.fill | number | fill mode. 0:line 1:fill |
mat.col | string | charactor color. e.g. '#fff'. hue(value),hsv(h,s,v) function is also available. |
mat.bcol | string | blur color. e.g. '#fff'. hue(value),hsv(h,s,v) function is also available. |
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 - s24 | preset sequence pattern. can be used to o1.s-o8.s (may be also for bdo.s-cyo.s) |
sh8, sh16, sh32, sh64 | shX 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, lfo64 | lfoX 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'. |
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'. |
r | r[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. |
l | l[len] | Set default length. Initial default length=16, equivalent to l16. (sixteenth) |
o | o[n] | Set octave. default=o4 |
> | > | Octave Down |
< | < | Octable Up |
GitHub repository is available at:
http://github.com/g200kg/LiveBeats/
IR files are from: http://www.voxengo.com/impulses/, licensed under: IMreverbs1 license.txt
Others: MIT License