IMAGE MUSIC



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

Principle
The menus
Sensors
Networks
Ima phone
Keyboard Shortcuts
Launching options
Example
Program

































Principle

General

This application follows gravity2.0 with more functions such as no gravity, wav files with networks.
Bodies are set over a ground, they act according to a gravity field and forces determined by the collision algorithme (impact on obstacles) and sounds' generation and interpretation.

Bodies

Every body is associated to a neural 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.

Interaction

An interactive process provides additional forces from a dynamic analysis of various sensors (such as audio fft, mouse, joystick, ...).

Satellite

A feature activated by g key (or click on gravity) satellites a bodie which distance to the hearth is greater than a threshold, press again g key restarts gravity.
Press G key satellites a bodie whose distance to the hearth is greater than a threshold.
With option - (minus) gravity is automatically restarted if the sound is low during 2 seconds or by pressing g key (or click on no gravity).
This feature is an optional value when runing image_music_aud_3.js (audio) or image_music_mou_3.js (mouse).

A feature activated by D key made bodies interact (dance).

Auto gravity mode

In interactive mode with audio active and G active, auto gravity (if gravity is active) or no gravity (if gravity is not active: satellisation) and, in mode audio, a little scale allows changing the sensor coefficient in order to quickly adjust the sensitivity of the audio captation. When launching the program an automatic surch determines the minimum value of the audio (so launche the programm in silence).

Gravity + mode

In gra mode when clicking on + or pressing + key a force is applied to bodies in order to liberate them from the earth gravity puting them on trajectories around the sun and fginaly out the galaxy, they travel from now on others galaxies. In plus mode when clicking on = or pressing = key a force is applied to bodies in order to put them in others universes.

Music synthesis by sampling

With option sou all subdirectories of directory sounds are read:
       For every directory a neural network is build with random permutational motifs and laws size the number of wav files in this directory.
       At every image x=directory number and y=file number are computed according to the (x,y) sensor values. The audio buffer numbers are then computed, in every directory, as the output (law) of the correspondant network from input as the subbuffer numbers.

Music synthesis by frequency modulation

