Satellite CCRMA First Steps

From CCRMA Wiki
Jump to: navigation, search

By Edgar Berdahl and Wendy Ju

First steps for getting Satellite CCRMA up and running.


Required Hardware for BeagleBoard xM

  • 4GB micro SDHC card (Find the appropriate Satellite CCRMA SDHC card image on the main page.)
  • Retractable USB cable (e.g. from GT Max)
  • Ethernet cable
  • 2.5A 5V switching power adaptor to plug into the Beagle Board
  • Solderless breadboard


Required Hardware for Raspberry Pi

  • 8GB SDHC card (Find the appropriate Satellite CCRMA SDHC card image on the main page.)
  • Retractable USB cable (e.g. from GT Max)
  • Ethernet cable
  • Either a USB micro cable to power the Raspberry Pi from your laptop or a high-quality micro USB power supply (Note: Do not use cell phone battery chargers to power the Raspberry Pi. This will adversely affect the audio quality.)
  • Solderless breadboard





Powering Up For The First Time

Plug the power cable from the 5V supply into the hub. You will see some lights turn on, flickering every now and then. This means that Satellite CCRMA is booting up.


How To Connect

How To Connect


Test Run

Try issuing some of the following commands to explore the possibilities enabled by Satellite CCRMA:

  • qjackctl & (Opens up a GUI for starting the Jack audio server -- only use this with Beagle Board xM, use ALSA on Raspberry Pi)
  • pd & (Starts pure data extended, an environment for graphical programming for sound synthesis)
  • ls /dev/tty* (To verify that the Arduino Nano is showing up on /dev/ttyUSB0)
  • arduino & (Starts the Arduino software for programming the Arduino Nano microcontroller attached via USB)
    • For instance, you could use the Arduino software to install some default firmware. It can be found under File|Examples|Firmata|StandardFirmata.
  • Run audacity & to edit audio samples (only works on Beagle Board xM!).
  • Explore employing Faust to automatically generate audio DSP code in a variety of environments. The source code for Faust is in /usr/src/faust.
  • Run the example script in the directory ~/chuck_examples to takes the ChucK audio programming language for a spin.
  • Type ping yahoo.com to see if you are properly sharing your laptop's Internet connection with Satellite CCRMA. If you cannot ping yahoo, then please see the troubleshooting section.
  • Use the wget command to directly download files from the Internet via URLs.
  • Use scp to copy files to and from your kit.
  • See below for more tips on installing and/or compiling more software.


Installing New Software

If your favorite linux software has been compiled for the ARM architecture, it may be available by way of the apt-get utility.

  • To get a list of packages available on the OMAP's ARM architecture, type sudo apt-cache pkgnames
  • You will notice that this list is way too long to look at. You can pipe it to the text file using the command

sudo apt-cache pkgnames > packages.txt and then look at it using emacs packages.txt, or you search for a particular package, such as sudo apt-cache pkgnames | grep emacs.

  • Or you can compile linux software yourself on the Beagleboard. The gcc, g++ tools etc. are already installed.

Type the df command. You can see that there is not a whole lot more than 1GB available on the SD card, so you should only install software if you decide that you need it.


Autonomous Mode

It is possible to make Satellite CCRMA run a default program at startup. This way you can prototype devices that are fully autonomous of other systems!

Here we show how to cause the Jack audio server and Pure data (with a default patch) to start automatically after the kit boots up.

In the terminal, change to the on-startup directory by typing cd ~/on-startup and type ls -la to see what files are in there. You can see that the link (aka alias) default_patch.pd points to windy-day.pd. In order to enable the default patch to load on boot, rename the file load_default_patch_disabled to load_default_patch using the command mv load_default_patch_disabled load_default patch.

The cat command can be used to display the contents of any ASCII file. To look at the contents of load_default_patch, type cat load_default_patch. As you can see, it starts up Jack using the text-based jackd instead of qjackctl, and then it loads default_patch.pd in pd with the graphical user interface (GUI) disabled.

To test it, just reboot the kit by typing sudo reboot and entering the password temppwd. As it is rebooting, plug a pair of ear buds, headphones, or loudspeakers into the 1/8" (2.54mm) jack labeled AUDIO OUT on the beagleboard. Within about a minute, your kit should be fully rebooted. To check this, you can try logging in with SSH. Either way, it should start running windy_day.pd upon startup.

Once your kit is fully rebooted, if you touch the anaog input pins A0-A7 on the Arduino Nano, it should start making some sound. However, unless you connect up a sensor circuit to some of the analog inputs, the exact behavior may be complicated. In particular, it will depend on the electrical properties of your body (how much sweat is on your fingers, whether you are touching a grounded device such as a laptop with any part of your body. Ask for help if you cannot get any sound.

Finally, log back into Satellite CCRMA using the same command as always ssh -XY ccrma@192.168.105.106. Type ps -A at the prompt to get a list of the currently running processes. jackd is the Jack audio sound server, and pdextended is the pd process. To stop the default patch from running, type ./stop_default. To see how stop_default works, type cat stop_default. (The ./ was necessary in order to run the script stop_default because the current user directory ~ is not in the user path, so linux needs the ./ to indicate to look for stop_default in the current directory.)

Halt Your Board When Finished!

When you are finished, it is probably best to shut down Satellite CCRMA by issuing the command sudo halt, just as you would shut down a linux desktop machine. This ensures that any data that is scheduled to be written to the SD card is written right away.



Appendix: Troubleshooting

Tips:

  • Type dmesg to see if there are any weird messages.
  • Check if the Jack audio server has crashed. If so, then restart it.
  • Type ls /dev/tty* to make sure that the Arduino is showing up on /dev/ttyUSB0.

Solutions:

  • If you are running out of space on the SD card, you can free up some space by deleting items in /usr/src. For instance, all of the files needed for building Pure Data Extended are rather large.
  • If you are unable to access the internet from Satellite CCRMA, you may need to change the nameservers specified in /etc/resolv.conf


Appendix: Writing the Image to an SD Card

See How To Get Satellite CCRMA