Compiling PureData patches for BeagleRT » History » Version 7

Christian Heinrichs, 2015-12-05 01:20 PM

1 1 Christian Heinrichs
h1.  Compiling PureData patches for BeagleRT
2 1 Christian Heinrichs
3 1 Christian Heinrichs
h2.  Getting everything up and running
4 1 Christian Heinrichs
5 1 Christian Heinrichs
Follow the following steps to get everything up and running on your Beaglebone Black:
6 1 Christian Heinrichs
7 3 Christian Heinrichs
*1. Download the _heavy-beaglert_ archive from https://code.soundsoftware.ac.uk/attachments/download/1543/heavy-beaglert_2015-07-17.zip*
8 1 Christian Heinrichs
9 4 Christian Heinrichs
* Extract the archive (and remember where you extracted it to)
10 2 Christian Heinrichs
11 2 Christian Heinrichs
*2. Make sure python is installed:*
12 2 Christian Heinrichs
13 1 Christian Heinrichs
* If you are on windows, you will need a tool that allows you to use ssh and some other basic shell tools. The shell scripts in this project have been tested with *mingw* (http://mingw.org) . You will want to note that in order to paste code on the terminal you have to right click on the terminal's title bar and navigate the menu to edit->paste
14 1 Christian Heinrichs
15 1 Christian Heinrichs
* If not on Windows, type `which python` in a terminal window. If not installed, follow instructions here: https://wiki.python.org/moin/BeginnersGuide/Download
16 1 Christian Heinrichs
17 1 Christian Heinrichs
* Install the most up-to-date version of the *requests* python package (version 2.7.0). You can get it from http://docs.python-requests.org/en/latest/user/install/
18 1 Christian Heinrichs
     or typing the following in a terminal window (make sure it is not currently installed):
19 1 Christian Heinrichs
20 1 Christian Heinrichs
     On Linux/MacOS:
21 1 Christian Heinrichs
@curl -OL https://github.com/kennethreitz/requests/zipball/master && unzip master && cd kenneth* && sudo python setup.py install@
22 1 Christian Heinrichs
       
23 1 Christian Heinrichs
     On Windows:
24 1 Christian Heinrichs
       @curl -OL https://github.com/kennethreitz/requests/zipball/master && unzip master && cd kenneth* && python setup.py install@
25 1 Christian Heinrichs
 
26 2 Christian Heinrichs
*3. Create an account on enzienaudio.com:*
27 1 Christian Heinrichs
28 1 Christian Heinrichs
* Go to http://www.enzienaudio.com
29 1 Christian Heinrichs
30 1 Christian Heinrichs
* Click *Login* on the top right corner of the page
31 1 Christian Heinrichs
32 1 Christian Heinrichs
* Create a new account
33 1 Christian Heinrichs
34 1 Christian Heinrichs
* Create a new patch and call it **bbb** _(N.B. compiling won't work if you use a different name)_
35 1 Christian Heinrichs
36 6 Christian Heinrichs
(steps 4-6 are deprecated - check the slides instead)
37 6 Christian Heinrichs
[[https://goo.gl/59hShW]]
38 1 Christian Heinrichs
39 7 Christian Heinrichs
 *4. Make sure the Beaglebone is plugged in to laptop and open a terminal window:*
40 6 Christian Heinrichs
41 2 Christian Heinrichs
* Navigate to the _sh_ folder inside the heavy_beaglert folder you created earlier @cd /path/to/beaglert_heavy/sh@
42 1 Christian Heinrichs
43 1 Christian Heinrichs
* If on OSX/Linux, run @./setup-ssh.sh@
44 1 Christian Heinrichs
45 1 Christian Heinrichs
* Or on Windows:  @./setup-ssh-windows.sh@
46 1 Christian Heinrichs
47 1 Christian Heinrichs
* when prompted for password enter letter 'a' (no quotation marks)
48 1 Christian Heinrichs
49 1 Christian Heinrichs
* @./send-project.sh@
50 1 Christian Heinrichs
51 2 Christian Heinrichs
*5. Compile your first project!*
52 1 Christian Heinrichs
53 1 Christian Heinrichs
* @./upload-and-compile.sh -f ../pd/hello-world/@
54 1 Christian Heinrichs
55 1 Christian Heinrichs
*6. Create a new pd project*
56 5 Christian Heinrichs
57 1 Christian Heinrichs
* Create a new folder inside the /pd directory
58 1 Christian Heinrichs
59 7 Christian Heinrichs
* The pd patch must exist in its own folder and be named *_main.pd*. You can use abstractions if you like.
60 1 Christian Heinrichs
61 5 Christian Heinrichs
62 5 Christian Heinrichs
h3.  Using analog ins/outs
63 5 Christian Heinrichs
64 5 Christian Heinrichs
* You can directly address the analog ins and outs from within PD (note that you have to compile and run the patch onto the BeagleBone to receive the data)
65 5 Christian Heinrichs
66 5 Christian Heinrichs
* Use the [adc~] and [dac~] objects to receive and send the data
67 5 Christian Heinrichs
68 5 Christian Heinrichs
* [adc~ 3] refers to Analog Input 0 (first two channels of [adc~] are audio inputs), likewise for [dac~]
69 5 Christian Heinrichs
70 5 Christian Heinrichs
* These inputs are sampled at audio sampling rate, so handle them as you would audio signals. (Use [snapshot~] if you want to turn them into control-rate values)
71 5 Christian Heinrichs
72 5 Christian Heinrichs
* See the example patches in the /pd folder for more information
73 5 Christian Heinrichs
74 5 Christian Heinrichs
75 1 Christian Heinrichs
h2.  Important notes
76 1 Christian Heinrichs
77 1 Christian Heinrichs
* Make sure you aren't using any unsupported objects. For list of objects go to https://enzienaudio.com/docs/pdobjects.html
78 1 Christian Heinrichs
79 1 Christian Heinrichs
* Pd patch must exist in its own folder and be named *_main.pd*. You can use abstractions if you like.
80 1 Christian Heinrichs
81 1 Christian Heinrichs
* See example pd patches for more information.
82 1 Christian Heinrichs
83 1 Christian Heinrichs
84 1 Christian Heinrichs
*Have fun!*