Automatic operation

# NEURO DANCE

Some links will not be active if there is no internet connection.

## Principle
The menus
Keyboard Shortcuts
An example
Launching options
Default parameters
Adjusting audio

## Principle

Bodies are set over a ground, they act according to a gravity field and forces determined by the collision algorithme (impact on the ground).
Each body is associated to a nueral network. whose inputs are the angles of its limbs and whose outputs are torques applied to those limbs. Such a network is dynamically trained by the back-propagation algorithm of the error, from a predifened set of learning couples (input,output), the outputs aiming to preserve the balance in a dancing way.
An interactive process provides additional forces from a dynamic analysis of various sensors (such as audio fft).
dynasensa_aud_3.js: 3 bodies.
If the audio signal is too weak or too strong, or if the atmospher is noisy adjust the audio parameters.

## The menus

### Main menu
Parameters menu

## Main menu

### HEL: help
MODEL
NETWORK
RAND
BAL
ACT
AUTO
INI
FOC
EFF
EXI

MODEL
Click on nb: number of bodies, on displ: active bodies.
NETWORK
HEL
RAND
MEMO
COMPO
LEARN
MATRIX
TWIN
ALEA
INI
RAND
Defines as much random neural networks as bodies number, choose number of learning couples and the number of hidden layers.
MEMO
Defines as much neural networks as bodies number, choose the number of predefined learning couples and the number of hidden layers.
COMPO
Allows add learning couples by crossing inputs and outputs: click on a motif number, then on a law number, then finally on VALIDATE.
Choose the number of hidden layers.
LEARN
Learning process: the networks are displayed as well as the errors curve, parameters can be modified on scales.
MATRIX
The neural weight matrices are displayed.
TWIN
For nb several bodies the inputs of the [2,nb] bodies are the outputs of the first body (like an empathyc process).
ALEA
The neural weight matrices are reseted.

### INI

Removes neural networks.

### RAND

Change amp = random amplitude.

### BAL

Enable / disable an automatic balancing process.

### ACT

Launches the whole porcess.

### AUTO

Automatic mode, must been activated a sensor.

### INI

Resets all bodies.

### FOC

The focal is modified according to the value of the sensor via a memory for smoothing the variations.

### EFF

Automatic variation of effects (with or without texturing, selfing, ...).

### EXI

Exits the programm.

## Parameters menu

### HEL
CHANGE
SENS
OUT

### HEL

Help

### CHANGE

Displays scales to change all settings:
gravity
reb,fric: rebound, friction
force, coe, visc
ni = trajectories size
limit: maximum distance from the ground center
force add: on pelvis (according to sensor in AUTO mode)
aim: aim buffer size
agitate: agitation at rest
wind: wind on the hair
ang: adjust ang(a)vol(hair)
self: number of frames between two generate image
texture size
wind: wind on hair.
HEL: help
INI
SCALES
SKIN
ILLUM
EXT
ROTY
READ0
READ
WRITE
INI
Restores all parameters
SCALES
Allows changing parameters of bodies:
click on num = number of the selectionned body
change the scales
SKIN
Switches body/skin
ILLUM
yes/no illum
EXT
yes/no ext
ROTY
yes/no roty ground and sky
READ0
reads the original parameters file PARAM0
READ
reads the user parameters file PARAM
WRITE
writes current parameters in file PARAM

### SENS

HEL: help
NONE
AUDIO
CONSTANT
RAND
MOUSE
INI
ADJUST
HEL
Help
NONE
no sensor
AUDIO
audio sensor: change nb audio and coe
CONSTANT
constant sensor: change constant
RAND
random sensor: change rand
MOUSE
mouse sensor: change mouse
INI
resets parameters
ADJUST
launches the automatic sensors adjustment process (short cut A).
Coe_AUDIO[2] is incremented or decremented, according to the average of Max_SENS.

### OUT

HEL: help
RING
WAV
HEL
Help
RING
In automatic mode invokes audio ring.