With options wav=ni and wra properties audio transf vol(id) are set on volumes id (see ima_phone options.
For that it is enough change the code of functions ima_phone_set_xxx(c,num,s) in file ima_phone.func, and of functions AUDIO_FUNC1() and AUDIO_FUNC1() in file image_music.func.

Neural networks

In NET1 mode the numbers played buffer are selected in outputs of neural networks (one for each sounds' sub directory) of which input are permutations of the wav files in the current sounds' sub directory.
In NET2 mode network (number num) is set with motifs size Sensor_Sounds_Ne[2]=12 and law size Sensor_Sounds_Ns[2]=3. Memories of the same size as the motifs are LIFO stacks storing sensor values. validate motif(mem)netwotk(num) returns a value (x,y,z) used to select the numbers played buffers.
With options wav=ni and wra, for every body, validate motif(mem)netwotk(pelvis) returns freq,dt,amp with freq = frequency dt = time and amp determines the amplitude´s envelope (0,0, amp,1, t,0), whitch sets the current value audio[t,t+dt]network vol(pelvis).

WARNING

files image_music_aud[1,4].js contain option poi, must prese . key (point) in order to liberate the bodies from the earth attraction.































The menus

MAIN
NETWORK
PARAM
SENSOR

































MAIN

HEL: help
DOC: this file
MODEL
ACT
AUTO
INI
EFF
MUSIC
CENTER
EXI


































MODEL
Click on nb: number of bodies, on displ: active bodies.































ACT

Launches the whole porcess.

AUTO

Automatic mode, must been activated a sensor.

INI

Resets all bodies.

EFF

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

MUSIC

Click on name.js; plays music file namle.eee.
Menus are hidden, click in the frame in order to hide the player, press ENTER key then ; key for a mini control (adjust the amplitude of the signal with keys ( and )).

CENTER

collision ball: collisions inside sky, default is collision popi collision over ground.

EXI

Exit.































NETWORK

HELRAND
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.































Parameters menu

HEL: help
CHANGE
OUT
READ
WRITE

CHANGE

HEL: help
INI: reset
SCALES: displays scales allowing to change parameters:
       gravity
       reb: rebound
       fric: friction
       force: force of collision
       coe: transmission
       visc: viscosity
       force add: vertical force
       coe gravity: gravity coefficient
       ni: trajectory duration
       period: display rate
       limit: limit for take off
       aim: size of the aim buffer
       self: amplitude of the auto mapping
       agitate: default agitation
       plus: coefficient when in plus mode
       gravity
       testure size
       wind: window of the auto mapping
       ang: angle
       balance,visc: balance coefficient

SKIN: switches body/skin mode
ILLUM: yes/no illum
EXT: switches body/skin mode
ROTY: yes/no roty of ground and sky
PART: yes/no particle
INI: reset
READ
reads parameters from file PARAM
WRITE
writes current parameters in file PARAM

OUT

HEL: help
RING
WAV
RECORD
SYNTH
PLAY
TEST
































Keyboard Shortcuts

: (colon) hides menus.
a: automatic aim.
A: automatic balance of audio amplitude (keep silence during the process)..
b: restarting with Option (begin).
C: hide/show cursor.
D: danse (interaction between bodies).
d: automatic distances (if several bodies).
E automatic process.
e displays neural network errors.
G automatic satellite.
g yes/no gravity.
G yes/no mode auto gravity.
h help.
i resets bodies.
I resets parameters.
J reset parameters.
j joystick.
l yes/no spot light.
m mini menu.
  :   :  A: automatic addio adjustment.
  :   :  D: interactiuon between bodies.
  :   :  d: automatic distances adjustment.
  :   :  g: gravity.
  :   :  l: lights.
  :   :  p: pulsation.
  :   :  r: ground and sky rotation.
  :   :  s: self texturing.
  :   :  G: auto gravity.
  :   :  t: yes/no texturing.
o yes/no ext illum texture skin.
p sky pulsation.
q exit.
r ground and sky rotation.
S yes/no see.
s self texturing.
T yes/no transparency.
t yes/no texture. a name="shortcut_(">
( Sensor_Coe-=.1. a name="shortcut_)">
( Sensor_Coe+=.1. a name="shortcut_+">
+ out of earth gravity.
- back to earth if sound low.
= out of this universe.
* dilatation variations.
; hide sensor coe scale.
, hide mini control.
. maintain bodies on earth. a name="shortcut_$">
$ displaying informations:
       forces: gravity (red), music (green), gravity + music (yellow)
       speed rota vol body (yellow circles) a name="shortcut_$">
% with option sou displays a xy aray with y=number of the subdirectory, x=number of the file in this subdirectory and the number of the file played.































Launching options

adj: automatic balance of audio amplitude (keep silence during the process), also avaible in interaction by pressing A key.
aud=n: audio sensor with n bodies.
bod=n: n bodies.
cau=c: multiplier coefficient of audio signal.
cen: collision ball.
cmo=c: multiplier coefficient of mouse signal.
col: shortcut C changing the skin colors.
cur: shortcut C show cursor.
dan: interaction between bodies (dance).
del=ns: waits ns seconds before calling audio ini (allows chaining several programs).
dis: shortcut d controlling the distances between the bodies.
eff=n: shortcut E with tempo n (500 default).
err: shortcut e displaying the error curves of the neuralk networks.
: short : hidding the menus.
exi: exit after write audio.
gra: mode auto gravity
joy: mouse as a joystick, see file image_music_aud_joy_*.js.
       move the mouse (down up): increases the sensor value.
       an arrow (green at the bottom, red at the top) through gravity (green).
       with option sou DirectX buffers are available in 2 dimensions (y: subfolders of main forlde sounds, x: files in thoses folders). satellite (yellow) and infini (red).
les: like shortcut -.
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.
net1: NET1.
net2:
NET2.
num=n: first of saved image.
off:
shortcut o
poi=n: maintain bodies on earth.
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.
sim=tmp.mem: simulation.
syn=tmp.mem: image simulation and synthetic music.
sto=name.stock: sensor values in file name.stock (build with Store.func tool.
tex: shortcut t yes/no texture.
tex: shortcut t yes/no texture.
tim=t: the program is killed after t frames, then launched again.
tra: shortcut T enables transparency.
wav: WAV function.
wra=name.wav: write audio.
wri=name.eee: write images.

Examples

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

"syn=tmp.mem;bod=3;foc;hai=3;wra=tmp.wav;wri=start/A.jpg;" launches the program with:
       image simulation and synthetic music from file tmp.mem
       3 bodies
       automatic focal
       hairs coefficient 3
       writes audio tmp.wav
       writes images start/A0001.jpg start/A0002.jpg ...
tmp.mem has been written by Sensor program.































Example

Click on image_music_aud_4.js: 4 bodies with audio.
Press : key (colon): menus appear.
Click on MUSIC: files *.js are dsplayed, click on one of them.
Use
( and
): decrease and incresse the audio sensibility.
When the bodies are satellised press + key: out of the earth influence, travle through the galaxy stars and finaly out of our galaxy through the universe.

Program

Includes

image_music.func: main program.
#include body.func: making bodies.
#include sensor0.func: sensors management.
which includes #include net.func": neural networks management.
#include ima_phone.func: music synthesis management.

Automatic

Automatic cut:
       g=CG(CG_Pelvis);if((c=1000*module(g)/R_Sky)>1000)c=1000;cut(c,32000);
automatic satellisation:
       for a sufficient distance to the ground an horizontale impulse is given in order to put the body in orbit.
automatic return to earth:
       with option -, back on land if, after Max_Gravity=50 images, the speed sensor has not changed. br>automatic silence:
       with option joy, the sensor returns zero if, after Sensor_Sounds_Max=500 images, the speed sensor has not changed. Sensor_Sounds_Max=500