Outils pour utilisateurs

Outils du site


cubieboard:machinasson

Machinasson

Suite à la collaboration avec Dominique Leroy j'ai travaillé sur la Cubie pour en faire une machine simple à mettre en place, installer, ré-installer, pour des installations sonores sur une base de puredata extended.

La particularité est un paramétrage de .asoundrc pour avoir 4 voix en sortie et 1 entrée micro son avec 3 carte son USB, sans avoir recours à jackd.

Méthode d'installation rapide d'une cubieboard contenant :

  • un GNU/Linux Debian armhf
  • pd-extended
  • un alsa configuré pour 2 cartes son USB, d'ou 4 sorties
  • un patch fait par Dominique Leroy pour une installation sonore
  • un bureau fluxbox accessible par vnc sur le réseau montrant le patch en fonction
  • un xpad pour laisser des annotations sur l'installation
  • 2 alsamixer

L'image de la SD d'installation (4Go)

ATTENTION, Booter sur la SD efface directement la nand de la cubie board pour y placer le système.

à venir

Installation

  1. booter sur la SD
    1. la led verte clignote tant que l'installation est en cours et la led bleue clignote sur la lecture de la SD
    2. attendre un certain temps
    3. les leds bleu et verte s'éteignent
  2. enlever la SD
  3. connecter les 2 cartes usb audio ( optionnel )
  4. rallumer, vous devriez entendre du son au bout de 1 min

Paramètres

  • utlisateurs et accès
    • root , pass = toor
    • debian , pass = debian
    • vncviewer:1 pass = gnulinux
    • ssh root@192.168.1.46 pass = toor
  • accès réseau
    • une adresse ip fixe 192.168.1.46 , écrite en dur dans le fichier /etc/rc.local par ifconfig eth0:1 192.168.1.46
    • une adresse ip venant de votre serveur DHCP si présent

Lancements automatiques

pd-extended , xpad et alsamixer sont lancés par /home/debian/.vnc/xstartup

  1. /etc/rc.local lance
    1. vncserver qui lance
      1. ~./vnc/xstartup
        1. xpad
        2. alsamixer 2 fois
        3. pd-extended
          1. ouvre le patch

~./vnc/xstartup

#!/bin/sh

xrdb $HOME/.Xresources
xsetroot -solid grey
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &
# Fix to make GNOME work
export XKL_XMODMAP_DISABLE=1
#/etc/X11/Xsession
xterm -e "/home/debian/pd-start.sh"  -title "PD-EXTENDED" &
xterm -e "alsamixer -c 2" -title "mixeur carte 2" &
xterm -e "alsamixer -c 3" -title "mixeur carte 3"&
xpad &
fluxbox

Attention , les entrées micro ici doivent être en mute, pd la gére directement.

Paramètres des cartes audio USB

le .asoundrc

Il y a 3 cartes son usb connectées

more /proc/asound/cards
 0 [Device         ]: USB-Audio - C-Media USB Audio Device
                      C-Media USB Audio Device at usb-sw-ohci-1, full speed
 1 [sun4isndhdmi   ]: sun4i-sndhdmi - sun4i-sndhdmi
                      sun4i-sndhdmi
 2 [Device_1       ]: USB-Audio - Generic USB Audio Device
                      Generic USB Audio Device at usb-sw-ehci-1.2, full speed
 3 [Device_2       ]: USB-Audio - Generic USB Audio Device
                      Generic USB Audio Device at usb-sw-ehci-1.4, full speed
# .asoundrc create a virtual four-channel device with two sound devices:
# his is in fact two interleaved stereo streams in
# different memory locations, so JACK will complain that it
# cannot get mmap-based access. see below.

pcm.usb1 {
  type hw
  card "Device_1"
  channels 2
}
pcm.usb2 {
  type hw
  card "Device_2"
  channels 2
}
pcm.usb3 {
  type hw
  card "Device"
  channels 2
}
pcm.multi {
        type multi;
        slaves.a.pcm "usb1";
        slaves.a.channels 2;
        slaves.b.pcm "usb2";
        slaves.b.channels 2;
        bindings.0.slave a;
        bindings.0.channel 0;
        bindings.1.slave a;
        bindings.1.channel 1;
        bindings.2.slave b;
        bindings.2.channel 0;
        bindings.3.slave b;
        bindings.3.channel 1;
}

# JACK will be unhappy if there is no mixer to talk to, so we set
# this to card 0. This could be any device but 0 is easy.

ctl.multi {
        type hw;
        card 0;
}

# This creates a 4 channel interleaved pcm stream based on
# the multi device. JACK will work with this one.

pcm.ttable {
        type route;
        slave.pcm "multi";
        slave.channels 4;
        ttable.0.0 1;
        ttable.1.1 1;
        ttable.2.2 1;
        ttable.3.3 1;
}
# see above.
ctl.ttable {
        type hw;
        card 0;
}

pd-extended est lancé avec l'option -alsaad multi pour lui permettre de discuter directement avec les 4 voix

Le fichier .pdextended

audioapi: 1
noaudioin: False
audioindev1: 1 1
noaudioout: False
audiooutdev1: 8 4
audiobuf: 100
rate: 44100
callback: 0
blocksize: 64
nomidiin: True
nomidiout: True
path1: /var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType
npath: 30
standardpath: 1
verbose: 0
loadlib1: Gem
loadlib2: cyclone
loadlib3: zexy
loadlib4: creb
loadlib5: cxc
loadlib6: iemlib
loadlib7: list-abs
loadlib8: mapping
loadlib9: markex
loadlib10: maxlib
loadlib11: mjlib
loadlib12: motex
loadlib13: oscx
loadlib14: pddp
loadlib15: pdogg
loadlib16: pmpd
loadlib17: sigpack
loadlib18: smlib
loadlib19: unauthorized
loadlib20: pan
loadlib21: hcs
loadlib22: jmmmp
loadlib23: ext13
loadlib24: ggee
loadlib25: iem_anything
loadlib26: ekext
loadlib27: flatgui
loadlib28: chaos
loadlib29: pdp
nloadlib: 29
defeatrt: 0
flags:
cubieboard/machinasson.txt · Dernière modification : 2024/02/09 17:10 de 127.0.0.1