Hello Sound

Running your first project and making sound

When getting started with a new programming language the traditional first task is to create a simple programme which prints “Hello World!” to the console. In the world of Bela and Pure Data our first task is much more exciting – a fully algorithmic techno synthesiser which can be run at the touch of a button!

Table of contents

  1. Make some noise
    1. Open the hello-sound example
    2. Make sure your headphones plugged in
    3. Run the example
  2. The code

Make some noise

Make sure your Bela unit is connected to your computer via USB. You’ll have to wait for the board to boot up, but when the blue lights are blinking steadily navigate to http://bela.local/ in your browser to load the Bela IDE. We’ll explain a bit more about how the IDE works in the next tutorial but for now we just want to run our first project.

Open the hello-sound example

Open the Pure Data example called hello-sound. Navigate to the Examples tab on the right side of the window, expand Pure Data folder and click on the hello-sound project, which will load it in your editor window. You’ll see something like this:

Make sure your headphones plugged in

Connect your headphones. Make sure they’re connected to the Bela board and not your computer - because the Bela board is generating the audio you won’t hear anything if your headphones are connected to your computer!

Attach an audio adapter cable to your Bela’s audio output. This is a white molex header labelled OUT - if you can’t locate it use the interactive pin diagram in the Pin Diagram tab to find it.

Run the example

The green RUN button on the left side of the toolbar will build and run the example. It will turn yellow during build, and green when the project is running.

Now you should hear your fully alogrithmic techno synthesizer!

The code

Find the hello-sound sketch in the Pure Data section of the Examples tab of the Bela IDE.

In the IDE you will see the visualisation of the _main.pd file. This patch has only two objects: [techno-world] and [dac~ 1 2]. The second object, [dac~ 1 2] is the way we send audio signals to the stereo audio output of Bela. The first object [techno-world] is responsible for producing the audio content.


The top-level patch in a Bela project always needs to be named `_main.pd`.

Next we will look at how to edit the Pure Data patches when working with Bela.