ECE497 Project Music Synthesizer

Team members: Kuangyi Lu, Ximing Ma

Grading Template
I'm using the following template to grade. Each slot is 10 points. 0 = Missing, 5=OK, 10=Wow!

 00 Executive Summary 00 Installation Instructions 00 User Instructions 00 Highlights 00 Theory of Operation 00 Work Breakdown 00 Future Work 00 Conclusions 00 Demo 00 Late Comments: I'm looking forward to seeing this.

Score: 10/100

(Inline Comment)

Executive Summary
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.

Packaging
If you have some hardware, consider Small Build, Big Execuition for ideas on the final packaging.

Installation Instructions
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. 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".

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

User Instructions
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. 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. 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.

Notes:
 * 1) Make sure to use 32-bit LabVIEW 2014 (or LabVIEW2014 SP1).
 * 2) 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.
 * 3) The way which LINX uses to install LabVIEW was running "dpkg" command. It could potentially mess up the dependencies of packages.
 * 4) Notice the default BeagleBone Black pinout for LINX is different to the original BeagleBone pinout.

Highlights
Highlight of this project is successfully deploying LabVIEW vi onto beagle. A short demo video can be found here

Theory of Operation
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.

Work Breakdown
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.

Future Work
1. Touch Board 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.

Conclusions
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. And finally we were able to bring out a stable working demo.