Sandbox S01E02.ex

From XPUB & Lens-Based wiki

Mirrored from: http://digitalcraft.wdka.nl/wiki/Sandbox_S01E02.ex

Could maybe be useful to also look at Englebarts "Mother of all demos" -- not only an instance of pushing time sharing to the limit, but also some weird use of live analog audio / video mixing + computers -- plus in fact NLS is a group working tool as well (community = collective code documenation).... Plus I'll bring "desk set" the 1957 Hollywood batch computing romcom classic.

Open Question: Do we "dogfood" our experiences: ie how do we collect our own "community memory" in this course?

(Could we collect information about using the pi in a form specific to it? IE we could post to a wiki, but how does that change potentially on a platform like one or more pi's)

Small exercise in time sharing

  • Small Groups of ~4 are randomly formed (method tbd)
  • Each group is assigned a "tool" / application to install on their pi
  • Each group connects a PI to the HRO/room network (via physical cable) & uses a monitor / keyboard to:

1. Install the selected software with apt-get 2. Create user accounts for each team member 3. Ensure ssh access is on

sudo adduser bob

and optionally...

sudo adduser bob sudo

if you want user "bob" to also be able to sudo.


Connecting to the pi via ssh

This kind of access is considered "headless" in that you don't require that the pi be plugged into a monitor. However, it can still be.


Installing software via the package manager

A range of tools to (1) learn about installing packages with apt-get, (2) come to understand the different possibilities of the Pi system. Suggested tools:

  • imagemagick (image manipulation/generation)
  • sox (audio gen/manipulation)
  • motion (web cam)
  • midge + timidity (music notation + midi synthesis)
  • festival: speech to text

Command line basics

  • ls, cd, pwd
  • less, more
  • man
  • nano

Installing software on the pi

sudo apt-get install sox
sudo apt-get install FOO

To check the list of files that have been installed:

dpkg -L FOO

Text 2 Tones: sox

http://www.raspberrypi-spy.co.uk/2013/06/raspberry-pi-command-line-audio/

Surprise, there's an audio "group"

sudo adduser bob audio

Using sox....

play -c1 -r8000 -n synth 0.25 square 220-440 vol 0.7
play -c1 -r8000 -n synth 0.25 noise vol 0.7
for i in 200 300 400; do play -c1 -r8000 -n synth 0.2 square $i vol 0.5; done

(see http://www.cyberciti.biz/faq/bash-for-loop/)

See also: http://pzwart3.wdka.hro.nl/wiki/Sox for more examples.

Setting up Video

sudo nano /boot/config.txt

Options for PAL / Overscan can be set here

Display images via ssh: fbi

http://raspberrypi.stackexchange.com/questions/8922/how-do-i-display-images-without-starting-x11

Get an image (if you don't have one) (see below to make one with imagemagick):

wget http://upload.wikimedia.org/wikipedia/commons/thumb/7/77/Cucurbita_moschata_Butternut_2012_G2.jpg/800px-Cucurbita_moschata_Butternut_2012_G2.jpg

See also: fbi, oxmplayer

sudo fbi -T 1 *.jpg

How to I stop it?

ps ax

Find the process number and ....

kill 5555

(or whatever number you see next to fbi)

You can also try:

sudo killall fbi

But make sure you're not being wiretapped ;)

Text 2 Image: imagemagick

http://www.imagemagick.org/Usage/

wget http://www.imagemagick.org/Usage/text/pango_test.txt
convert -gravity center pango:@pango_test.txt  pango_test.png

Text 2 Music: midge + timidity

Using dpkg -L midge you can see that there are several sample "source" files to try out...

 midge /usr/share/doc/midge/examples/tutorial/chords.mg

Creates a midi file, which then the command:

timidity chords.mid

will play


Text 2 Speech: festival

http://festvox.org/docs/manual-1.4.3/festival_28.html
echo "when are you going to let me out of this box" | festival --tts

Mother of all demos

Engelbart_02-450x297.jpg

Engelbart_03.jpg

turner_plate10.jpeg

http://www.press.uchicago.edu/Misc/Chicago/817415_chap4.html