We have learned how to synthesize sound based on frequency modulation theory by LabVIEW. Why don't we try LabVIEW running on BeagleBone? We may be able to get more interesting result. The goal of this project would be to implement an audio/sound synthesizer on BeagleBone with an interface that user can manipulate the filter easily. It has the ability to deploy LabVIEW codes to BeagleBone Black for software implementations.
Give step by step instructions on how to install your project.
Software requirements: LabVIEW(2014), LINX, Arduino IDE, Linux(ubuntu 18.04)
Hardware requirements: BeagleBone Green/Black(with ethernet), Bare Conductive touch board, 1 micro USB wires, jumper wires, LEDs, push buttons, etc.
- Software setup:
1. MAKE SURE you installed LabVIEW 2014 32-bit(or LabVIEW 2014 SP1 32-bit), LINX DOES NOT support later versions. In LabVIEW, navigate to Help-->Activate LabVIEW components(Launch), and in Local Licenses, make sure you have at least 1 development system and "Application Builder" activated. You can also activate other parts on your wish.
2. Go to NI's website and download LINX. Your browser should prompt a message to guide you to the VI Package Manager. In the page that pops up, make sure the number at the top left corner is 2014 and then click "install" below it. "Agree" to all the licensing requirements and close the VI Package Manager after finished. A window should pop up after installation reminding you to restart the LabVIEW because the LabVIEW needs to scan the software add-ons and reload corresponding hardware configuration files, so make sure to restart otherwise you will have trouble locating your hardware later.
3. After rebooting LabVIEW you should be able to find LINX by navigating to Tools-->MakerHub-->LINX and we have all the software that we need for now.
- Hardware setup:
1. Get your bone ready. Run "ifconfig"/Ping google.com to make sure it has Internet access from ethernet port, it has been proven to be the simplest way comparing to wireless or ethernet over USB.
2. Plug your bone in, and navigate to Tools-->MakerHub-->LINX-->LINX Target Configuration, then open it up.
3. Enter the IP address of your bone(default to 192.168.7.2), your username and password as shown in Figure1. If you watch the video Sam says the user account you enter has to have sudo access, but a normal user would do just fine. Click "connect". (After entering your password, DO NOT press <return> key on the keyword, click the connect instead.)
4. Navigate to "Target Info" and see if the "Internet Access" box is checked and Navigate to "Install Software" to install LabVIEW run-time engine 2014. This may take a while.
5. After installation, reboot your BeagleBone and you should be ready to proceed.
For more detailed tutorials and support forum: LINX
All the project files can be found at a public GitHub repo
Connect your Beagle by right clicking the BeagleBone and choose the device you want to connect. Once successfully connected, you can see the shining bright green dot next to little Beagle as shown in figure2. Then download vi from git and add vi under Beagle you connected with. Double click vi and run. Wait for labview to deploy on the Beagle, you will see a window like Figure3.
Users can press pushbuttons to determine which sounds to generate and run LabVIEW VIs to generate them. After generation, the wav files will be stored in the pre-set path. The user can open cloud 9 editor and download wav files.
- Make sure to use 32-bit LabVIEW 2014 (or LabVIEW2014 SP1).
- Check Linux kernel version. We had 4.19 the first time and it was not compatible with LINX so we had to switch to 4.9.
- The way which LINX uses to install LabVIEW was running "dpkg" command. It could potentially mess up the dependencies of packages.
- Notice the default BeagleBone Black pinout for LINX is different to the original BeagleBone pinout.
Highlight of this project is successfully deploying LabVIEW vi onto Beagle. A short demo video can be found here
This project relies on a third-party LabVIEW add-on: LINX. LINX can access and operate on BeagleBone if provided with user access. Once a BeagleBone is connected to LabVIEW, the user can deploy the project onto BeagleBone. Users then can use peripheral VIs to access your devices digital I/O, analog I/O, SPI, I2C, UART, PWM, etc.
The vi we are using based on frequency modulation synthesis theory. It has plenty of variables you can tweak and play with. With different ADSR envelopes showed in the front panel of vi, you can create plenty of possible sounds. With the set of numbers we provided, you can successfully generate bassoon, bell, clarinet sounds.
One of the challenges of the project was getting LINX to work with our Beaglebone, after some hours put in team meetings and individual researches we have found a working solution.
We first tried different versions of LabVIEW and it turned out that LINX is only compatible with 2014s. Then we ran into trouble installing LabVIEW runtime engine into BeagleBone and tried several versions of OS and BeagleBone. BeagleBone Black Rev C and debian 8.6 were proven to be a stable combination(with Ethernet connected). One possible reason we had to connect a Ethernet cord is that we believe when LINX operates on BeagleBone it is at a rather isolated position, and it will consider itself as the only user of the board. To prove this we connected our Green wireless to wifi but LINX still have the "Internet Access" box unchecked. The third thing we learned was about installing software onto BeagleBone. Normally we used "apt" to handle software installation and update but LINX simply downloads the packages from source website and run "dpkg". This may potentially ruin the software dependencies so we recommend the users rather operate on a new BeagleBone.
After the board is connected we noticed that GPIOs and other spherical ports were not working properly, after some debugging we found that LINX is not compatible with the kernel we used(4.19). We switched to 4.9 it started working fine.
Also we attempted on sending sound files from BeagleBone to Bare Conductive Touch Board, which is a arduino-like device. We had the serial connection between two boards but unfortunately Touch Board does not support writing to the SD card by called SD library. We had to manually put the files into SD card with the card plugged in to host computer.
1. Touch Board mentioned above right now does not support writing to SD card so we were not able to store our sound files in it and play them. We can try to make it able to receive files from Bealgbone and play them on Touch Board.
2. The project can only be controlled by the host computer, we will try to implement some methods to control the input fed into our VIs to generate customized sounds.
3. We can further develop the VIs to play some background music so we can mix the notes.
This project may not be the most successful ones but it can still prove the idea that LabVIEW ran off host computer and go portable. We actually put so much time on setting up the LINX than we expected. During the process we have conquered many obstacles, but meanwhile we could still see the potential to running LabVIEW on embedded platform. And we are willing to share our experience and answer some questions on LINX forum when others have the same problems as we did.