README.md 2.85 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
7
8
from files
----------

Arnaud Blanchard's avatar
Arnaud Blanchard committed
9
`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.
Arnaud Blanchard's avatar
Arnaud Blanchard committed
10
If there are many lines, it updates the data as fast as possible with each time.
Arnaud Blanchard's avatar
Arnaud Blanchard committed
11
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
12
13
14
You can also use a first column describing the time in µs to read the line.
Finaly you can limit the number of line read by using -n.

Arnaud Blanchard's avatar
Arnaud Blanchard committed
15
To load sound or images, see [i_sndfile](http://blaar.org/../sndfile) and [i_pngfile](http://blaar.org/../png)
Arnaud Blanchard's avatar
Arnaud Blanchard committed
16
17

from keyboard
Arnaud Blanchard's avatar
Arnaud Blanchard committed
18
19
20
-------------

`i_keyboard` changes values with the keyboard arrows or specific keys:
Arnaud Blanchard's avatar
Arnaud Blanchard committed
21
22
23
24

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

Arnaud Blanchard's avatar
Arnaud Blanchard committed
25
26
27
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
28

Arnaud Blanchard's avatar
Arnaud Blanchard committed
29
i_keyboard has many options (use `i_keyboard -h` to list them) we illustrate some:
Arnaud Blanchard's avatar
Arnaud Blanchard committed
30
31
32

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

Arnaud Blanchard's avatar
Arnaud Blanchard committed
33
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
34
35
36
37
38
39
40

    100%(1.00) [/toto] |
    ^            
    | 49 49 49 49
    | [] [] [] []
     0%(0.000)  >
    >|#a| b| c| d|
Arnaud Blanchard's avatar
Arnaud Blanchard committed
41
42
    
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
43
44

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
45
46
47
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
48

Arnaud Blanchard's avatar
Arnaud Blanchard committed
49
Sometime you do not want intermediate values but only **toggle** between max and min. Then use `-T`.
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
56
57
58
You can specify the frequency with -f and the refresh rate with -r.
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
60
61
62
63
64
65
66


Generate outputs
================

to a file
---------

Arnaud Blanchard's avatar
Arnaud Blanchard committed
67
`o_fread <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
68

Arnaud Blanchard's avatar
Arnaud Blanchard committed
69
To save sounds or images see [o_sndfile](http://blaar.org/../sndfile] and [o_pngfile](http://blaar.org/../png]
Arnaud Blanchard's avatar
Arnaud Blanchard committed
70
71


Arnaud Blanchard's avatar
Arnaud Blanchard committed
72