README.md 3.07 KB
Newer Older
Arnaud Blanchard's avatar
Arnaud Blanchard committed
1
Set of programs to manipulate data in blc_channels. They do not have any lib dependency.
Arnaud Blanchard's avatar
Arnaud Blanchard committed
2

Arnaud Blanchard's avatar
Arnaud Blanchard committed
3
4
Acquire input values
====================
Arnaud Blanchard's avatar
Arnaud Blanchard committed
5

Arnaud Blanchard's avatar
Arnaud Blanchard committed
6
from keyboard
Arnaud Blanchard's avatar
Arnaud Blanchard committed
7
8
9
-------------

`i_keyboard` changes values with the keyboard arrows or specific keys:
Arnaud Blanchard's avatar
Arnaud Blanchard committed
10
11
12
13

    Waiting for one key in '0123456789abcdef'. Quitting with 'q'
    /i_keyboard31058

Arnaud Blanchard's avatar
Arnaud Blanchard committed
14
15
16
This means that a channel (/i_keyboard31058) of 16 ( by default there is 16 characters in the string) 'UIN8' has been created.
Press Up and Down to increase or decrease the first value. Use Right and Left or one key of the key list to select another value to change.
`Esc` sets the value back to neutral values (default 50% i.e. 127)
Arnaud Blanchard's avatar
Arnaud Blanchard committed
17

Arnaud Blanchard's avatar
Arnaud Blanchard committed
18
i_keyboard has many options (use `i_keyboard -h` to list them) we illustrate some:
Arnaud Blanchard's avatar
Arnaud Blanchard committed
19
20
21

    i_keyboard  -d -tFL32 -k abcd -o/toto

Arnaud Blanchard's avatar
Arnaud Blanchard committed
22
Creates a channel '/toto' of 4 float values corresponding to 'a', 'b', 'c', 'd' between 0 and 1 and display the pourcentage in text mode.
Arnaud Blanchard's avatar
Arnaud Blanchard committed
23
24
25
26
27
28
29

    100%(1.00) [/toto] |
    ^            
    | 49 49 49 49
    | [] [] [] []
     0%(0.000)  >
    >|#a| b| c| d|
Arnaud Blanchard's avatar
Arnaud Blanchard committed
30
31
    
Instead of `-k abcd` you can define the **size** (`-s`) of desired channel and the keys are automatically generated ( max 64).
Arnaud Blanchard's avatar
Arnaud Blanchard committed
32
33

We see the initial values are set to 49% (i.e. 0.5) and we can chenge them with the arrow.
Arnaud Blanchard's avatar
Arnaud Blanchard committed
34
35
36
You could change the initial value by changing the **neutral value** (`-N`).
You can change the **min** and **max** with -m and -M. The default **step** of one keypressed in 0.004 (~1/256) or 1 with UIN8 type.
It can be changed with `-S`.
Arnaud Blanchard's avatar
Arnaud Blanchard committed
37

Arnaud Blanchard's avatar
Arnaud Blanchard committed
38
Sometime you do not want intermediate values but only **toggle** between max and min. Then use `-T`.
Arnaud Blanchard's avatar
Arnaud Blanchard committed
39

Arnaud Blanchard's avatar
Arnaud Blanchard committed
40
41
42
43
44
from files
----------

`i_fread <filename.tsv>` reads a line of data from the file in tsv (i.e. '0.3  0.55    0.56    ' is a vector of 3 values) and creates a channel (a vector) containing these data.
If there are many lines, it updates the data as fast as possible with each time.
Arnaud Blanchard's avatar
Arnaud Blanchard committed
45
It is very fast you can be either be synchronized or using `-p` to requiert a minimal time between each update.
Arnaud Blanchard's avatar
Arnaud Blanchard committed
46
You can also use a first column describing the time in µs to read the line.
Arnaud Blanchard's avatar
Arnaud Blanchard committed
47
Finaly you can limit the number of line read by using `-n`.
Arnaud Blanchard's avatar
Arnaud Blanchard committed
48

Arnaud Blanchard's avatar
Arnaud Blanchard committed
49
To load sound or images, see [i_sndfile](https://promethe.u-cergy.fr/blaar/sndfile) and [i_pngfile](https://promethe.u-cergy.fr/blaar/png)
Arnaud Blanchard's avatar
Arnaud Blanchard committed
50

Arnaud Blanchard's avatar
Arnaud Blanchard committed
51
52
from oscillator
---------------
Arnaud Blanchard's avatar
Arnaud Blanchard committed
53

Arnaud Blanchard's avatar
Arnaud Blanchard committed
54
`i_oscillator -o/toto` generates sinusoidale oscillations and put it in the channel /toto. 
Arnaud Blanchard's avatar
Arnaud Blanchard committed
55
You can specify the frequency with `-f` and the refresh rate with `-r`.
Arnaud Blanchard's avatar
Arnaud Blanchard committed
56
57
58
The refresh rate defines how often you will update the value of the oscillator but will not change the frequency.

You can use a buffer to keep the historic of the oscillation.
Arnaud Blanchard's avatar
Arnaud Blanchard committed
59

Arnaud Blanchard's avatar
Arnaud Blanchard committed
60
61
62
63
64
from mouse
----------

`i_mouse` but you need to  be sudo for now ...

Arnaud Blanchard's avatar
Arnaud Blanchard committed
65
66
67
Generate outputs
================

Arnaud Blanchard's avatar
Arnaud Blanchard committed
68
69
70
71
72
73
to the terminal
---------------

In development ...
`o_display <blc_channel-in>` 

Arnaud Blanchard's avatar
Arnaud Blanchard committed
74
75
76
to a file
---------

Arnaud Blanchard's avatar
Arnaud Blanchard committed
77
`o_fwrite <channel> -f <filename.tsv>` create a tsv file with the data of the channel. The options are symetrical with **i_fread**.
Arnaud Blanchard's avatar
Arnaud Blanchard committed
78

Arnaud Blanchard's avatar
Arnaud Blanchard committed
79
To save sounds or images see [o_sndfile](https://promethe.u-cergy.fr/blaar/sndfile] and [o_pngfile](https://promethe.u-cergy.fr/blaar/png]
Arnaud Blanchard's avatar
Arnaud Blanchard committed
80
81


Arnaud Blanchard's avatar
Arnaud Blanchard committed
82