Extend the README.
[software/sndxfer.git] / README
1 This library aims to provide procedures to easily send a stream of
2 bytes via the analogue audio output and decode an analogue signal
3 received over the line input to a stream of bytes.
4
5 The output is an amplitude-modulated 48kHz signal. Every byte is
6 split into 2-bit tuples, which are then mapped to an amplitude level.
7
8 * Enter development environment with Guix
9 The easiest way to create an environment in which all development
10 dependencies are available is GNU Guix. A package expression is
11 defined in =guix.scm= so all you need to do is execute the following
12 command to create a subshell with all development dependencies:
13
14 #+BEGIN_SRC sh
15 guix environment -l guix.scm
16 #+END_SRC
17
18 * Bootstrap
19 sndxfer uses Autotools. Generate the =configure= script like this:
20
21 #+BEGIN_SRC sh
22 autoreconf -vif
23 #+END_SRC
24
25 * Build
26 After bootstrapping issue the usual commands of the GNU build system:
27
28 #+BEGIN_SRC sh
29 ./configure
30 make
31 #+END_SRC
32
33 * Test
34 First, you should configure your audio device to use the highest
35 supporting sampling rate. In the case of my audio hardware this is
36 96kHz. This is done by creating a file named =.asoundrc= in your home
37 directory with the following contents:
38
39 #+BEGIN_EXAMPLE
40 pcm.sndxfer {
41 format U8_LE
42 rate 96000
43 type hw
44 card 0
45 device 0
46 }
47 #+END_EXAMPLE
48
49 sndxfer will only use a PCM plug device with the name “sndxfer”.
50
51 Then connect an audio cable to your default audio interface and
52 connect two oscilloscope probes to each channel. Then generate a test
53 signal with:
54
55 #+BEGIN_SRC sh
56 ./test.sh
57 #+END_SRC
58
59 Print the generated test signal with
60
61 #+BEGIN_SRC sh
62 export GUILE_LOAD_PATH=$PWD:$GUILE_LOAD_PATH
63 guile -e main -s test.scm print
64 #+END_SRC