### WAV

In automatic mode calls the driver wav1.func. When anyflo is launched this driver is automatically killed (by calling TASKKILL /im anyflo1.exeTASKKILL /im anyflo1.exe) then launched by calling wav1.js which launches anyflo1.exe (different form anyflo.exe) executing the function wav1.func.
When launched the number of wav files is sent to anyflo, when received the window is reset in order to show the anyflo window.
Be sure that any other driver is not runing (because it can be relaunched infinitely).

## Keyboard Shortcuts

: (colon) hides menus.
A: automatic adjustment.
a: automatic aim.
C: automatic change of the skin colors.
d activates the distance test.
E automatic effects.
e displays neural network errors.
f automatic focal.
h help.
i resets bodies.
I resets parameters.
l yes/no spot light.
m mini menu.
p sky pulsation.
q exit.
r ground and sky rotation.
S yes/no see, type no see to exit this mode.
s self texturing.
T yes/no transparency.
t yes/no texture.
v yes/no verbose.
w writes image.
v yes/no wiugs.
Z starts/stops writing an images sequence on the disk.

# An example

Lancer neuro_dance.js without option.
Click on MODEL choose the number of bodies.
Click on NETWORK then on MEMO.
Click on ACT.
Click on PARAM -> SENS, then on AUDIO, then on AUTO.

## Launching options

Priority.
adj: automatic adjustment.
aud=n: audio sensor with n bodies.
bal: balance.
coe=c: multiplier coefficient of audio signal.
col: shortcut C changing the skin colors.
del=ns: waits ns seconds before calling audio ini (allows chaining several programs).
dis: shortcut d controlling the distances between the bodies.
err: shortcut e displaying the error curves of the neural networks.
exp=e sensor ^= e (2 default):
e>2: compresses low values, expands high values.
e<2: expands low values, compresses high values.
foc: focal variation.
: short : hidding the menus.
lig: shortcut l switching from standard light to spot light.
min=n: low amplitude filter.
max=n: high amplitude filter.
mod: MODEL function.
mou=n: sensor mouse with n bodies.
net: NETWORK function.
pro=n: for chaining dynasensa_aud_n.js with option tim=t.
rin: RING function.
rot: ROTY function.
sec=t: the program is killed after t seconds, then launched again (anticipating eventual memories lost).
sel: shortcut s producing the automapping.
tim=t: the program is killed after t frames, then launched again (anticipating eventual memories lost).
tra: shortcut T enables transparency.
tex: shortcut t yes/no texture.
ver: shortcut v verbose mode.
wav: WAV function.

### Example

"aud=3;foc;adj" launches the program with:
audio sensor
3 bodies
automatic focal
automatic adjustment process

## Default parameters

### Original

File PARAM0 contains original parameters (must not be modified).
Loaded by PARAM -> CHANGE -> READ0.

### Current

File PARAM contains current parameters.
Modified by PARAM -> CHANGE -> WRITE.
Restoreded by PARAM -> CHANGE -> READ.

### Optionnal

Launching options have priority.

## Adjusting audio

### Automatic

Launche dynasensa_adjust.js, when completed the program writes the modified file PARAM used by next launches of the program.
Or, with more coltrole:
Launche with option adj.
Scales:
adjust
adjust2
d,max,sum
ds,coe
coe is automatically updated, the adjustment stops when balance is reached or after adjust*adjust2 frames.
Save the result by clicking on PARAM -> CHANGE -> WRITE (the parameters are displayed).
When lauching the program again, those values will be taken into acount.

### Manually

Press : (colon) key: menus are displayed.
Click on PARAM -> SENS -> AUDIO: audio scales are displayed.
Change:
nb audio: 2^nb samples.
coe: audio signal amplitude.
min,max: low and high amplitude filters.
Save the result by clicking on PARAM -> CHANGE -> WRITE (the parameters are displayed).
When lauching the program again, those values will be taken into acount.