Monday, December 24, 2018

Audio Pi in the field

I put the RPi, battery, mike and android in my bag and took the system into the field for some real world testing.  Using WiFi on the system as an access point with hostapd allowed android to connect to RPi directly, and eliminated the need to use the bluetooth stack on both the RPi and Android.  It's a straightforward setup in alpine linux, with /etc/conf.d/hostapd pointing to /etc/hostapd/hostapd.conf.  That file sets the ssid=audiopi, and /etc/hostapd/hostapd.wpa_psk sets the WPA key.

DHCP is provided for the AP with dhcpd, the file /etc/dhcp/dhcpd.conf has this stanza for the subnet 192.168.4.0.

 subnet 192.168.4.0 netmask 255.255.255.0 {
  option domain-name "audiopi";
 range 192.168.4.10 192.168.4.248;
}

The ArdOsc app is configured to use UDP with the 192.168.4.1 IP address configured in /etc/init.d/setup_hostap.  WiFi range is good enough for local control, and I had no issues with network connectivity or performance.

I pushed the setup_hostap script to my gitlab audiopi repository,
https://gitlab.com/schessman/audiopi

#!/bin/sh
#
# enable cirrus_logic audio
/etc/init.d/audiopi_settings.sh 

# shutdown wlan0 client, switch to hostap
/etc/init.d/wpa_supplicant stop
ifdown wlan0
/etc/init.d/hostapd start
ip addr add 192.168.4.1 dev wlan0
ip route add default dev wlan0

# enable DHCP and access
/etc/init.d/dhcpd start

# conserve power
echo /etc/init.d/usb_power stop

I had good success with recording at a jam session, mic clipped to the bag and placed in the center of the group; and also at a few rehearsals where I clipped the mic to a music stand to bring the vocals to the foreground.  For the best results, taking a stereo line in feed from a mixing board connected to more mikes makes the most sense.  I was satisfied with the results from the Stereo Sony ECMCS3, and burned a couple CDs from the rehearsal sessions.  Ardour is a great tool for mastering, the plugin set is extensive and well worth the effort to make it work.

I also went to a Google Developer Group meetup with the RPi in a pocket and had the only wearable computer (besides all the android phones).   The blinking lights on the RPi combined with the volume bar lights in the ArdOsc app make for a good casual demo.

Next I plan to present this at the Monthly NovaLug meeting on 
Saturday, February 9, 2019.  I'll post the slides from the talk on the gitlab audiopi repository.