Principle:
Objects of type memory can be manipulated by their
identifier.
memory
memory(id)
Returns the content of memory id.
memory(id)=v
Assigns v to memory id.
v can be:
1) a float vector, example:
memory(1)=[1,6];
Creates the memories 1 of 6 points 1, 2, 3, 4, 5 and 6.
2) a string, example:
memory(2)="A BC DEF";
Creates the memory 2 of 3 points "A", "BC" et "DEF".
3) an hybrid, example:
memory("M")=(memory(2)),7;
Creates the memory M of 2 points:
"A BC DEF".
and 7.0
memory(id)ini(np,dimp)
Creates the memory id of np vectors nulls of dimension dimp
(dimp=1 default).
Options:
alea(c1,c2): np reproductible values between c1 and c2.
coe(c): multiplier c.
ini(np,dimp,ns): ns sub memories the same size.
rand(c1,c2): np no reproductible values between c1 and c2.
sin(f,a,p): for(i=0,np-1)poi[i+1]memory(id)=a*sin(f*i+p);
sin(f,a,p)rand(r1,r2,dn): with random in (r1,r2), dn = amplitude of variation.
sin(f1,a1,p1,f2,a21,p2,...,fn,an,pn):
for(i=0,np-1)poi[i+1]memory(id)=sum(aj*sin(fj+pj))/n0<=j<n;
sin(f1,a1,p1,f2,a2,p2,...,fn,an,pn) interpol:
(frequencies,amplitudes,phases) interpolated onr
(f1,a1,p1,f2,a2,p2,...,fn,an,pn).
var(v1,v2,...): as memory(id)=v1,v2,....
var(v1,v2,...): as memory(id)=v1,v2,....
Examples:
memory(1)ini(3,4);edit poi memory(1);
prints:
0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0
poi(2)memory(1)=1,2;edit poi memory(1);
prints:
0.0 0.0 0.0 0.0
1.0 2.0 2.0 2.0
0.0 0.0 0.0 0.0
poi(2)memory(1)=[1,5];edit poi memory(1);
prints:
0.0 0.0 0.0 0.0
1.0 2.0 3.0 4.0
0.0 0.0 0.0 0.0
$poi(2)memory(1);
prints:
1.0 2.0 3.0 4.0
memory(1)ini(6,2);$memory(1)
prints:
1: 0.000000 0.000000
2: 0.000000 0.000000
3: 0.000000 0.000000
4: 0.000000 0.000000
5: 0.000000 0.000000
6: 0.000000 0.000000
for(i=1,6)poi(i)memory(1)=i,i*i;$memory(1)
prints:
1: 1.000000 1.000000
2: 2.000000 4.000000
3: 3.000000 9.000000
4: 4.000000 16.000000
5: 5.000000 25.000000
6: 6.000000 36.000000
memory(1)ini(4,3,2);
poi[1,4]memory(1)memory(1)=[1,12];
poi[1,4]memory(1)memory(2)=[-1,-12];
edit(memory(1));
Prints:
0: 1 2 3
1: 4 5 6
2: 7 8 9
3: 10 11 12
4: -1 -2 -3
5: -4 -5 -6
6: -7 -8 -9
7: -10 -11 -12
memory(1)ini(6)var(1,2,3);$memory(1);
prints:
1,2,3,1,2,3
memory audio
memory(id)audio
Builds the memory id of poi = audio var.
ini audio must be done.
If the memory does not exist it is created.
If the memory exists it is modified.
memory(id) returns then the memorised audio signal.
memory CG
memory(id)CG
Returne the CG of np vectors size dimp of memory id, with
np=NP memory(id) and dimp=dim memory(id).
Options:
CG(n1,n2,...) vectors numbers n1,n2,...
memory clean
memory(id1,id2)clean
Thresheld: memory(id2)=(memory(id1)<=average(memory(1)) ? 0 : 1
memory envelope
memory(id)envelope(dur)
Returns the envelope of signal contained in the memory id. The
duree parameter (1 default) allows to control the frequency of sampling.
propr memory(id)
Returns the propr property of the memory id.
propr memory(id)=v
Assigns this property.
Examples:
NP memory(id);
Returns the vectors number of memory id (can't be changed).
dim memory(id);
Returns the dimension of vectors of memory id (can't be changed).
poi(p)memory(id);
Returns the vector number p (between 1 and NP memory(id)) of memory id.
poi(p)memory(id)=v;
Changes this vector.
memory period
period
period_debug
period_envelope
memory(id)period [min(m)]
Returns the period of the signal contained in memory id.
m = minimum variation (0 defautl).
memory(id)period debug
Returns 0,0,...,0,1,0,...,0,1,0,...., the maximums are quoted 1.
Example of use, see demo1_memory.func.
memory(id)period envelope(e) [min(m)]
Returns the period of the signal contained in the
envelope order e, and approxiamtion m, of memory id.
memory puls
puls
puls_poi
puls_var
memory puls(n,c)poi(p)
Returns the frequency of n cyclically values modified by p,
slope attack c*moy (0.15 default).
memory puls(n)var
Returns the buffer containing n valeurs.
memory puls(n)NP
Returns the list of the attacks.
memory puls(n,c)poi(p)adjust
Returns the frequency of n cyclically values modified by p
(automatic adjustment to the nearest frequency).
memory puls(n,c)var
Returns the n pulses.
memory roll
memory(id)roll=v
Shifts the memory id right and assigns the value v to the first vector.
memory line
memory(id)line(x1,y1,z1,x2,y2,z2,...)
Builds the object type memory, identifier id, and property
poi (x1,y1,z1,x2,y2,z2,...).
Options:
dup(n): duplicates n times the line.
line(x1,x2,...)format(1): poi(x1,0,0, x2,1,0, ...).
line(x1,y1,x2,y2,...)format(2): poi(x1,y1,0, x2,y2,0, ...).
adjust(n): builds n points according to format.
ext(e,c,f): with extension.
memory motif
memory(id)motif ini(dim,nb)
Builds the object type memory, identifier id, and nb
vectors dimension dim.
memory(id)motif(m)adjust
Integrates motif m.
memory(id)motif(m)close(1)
Returns the nearest motif of m.
memory(id)motif(m)close(0)
Returns the farest motif of m.
Note:
When presenting various motifs to object memory id, this one classifies
by proximity.
memory obj
memory(id1) obj(id2)
Returns the content of memory id1 of object id2.
memory(id1) object(id2)=expr
Assigns expr to the memory id1 of the object id2.
Notes: useful for storing a knowledge base of an behavioural object (see local).
memory(id1)ini(np,dimp)object(id2)
Stores in the memory id1 of object id2 np no null vectors of dimension dimp.
/*??? A FAIRE ???*/
memory(val)min
Returns the nearest memoy of val.
memory(val)min number
Returns the number of the nearets memory of val.
memory min=val
Set the nearest memoy of val.
Assignes the nearest memory to val.
memory(val)max
Returns the farest memoy to val.
memory(val)max number
Returns the number of the farest memoy of val.
memory max=val
Sets the farest memoy from val.
See also: