pd-extended on Raspberry Pi

notes

Using installation instructions from Pd site:

http://puredata.info/downloads/pd-extended-0-43-3-on-raspberry-pi-raspbian-wheezy-armhf

Installation worked fine. I tried running the GUI under xterm and it was a disaster. Then, using this post, I was able to get a test patch (sine wave with LFO) running in terminal mode:

http://log.liminastudio.com/programming/running-puredata-on-the-raspberry-pi

Note: I changed the actual command to this due to the fact I’m running pd-extended and a USB sound card:

pd-extended -nogui -noadc testPatch.pd

This post from same source has instructions for installing pd-extended (disaster) but a very nice version of the test patch called testPatchExtended.pd

http://log.liminastudio.com/writing/tutorials/how-to-build-pd-extended-on-the-raspberry-pi

(another update) running Midi:

To run midi you need to specify the device on the command line. First I plugged in the m-audio key station 49 and rebooted RPi

To get a list of devices use:

pd-extended -nogui -listdev

Then to run a patch with midi

pd-extended -nogui -noadc -midiindev 1 testMidi.pd

Here is a page with more information on command line options

http://crca.ucsd.edu/~msp/Pd_documentation/x3.htm#s4

(another update) Testing with Griffin iMic. Bad news when doing an ADC->DAC passthrough, sample rates above 32000 don’t work in stereo. However 44100 and 48000 sound fine in mono.

At the higher rates in stereo, the audio breaks up. Oh well. Need to try the Behringer audio box, but I’m assuming there will be no difference. Only possibility would be to somehow devote more system resources to audio.

raspberry pi – external sound card sucess

Installed a Griffin iMic USB sound card on Raspberry Pi today.

Here’s how:

  • plug in imic
  • Edit alsa  config file so that imic is default sound cart
  • test

Details

For editing alsa, follow instructions at beginning of this post for editing /etc/modprobe.d/alsa-base.conf 

But you can stop following the instructions after the first reboot.

http://www.jackenhack.com/raspberry-pi-usb-audio-quality-problems/

For testing, use this command:

sudo aplay /usr/share/sounds/alsa/Front_Center.wav

 

 

 

 

Arduino INPUT_PULLUP mode

notes

When reading the value of a switch with Arduino, its useful to set the INPUT_PULLUP mode so you don’t need to use an external pullup resistor. By the way, the internal pull-up resistor is 20K ohms.

See this tutorial:

http://arduino.cc/en/Tutorial/InputPullupSerial

If its not clear what a pull-up resistor does,  read the links on this forum post.

http://arduino.cc/forum/index.php/topic,22274.0.html

Everybody has their own way to explain it. I would say that when the switch is open, the pull-up resistor weakly pulls the logic value high, so you don’t get random signal readings.

 

Arduino pachube (cosm) feed for musical stairs

(update) the feed is working – I changed the datastream name from sensor_value to count – and just had it upload a random value every time for testing.

Some initial testing with the Ethernet shield encountered missing libraries when compiling the example sketch which cosm.com provides when setting up an Arduino type feed.

Here is the forum post which explains which libraries are missing:  http://community.cosm.com/node/1694

and here is the helpful quote…

You should try using new official Cosm library for Arduino.

You can download a snapshot zip file here:
https://github.com/cosm/cosm-arduino/zipball/master

You will also need this HTTP library:
https://github.com/amcewen/HttpClient/zipball/master

See here for more details on how to install a 3rd-party
library on different OS:
http://arduino.cc/en/Guide/Libraries

You will find a bunch of usefull examples within the
Cosm library. Please let me know if you have any questions.