stretta that quote is technically true, but a little misleading in this context and should probably be reworded.

There are two routes to using PD on Bela, one is through libpd, and the other is through Heavy.

With the libpd route, you take your patch, upload it to the board through the IDE, and click run. The patch is then compiled on the board using libpd, and run.

For Heavy, you use the scripts provided to send the patch off to a remote server, where it is turned into optimised C++ code before being sent back and compiled on the board.

So both methods do require compiling, but when using libpd the IDE effectively takes care of it for you, so all you need to do is drag+drop then click run.

    A few other documentation notes that I suggest:

    1) some popular browsers, like Safari on MacOS, don't support drag and drop in the IDE. If drag and drop is not working for you, try Chrome.

    2) When you follow your instructions, the creation of a new project, automatically creates a main.pd file. You can drag and drop new files in as much as you like. but " Then simply click the run button." will just keep playing the test tone main.pd file. You must delete this file and rename your uploaded file _main.pd for your patch to work. It took me a while to figure this out.

    LiamDonovan I understand the difference between heavy and compiling with libpd. The reason I was focused on heavy is because I got roadblocked with the libpd method for some reason.

    But heavy is really cool. I really like that I can turn a pd patch into something that can be embedded on a web page. I'm wondering why I can't just use the compiled C file they provide on their web interface and copy this over to the bela image. Seems way easier than what I've been going through.

      stretta Yeah Heavy is very cool, and can give a significant performance boost vs libpd. We tried to incorporate a workflow for it into the IDE because the script workflow can be a little temperamental at times as you have found, but we came across problems with cross-origin resource sharing so we went with libpd in the IDE instead.

      Thanks for the suggestions about documentation, we're still working on it and other perspectives are helpful!

      Have you managed to get this working now or are you still having problems (with libpd or Heavy)?

      I now have a potentiometer working as a volume control by using adc3. I'm currently trying to get an LED to blink. I'll report back later.

      Here's a weird one. If your pd patch contains an empty comment object, the IDE can't render the patch.

      just following up on stretta's questuon about the location of the 'setup_board.sh' script, it would be useful to clarify in the documentation whether this is meant to be found in the downloaded Bela-master folder, or on the board itself. I am struggling to locate it!

      hope I updated the wiki appropriately now, can you let me know if it is any better?

      Short answer is the file setup_board.sh does not exist any more . It is now called "update_board" and it can be found in Bela/scripts

      Incidentally, if you find small mistakes in the wiki, you can fix them yourself: if you are logged into github you should see an "edit" button at the top of the page. With great power comes great responsibility 🙂

      sick! will give that a go - thanks for the quick response.

      Apologies for the silence. That's good. I've been happily bela-ing since.

      Is it true there is a multiplexer available? I've poked around the site and haven't located it.

      At some point I I'll still have to sort out the heavy toolchain because I'm going to need the efficiency.

      I'll direct future software issues to the correct place :\ sorry.

      The edit-pd patch / save / drag into IDE / delete main.pd / rename as main.pd gets old really quickly. I wish there were a more streamlined process.

      some documentation suggestions:
      The holes on the laser cut plate are oriented such that mounting the board is obviously incorrect (hanging over one side / not centered / not matching with the engraving) or lined up/centered correctly, but upside down from all the documentation examples. I wish I did it the lopsided way so it wouldn't be upside down.

      In the start up documentation, you might want to mention locating the card, and where to insert it on the board. I know it seems obvious to you, but if people are following your instructions, they might not know to do this.

      thanks

        stretta
        A multiplexer capelet was made available during the kickstarter campaign after we reached one of our stretch goals. Schematics are here, if you want to build your own, otherwise more will be available for sale later this summer.

        It looks like your toolchain is ready to go, the error you were getting

        Error: unknown option -i

        was due to the fact that the code has been updated and the -i option has been removed (basically you can now omit it). After your post, we updated the wiki accordingly

        The edit-pd patch / save / drag into IDE / delete main.pd / rename as main.pd gets old really quickly. I wish there were a more streamlined process.

        You do not need to delete _main.pd and rename a _main.pd. You can simply name the file _main.pd on your computer, at which point a single drag and drop will get rid of the old _main.pd on the board and replace it with the new one. This is as good as it can get using the IDE: the browser cannot have access to the files on your computer. As you will understand, it would be a serious security concern if it was allowed to.

        A more streamlined workflow can be achieved using libpd or Heavy through the scripts. At this page you find the documentation on how to use build_project.sh (to use libpd) and build_pd_heavy.sh (to use heavy). In both cases you need to invoke the script with the -b (background) and --watch (waits for modifications in the source folder), so for instance

        $ ./build_project.sh path/to/my/belaTestProject -b --watch

        will run the project and refresh it every time you change a file in the folder path/to/my/belaTestProject . Note: the -b option will make it run in the background, that is you will not be able to see the text output from your program. While this may not be an issue in many cases (e.g.: if you are using the scope to debug your program), in case you need to see the output of your program, run (from another terminal window):

        $ ./connect_to_project.sh

        Thanks for the other observations.

        a month later

        Is it possible to access the I2C ports in Pd? For example, to hook up a sensor like the SparkFun Capacitive Touch Sensor Breakout - MPR121?

        Hmmm you cannot do that directly from PureData at the moment (though it could be implemented in an external in the future).

        We would normally do this using libpd or Heavy and a custom render.cpp file. You will have to read your sensors and then sending them as messages to the patch using libpd's libpd_float() and/or libpd_start_message() or Heavy's hv_vscheduleMessageForReceiver.

        You can find an example of interfacing to the MPR121 in examples/06-sensors/capacitive-touch and an example of custom render file in examples/08-PureData/customRender.