From 2a7624eb755975f2f4b92d21fb1ff248464fe361 Mon Sep 17 00:00:00 2001 From: tTh Date: Tue, 22 Dec 2020 22:53:57 +0100 Subject: [PATCH] another big push --- chap/IRC.tex | 10 ++++++++-- chap/OSC.tex | 12 ++++++++--- chap/boot.tex | 39 ++++++++++++++++++++++++++++++++++++ chap/image.tex | 25 +++++++++++++++++++++-- chap/manpages.tex | 12 ++++++++++- chap/print.tex | 21 +++++++++++++++++++ chap/son.tex | 50 ++++++++++++++++++++++++++++++++++++++++------ chap/streaming.tex | 44 +++++++++++++++++++++++++++++++++++----- code/d-espeak.sh | 5 +++++ code/listen-osc.c | 1 + code/microcast.c | 16 +++++++++++++++ code/send-osc.c | 1 + code/takeover.liq | 19 ++++++++++++++++++ main.tex | 5 ++++- 14 files changed, 240 insertions(+), 20 deletions(-) create mode 100644 chap/boot.tex create mode 100644 chap/print.tex create mode 100755 code/d-espeak.sh create mode 100644 code/listen-osc.c create mode 100644 code/microcast.c create mode 100644 code/send-osc.c create mode 100644 code/takeover.liq diff --git a/chap/IRC.tex b/chap/IRC.tex index 5024689..4ac1752 100644 --- a/chap/IRC.tex +++ b/chap/IRC.tex @@ -7,8 +7,8 @@ \section{hybrid} \index{hybrid} -C'est le serveur utilisé par Smeuh. Une vrai galère à -configurer. +C'est le serveur anciennement utilisé par Smeuh. Il semble que +ce soit une vrai galère à configurer. On se retrouve vite dans des situations critiques, du genre un \#canal où il n'y a plus de @op, et donc, on ne peut @@ -42,3 +42,9 @@ pinpin0: çhârsèt ? Client graphique bien efficace. % ============================================================== + +\section{Les "bots"} + +Hello Dotanick. + +% ============================================================== diff --git a/chap/OSC.tex b/chap/OSC.tex index cac6bb8..5be72ba 100644 --- a/chap/OSC.tex +++ b/chap/OSC.tex @@ -5,7 +5,7 @@ Wikipedia : \textsl{OSC est un format de transmission de données entre ordinateurs, synthétiseurs, robots ou tout autre matériel ou logiciel compatible, conçu pour le contrôle en temps réel. Il utilise le réseau au travers -des protocoles UDP\index{UDP} ou TCP\index{OSC} et apporte des +des protocoles UDP\index{UDP} ou TCP\index{TCP} et apporte des améliorations entermes de rapidité et flexibilité par rapport à l'ancienne norme MIDI\index{MIDI}\dots} @@ -13,7 +13,7 @@ Actuellement, j'utilise (pour le C) \texttt{liblo}\index{liblo} qui reste simple à utiliser tout en permettant de descendre à un bas niveau. Cette bibliothèque est livrée avec deux outils que nous -allos voir maintenant. +allons voir maintenant. \section{oscdump \& oscsend} \index{oscdump}\index{oscsend} @@ -36,7 +36,13 @@ tth@debian:~$ \section{Exemple de code} -TODO\index{TODO} +Ecouter : + +\lstinputlisting[language=c]{code/listen-osc.c} + +Envoyer : + +\lstinputlisting[language=c]{code/send-osc.c} \section{Autres logiciels} diff --git a/chap/boot.tex b/chap/boot.tex new file mode 100644 index 0000000..f413a34 --- /dev/null +++ b/chap/boot.tex @@ -0,0 +1,39 @@ +\chapter{boot} + +Le boot (aka bootstrap) est le processus de démarrage d'un ordinateur +depuis la mise sous tension, jusque à l'arrivée du shell. +Il varie grandement selon l'architecture matérielle de la machine~: +\texttt{amd64} pour les pécés de tous les jours, ou bien +\texttt{ARM}\footnote{Acorn Risc Machine}\index{ARM} comme sur +le \textsl{Raspeberry Pi}. + + +\begin{quote} +\textbf{boot :}\footnote{http://www.catb.org/jargon/html/B/boot.html} +\textit{[techspeak; from ‘by one's bootstraps’]} +To load and initialize the +operating system on a machine. This usage is no longer jargon +(having passed into techspeak) but has given rise to some derivatives +that are still jargon. +\end{quote} + + +\section{amd64}\index{amd64} + +Voir Grub, le bootloader. + +\section{ARM} + +XXX\index{XXX}. + +\section{rc.local} + + +L'exécution de ce script est la toute dernière étape du démarrage d'un +système de la famille Unix\index{Unix} avant le passage au +mode multi-utilisateur. + +\textsl{Spécial dedikass to Fred Fermion} + +Et dans ce contexte (la fin du boot), que peut-on faire à partir du +rc.local ? \ No newline at end of file diff --git a/chap/image.tex b/chap/image.tex index 3ac8d00..c230756 100644 --- a/chap/image.tex +++ b/chap/image.tex @@ -98,7 +98,8 @@ language interpreter. gmic: GREYC's Magic for Image Computing.} \index{XXX} -Existe aussi en plugin pour Gimp\index{Gimp}. +Existe aussi en plugin pour Gimp\index{Gimp} avec une interface +pleine de curseurs et de boutons. % ------------------------------------------------------------------- @@ -122,6 +123,8 @@ for ((y=0; y<250; y++)) { \subsection{Questions} Comment faire un \textsl{resize} avec NetPBM ? +Est-il nécessaire d'apprendre la bibliothèque de fonctions +\texttt{libnetpbm} ? % ------------------------------------------------------------------- @@ -133,11 +136,29 @@ j'utilise pour lire ce format de fichier la bibliothèque \texttt{pnglite} qui a de gros soucis avec beaucoup de ceux-ci, par exemple ceux qui sont en \texttt{sRGB} crées par des outils essentiels comme POVray\index{POVray}. +Il serait bon de voir la \texttt{libpng} officielle. -pngcrush ? +pngcrush ? optipng ? \texttt{pngtopnm \$png | pnmtopng > \$goodpng} +% ------------------------------------------------------------------- + +\section{Tag Image File Format} \index{TIFF} \label{TIFF} + +\begin{quote} +Yes, but tiffcp is by far the most significant case. And perhaps one of the +most used of the tools. I may not be impartial on this, though :-) because I +use it heavily. +\end{quote} + +\begin{verbatim} + tiffcp combines one or more files created according to the Tag Image + File Format, Revision 6.0 into a single TIFF file. Because the output + file may be compressed using a different algorithm than the input + files, tiffcp is most often used to convert between different compres‐ + sion schemes. +\end{verbatim} diff --git a/chap/manpages.tex b/chap/manpages.tex index af42e5f..2431807 100644 --- a/chap/manpages.tex +++ b/chap/manpages.tex @@ -2,10 +2,20 @@ \index{man} \label{chap:manpages} -Voir \texttt{roff}\index{roff} en page \pageref{roff}. + +man is the system's manual pager. Each page argument given to man is +normally the name of a program, utility or function. The manual page +associated with each of these arguments is then found and displayed. A +section, if provided, will direct man to look only in that section of +the manual. The default action is to search in all of the available +sections following a pre-defined order ("1 n l 8 3 2 3posix 3pm 3perl +3am 5 4 9 6 7" by default, unless overridden by the SECTION directive +in /etc/manpath.config), and to show only the first page found, even if +page exists in several sections. \section{Un exemple ?} XXX\index{XXX} +Voir \texttt{roff}\index{roff} en page \pageref{roff}. diff --git a/chap/print.tex b/chap/print.tex new file mode 100644 index 0000000..a4151fd --- /dev/null +++ b/chap/print.tex @@ -0,0 +1,21 @@ +\chapter{\texttt{lp0 on fire!}} + +L'impression sour Linux semble avoir plusieurs personnalités. +La chaine logicielle mise en œuvre est parfois étonnament +complexe, et ls système par defaut, \texttt{CUPS}, se contrôle +par une interface Web. + +\section{CUPS} \index{CUPS} + + + + +\section{Coté matériel} + + + +\section{Pretty printers}. + + + + diff --git a/chap/son.tex b/chap/son.tex index 91a724d..a1d0a3d 100644 --- a/chap/son.tex +++ b/chap/son.tex @@ -44,6 +44,27 @@ arecord -D plughw:CARD=Snowball,DEV=0 -v -r 22050 foo.wav arecord -D plughw:CARD=H4,DEV=0 -v -c 2 -f S16_LE -r 44100 foo.wav \end{verbatim} +\subsection{Du code...} + +\begin{verbatim} + int + main() + {float f + ;char c;int + d,o;while(scanf( + "%d%c%d ",&d,&c,&o) +>0){c&=31;for(f=!(c>>4)*55,c=(c*8/5+8)%12+o* + 12-24;c--;f*=1.0595); + for(d=16e3/d;d--; + putchar(d*f + *.032)) + ;}} +\end{verbatim} + +https://zserge.com/posts/etude-in-c/ + +https://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html + \subsection{Le reste} Et quand on regarde par la lorgnette du programmeur, on découvre @@ -119,8 +140,6 @@ Elle supporte une grande variété de formats. \lstinputlisting[language=C]{code/ao_example.c} - - %------------------------------------------------------------------ \section{Ladspa} @@ -183,8 +202,13 @@ clipping and to normalise the audio}. voies mono en un fichier stéréo. \texttt{-M} est l'abréviation de \texttt{--combine merge}. -Question en attente : comment combiner huit pistes monophoniques -en un seul fichier ? +Dupliquer +la piste d'un fichier mono pour obtenir un fichier stéréo : +"\texttt{sox - -t wav -b 16 - remix 1 1}" avec le premier tiret +qui dit de prendre l'entrée standard + +Questions en attente : comment combiner huit pistes monophoniques +en un seul fichier contenant ces 8 pistes ? %------------------------------------------------------------------ @@ -192,7 +216,8 @@ en un seul fichier ? \section{espeak} \index{espeak} -Logiciel de synthèse vocale. +Logiciel de synthèse vocale. Mais c'est pas comme un +spo256al2, hélas. \begin{verbatim} tth@plop:~/RADIO$ espeak --voices=fr @@ -201,12 +226,25 @@ Pty Language Age/Gender VoiceName File Other Langs 7 fr M french-mbrola-1 mb/mb-fr1 7 fr F french-mbrola-4 mb/mb-fr4 5 fr-be M french (Belgium) fr-be +tth@plop:~/RADIO$ cat hello.txt | espeak \end{verbatim} - + +Comme à l'accoutumée, nous allons chercher un contexte d'utilisation +futile et réjouissant. Le texte qui sera « parlé » sera la sortie +de la commande \texttt{ddate}\index{ddate}% +\footnote{outil indispensable de la vie numérique +\texttt{http://www.subgenius.com/}}, avec une voix +d'outre-monde, sur un seul canal, ce que nous pouvons entendre avec +"\texttt{echo \$(ddate) | espeak-ng}". + + %------------------------------------------------------------------ +\section{ecasound} \index{ecasound} +%------------------------------------------------------------------ + \section{Pour finir...} En conclusion, le son avec Linux, c'est un peu la grande foire. diff --git a/chap/streaming.tex b/chap/streaming.tex index 58fabaa..9ad0d4a 100644 --- a/chap/streaming.tex +++ b/chap/streaming.tex @@ -53,10 +53,11 @@ délicat à comprendre au premier abord~: \texttt{https://www.liquidsoap.info/} \begin{quote} -Liquidsoap is an extensible and flexible audio stream generator, mainly -used for streaming to a shoutcast/icecast server. -It is also possible -to output in a file, to speakers or as raw PCM stream. +Liquidsoap is an extensible and flexible audio stream generator, +mainly used for streaming to a shoutcast/icecast server. +It is also possible to output in a file, to speakers or as +raw PCM stream. + liquidsoap can perform any audio processing, mixing streams together, applying filters, generating sound procedurally, @@ -159,6 +160,8 @@ Il est également possible, avec liquidsoap, d'interrompre la diffusion d'une playlist à partir d'une autre source (fichier ou entrée audio), eventuellement externe. +\lstinputlisting{code/takeover.liq} + \subsection{trucs divers} Que signifie ce message : \textbf{That source is fallible.} ? @@ -197,6 +200,11 @@ XXX\index{XXX} que nous pouvons mettre dans le XML. le microphone USB \textsc{Snowball} utilisé dans cet exemple, il NE faut PAS mettre \textsl{downmix} à 1\dots +Et si vous souhaitez dupliquer une entrée à un seul canal +(genre un micro usb) por obtenir une sortie stéréo, ça ne +semble pas possible fin 2020\index{2020}. Il serait temps +de songer à écrire un patch\index{patch}. + %------------------------------------------------------------- \subsection{Ezstream} @@ -222,6 +230,15 @@ interface (e.g. sound card), encodes it and sends it to a streaming server. \subsection{VLC} \index{vlc} +VLC est le « cône de chantier » du multimédia. + +%------------------------------------------------------------- +\subsection{butt} +\index{butt} + +Du clickaconvi qui plante en X remote ;( mais sinon une +interface graphique simple et facile d'emploi. + %------------------------------------------------------------- \subsection{idjc} @@ -239,12 +256,29 @@ with a crossfader, a jingle player, microphone signal processing Cool Mic \texttt{https://coolmic.net/} ? +Mais il faut avoir quelques connaissances en \textsc{modernophone} +pour arriver à tenter de comprendre pouquoi ça ne fonctionne pas, +alors que tout semble correct. + + %==================================================================== \section{libshout}\index{libshout}\label{libshout} -Mais c'est quoi ?\index{XXX} +Libshout c'est quoi ? Ah, chers amis de la radio en ligne, +c'est une porte +ouverte facilitant l'accès en direction du monde sonore extérieur, +comme le précise clairement sa documentation~: + +\begin{quote} +Libshout is a library for communicating with and sending data to an +icecast server. It handles the socket connection, the timing of the +data, and prevents bad data from getting to the icecast server. +\end{quote} + +\lstinputlisting[language=c]{code/microcast.c} + %==================================================================== diff --git a/code/d-espeak.sh b/code/d-espeak.sh new file mode 100755 index 0000000..8eabf39 --- /dev/null +++ b/code/d-espeak.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +TEXTE=$(ddate) + +echo $TEXTE | espeak-ng diff --git a/code/listen-osc.c b/code/listen-osc.c new file mode 100644 index 0000000..e6af197 --- /dev/null +++ b/code/listen-osc.c @@ -0,0 +1 @@ +/* LISTEN OSC */ diff --git a/code/microcast.c b/code/microcast.c new file mode 100644 index 0000000..fdf6511 --- /dev/null +++ b/code/microcast.c @@ -0,0 +1,16 @@ +/* + * microcast.c + */ + +#include +#include +#include + +#include + +int main(int argc, char *argv[]) +{ + + +return 1; +} diff --git a/code/send-osc.c b/code/send-osc.c new file mode 100644 index 0000000..d97b1b1 --- /dev/null +++ b/code/send-osc.c @@ -0,0 +1 @@ +/* SEND OSC */ diff --git a/code/takeover.liq b/code/takeover.liq new file mode 100644 index 0000000..a374324 --- /dev/null +++ b/code/takeover.liq @@ -0,0 +1,19 @@ +# +# TAKEOVER.LIQ +# +default = single("files/changer-monde.ogg") +liste = playlist(mode="random", "playlist.txt") +# +# point d'entree pour le live +# +set("harbor.bind_addr", "localhost") +live = input.harbor("input", port=8088, + password="thegreatquux") +radio = fallback( track_sensitive=false, + [live, liste, default] ) +output.icecast( %vorbis, + host = "porno.mixart-myrys.org", + port = 8000, + password = "XXXXXXXXXXX", + mount = "/changer-monde", + radio) diff --git a/main.tex b/main.tex index a1c4fe5..3c17b82 100644 --- a/main.tex +++ b/main.tex @@ -85,8 +85,10 @@ en ligne sur le site du Tetalab. Your mileage may vary\dots % peut-être trouver un ordre des chapitres plus logique ? % -% \input{chap/shell} +\input{chap/boot} +\input{chap/shell} % \input{chap/editeurs} +\input{chap/manpages} \input{chap/son} \input{chap/image} \input{chap/reseau} @@ -102,6 +104,7 @@ en ligne sur le site du Tetalab. Your mileage may vary\dots \input{chap/video} % \input{chap/graphisme} \input{chap/gnuplot} +\input{chap/print} \input{chap/webcam} % \input{chap/SCSI} \input{chap/X11}