Showing posts with label status. Show all posts
Showing posts with label status. Show all posts

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.

Tuesday, November 6, 2018

Darting and Fluttering around Android

Looking for Android tools and libraries has led me to the Flutter UI Framework, which looks to be Google's dice throw for the "next big thing".  I personally like Dart as a language, and anything less verbose and simpler than Java is a plus.

After working with Android Studio a while, I discovered I am more productive with vim and the command line.  Flutter environment supports a lot of development functionality with the flutter command, and so my long term habits of edit -> make -> test fit right in.

Getting up to speed in a new and rapidly changing development environment is always broadening, and I am happy to find many different approaches to design.  It looks like a lot has been learned from the Javascript struggles, and flutter seems to have a decent versioning/packaging/distribution system in place, using git.

So I am further down the rabbit hole, through the looking glass, and learning about Material Design, Reactive Programming for Dart, and the BloC Design pattern.

Once I digest this and become productive, it's back to the ArdOsc Android app to rewrite it in Flutter with Material Design, and try to get it working on the iPad as well.

Friday, August 10, 2018

Android in Wonderland

Modern software development is a complex task, and having an IDE that guides the developer can make this a bit more directed.  I imported the ardmix github java code into Android Studio 3.2 and converted it to kotlin, just to make life interesting.  The syntax is similar to java, but cleaner, and has a more modern feel.  Android Studio considers this a first class language and I was able to compile and run the app after a bit of tweaking.  I will not miss Java, and suspect Google feels the same.

The source is posted on gitlab ardosc, under the GPL3+ license.  It uses an OSC Library called NetUtil to handle the UDP communication to Ardour.  The java sources for de.sciss.net NetUtil were developed by Hanns Holger Rutz and licensed under LGPL 2.1 or later.  The original sources can be found at https://github.com/Sciss/NetUtil/.

I plan to release this as a free Google Play store app with no strings once I am finished testing, and will be using the app with the RPi3 in the field as part of the tests.  There is more conversion to do from Java idioms to Kotlin, as I begin to be comfortable with the syntax and best practices.  The mechanical conversion compiled and ran but lint finds lots of fluff and I know it can be much cleaner.

Tuesday, May 3, 2016

Ardour and the Pi

I was able to compile (waf) ardour4 on the Raspberry Pi3 and it works fine with the Cirrus Logic Audio Card.  I can record and play back in stereo using the onboard microphones and headphone output.  I will have to try my preamp and AKG condenser microphone and confirm the line in WORKS but I have confidence.

Compiling ardour is not for the fainthearted.  The dependency list is extensive and it took a while on the Pi3 but nothing seemed out of the ordinary for a project of this complexity.

If you are really interested, see http://ardour.org/current_dependencies.html for the dependencies and http://ardour.org/building_linux.html for the procedure.

I had to build a few of the dependencies:
  • atkmm-2.22.7
  • libart_lgpl-2.3.21
  • liblrdf-0.5.0
  • pangomm-2.28.4
 but raspbian has a working jack daemon and it runs fine.
Time to try some plugins and see if the whole system can handle signal processing.

Thanks to all the Ardour and Linux Audio developers who have made this possible!

Tuesday, March 15, 2016

Test functionality of current hardware and software: storage benchmarking

I can't really call a MicroSD or USB drive a disk, they are not spinning rust but nanometer feature sized flash cells.  The RPI3 appears to either use the USB interface for the MicroSD drive or there is some other limit which makes the USB and MicroSD drives perform almost identically.  The following graphs from iozone compare the SanDisk SDSQUNC 032G MicroSD card running Raspbian with a random 8GB PNY thumb drive I have on my keychain.  I formatted the USB drive with EXT4, and the MicroSD was formatted by NOOBS with EXT4 when installing Raspbian.

 Write performance is critical for recording.  Average write of 300 Mb/s for most file sizes and record sizes will be quite adequate for stereo or 4 channel recording at 192k/s by 32 bit.
MicroSD vs USB ext4 iozone write

By way of comparison, here is the SanDisk/RPI3 combination against an aging Pentium III with UDMA 100 Maxtor drives.  I have some antique systems to compare with, they recorded audio in their day as well.


RPi3 MicroSD vs Pentium III Maxtor UDMA 100 iozone write