Team Status Report for Mar 18

  • What are the most significant risks that could jeopardize the success of the project? How are these risks being managed? What contingency plans are ready?

The most significant risk right now is the integration process, and the most important link is the radio transmission between gloves and the receiving module. If we met problem with the radio transmission, we will go to search for online tutorial and follow the instruction to solve the problem. We might also ask our TA for help. We don’t think we have any backup plan if it doesn’t work. As a contingency plan, we will have to resort to a wired connection to send angle information from the gloves to the receiving module.

  • Were any changes made to the existing design of the system? Why was this change necessary, what costs does the change incur, and how will these costs be mitigated going forward?

There are no design changes to the system. 

  • Provide an updated schedule if changes have occurred.

So far there is no major update on our current schedule. Although our DigiKey order hasn’t arrived yet, the major components have arrived (radio and gyroscope IC). Hence, our design process is still on schedule.

  • Component you got working.

You can now control the the volume of the synthesizer with the pitch angle of the gyroscope chip. Here is a demo video.

Oscar’s Status Report for Mar 18

  • What did you personally accomplish this week on the project? Give files or
    photos that demonstrate your progress.

This week I integrated the gyroscope chip into my synthesizer. Specifically, now the volume is now controlled by the pitch angle of the gyroscope chip instead of the vertical position of the cursor. I spent quite some time researching the Arduino library for the gyro IC. I have tried AdaFruit_MPU6050 and MPU6050_light, but these do not have the required angular accuracy. In the end, I used Tiny_MPU6050, which contains a calibration function that makes the angle readings much more reliable. After that, I integrated the readings from Arduino into my synthesizer using the serial python library, normalized it, and used it as my volume parameter. Here is a demo video.

  • Is your progress on schedule or behind? If you are behind, what actions will be
    taken to catch up with the project schedule.

I am on schedule. However, because of the ethics discussion next week, I might spend some extra hours in the lab next weekend.

  • What deliverables do you hope to complete in the next week?

After mapping the pitch angle to the volume, I will mainly focus on implementing real time frequency bend next week and controlling it with the roll angle of the gyroscope IC.

Team Status Report for Mar 11

  • What are the most significant risks that could jeopardize the success of the project? How are these risks being managed? What contingency plans are ready?

The most significant risk right now is the process of incorporating the pre-trained models into our system. Although we have accounted for the possibility that these models don’t fit our requirements and came up with backup models, it is still possible that the integration method that we planned might not work as intended. This brings up another potential issue: the future integration process. Since all of our team members worked on the project during spring break separately, there is not as much communication as if we were to sit inside the classroom. This could potentially cause the integration process to be more complicated than expected. Currently, we are planning to meet more often in our development process in order to better understand each other’s work, and more research is being done at the moment to reduce the confusion in this process.

  • Were any changes made to the existing design of the system? Why was this change necessary, what costs does the change incur, and how will these costs be mitigated going forward?

There are no design changes to the system yet. We did change a metric, the weight of the system is now 4.8 lbs instead of 6 because this number is more reasonable and should better fit user requirements.

  • Provide an updated schedule if changes have occurred.

So far there is no major update on our current schedule, several tasks are slightly extended due to spring break, but will not impact the timeline of future items.

  • Component you got working.

The gesture-command UI now works with some dummy gestures, it allows matching and save + load the data when python is launched. The synthesizer also supports gliding between notes and customized timbre (demo video).

  • Addressing faculty feedback on design presentation

Most of the questions are addressed in the design report, and the rest will be addressed below.

“Use of glove and what it will control and how? How does the battery on one hand connect to the other?”

Each glove mounts an individual circuit that contains 2 LiPO batteries, an Arduino Nano, a radio transmitter, and a gyroscope chip. Since each glove is individually powered, there is no physical connection between them. The left hand’s pitch angle will be mapped to volume in the synthesizer, where the right hand’s roll angle will be mapped to pitch bend.

“Why no Windows?”

After changing some python libraries, our software now runs both on Windows and macOS.

“Details about the synthesizer”

Below is a more detailed diagram of the synthesizer.

  1. The frequency f is based on the note selected by the user’s hand position on screen and the amount of pitch bend.
  2. Oscillate the waveform given by the oscillator at the frequency f.
  3. Samples the oscillating waveform into buffer and multiply it with the volume parameter determined by user’s left hand.
  4. Write the buffer to audio stream.

Oscar’s Status Report Mar 11

  • What did you personally accomplish this week on the project? Give files or
    photos that demonstrate your progress.

This week I added a gliding mechanism to fix the audio snap problem. Now, when the user switches to a new frequency, the synthesizer will play a sequence of in-between frequencies instead of jumping directly to the target frequency. I also rewrote the oscillator class to support customized timbre. I can now customize the sound by changing the mathematical expression of the oscillator’s waveform. In this demo video, the first oscillator uses a sine wave with glide duration = 0.05s. The second also uses a sine wave with glide duration = 0.1s. The third one’s waveform looks like the picture below and has a glide duration = 0.15s.

  • Is your progress on schedule or behind? If you are behind, what actions will be
    taken to catch up with the project schedule.

I am on schedule. However, I do foresee a heavier workload next week as I will be adding hardware (Arduino + gyroscope chip) to software (my synthesizer).

  • What deliverables do you hope to complete in the next week?

Since our gyroscope chip has arrived, I will be testing its functionality next week. If there is no problem with the chip, I will incorporate its outputs to my synthesizer. I hope that I can use its tilt angle to control the volume of my synthesizer by the end of next week.

Team Status Report for Feb 25

  • What are the most significant risks that could jeopardize the success of the project? How are these risks being managed? What contingency plans are ready?

After resolving the risks with our software last week, we believe that our most significant risks lie within our hardware. Because the quality of ICs (especially the tilt sensor and the radio chip) is not guaranteed, we will start component testing immediately after our chips arrive. If there is a defect, we will order another one (maybe from another seller) within one day.

 

  • Were any changes made to the existing design of the system? Why was this change necessary, what costs does the change incur, and how will these costs be mitigated going forward?

We did change the battery for our gloves from alkaline batteries to rechargeable lipo batteries. Lipo batteries are lighter and have a power density, which will in return make our system lighter and last longer. It will also cut down our development costs as we don’t have to purchase batteries all the time. To address the possible (although unlikely) overheating of the battery, we will monitor the power consumption and temperature of the lipo batteries as we develop the system. We will also add an insulator layer to our glove if necessary.

 

  • Provide an updated schedule if changes have occurred.

There was no change to our schedule.

 

  • Component that we got to work.

Oscar continued working on the synthesizer and now it supports real time pitch and volume control and timbre selection. Here is a short demo video.

 

  • Adjustment to team work to fill in gaps related to new design challenge

Although Oscar was in charge of developing the synthesizer, he encountered a major sound card issue that couldn’t be resolved when developing on Ubuntu. He then switched to Windows and wrote everything from scratch using new libraries. In order to make sure the resulting product is still macOS compatible, Karen and Yuqi (both owning a MacBook) both jumped in and conducted a preliminary setup experiment. After changing the code a bit and installing the correct version of libraries, our synthesizer is now both Windows and macOS compatible.

 

 

Oscar’s Status Report for Feb 25

  • What did you personally accomplish this week on the project? Give files or
    photos that demonstrate your progress.

This week I continued to improve on the oscillator program I wrote last week to support pitch and volume control and timbre selection. By moving the mouse left and right, the program plays one of the eight notes between C4 and C5. The volume is controlled by the vertical position of the mouse. Also, the program will produce a different sound when the oscillator is initialized with different functions. Here is a demo video of the functionalities above.

I also spent quite a lot of time making my system both Windows and macOS compatible. Since I do not own a MacBook, Karen helped me make sure that my program is indeed macOS compatible. Previously I had some issues with using the simpleaudio library on Windows. This was resolved by using the pyaudio library instead. However, switching libraries means I have to rewrite the core part of my synthesizer from scratch.

  • Is your progress on schedule or behind? If you are behind, what actions will be
    taken to catch up with the project schedule.

I think my progress is on schedule. However, using an existing synthesizer software is always a backup plan. I have researched a little bit into open-sourced synthesizers this week and decided that Surge is currently the best available option.

  • What deliverables do you hope to complete in the next week?

I plan to continue upgrade the linear volume control into a vibrato. Also, I will try to add a gliding mechanism to my synthesizer so that it smooths out the not transition.

Team Status Report for Feb 18

Team Reports for 2/18

  • What are the most significant risks that could jeopardize the success of the project? How are these risks being managed? What contingency plans are ready?

We still believe the most significant risk is the hand gesture + movement detection system. As a result, we decided to use a demux structure so that our program will either perform gesture recognition or hand tracking. The video feed will be fed into two time-multiplexed models, one for gesture recognition and one for hand tracking. Splitting the functionality allows us to access more pretrained models and hand tracking program, which greatly reduces the development time. An abstract block diagram is shown below:

  • Were any changes made to the existing design of the system? Why was this change necessary, what costs does the change incur, and how will these costs be mitigated going forward?

Instead of training our own gesture recognition model we decide to use a pre-existing one because of time constraints. Since we are not at the step yet this design change did not create any extra cost for us. We also included backup options for most of the parts that we plan to write on our own in case something goes wrong. We believe that risk mitigation is necessary and it is always better to have a plan b on everything.

 

  • Provide an updated schedule if changes have occurred.

There was no change to our schedule. After factoring spring break and other outside events, the schedule is still reasonable for everyone.

 

  • Component that we got to work.

Oscar wrote a basic, cursor-controlled synthesizer that supports real-time playing of 2 notes. The frequency value of those notes were generated lazily using iterator functions and OOP.

 

  • The “keep it simple” principle

The major decision we had last week was to split the gesture control part and hand tracking part into two time-multiplexed programs. That way, we can easily develop the two parts concurrently and make best use of any pretrained/existing programs. There are two modes of our instrument, a sound selection mode (where the user can use gestures to select a particular timbre), and a play mode (where the user plays the instrument with hand positions). We will also include a software demux that allows users to freely switch between these two modes.

Oscar’s Status Report for Feb 18

  • What did you personally accomplish this week on the project? Give files or
    photos that demonstrate your progress.

This week I continued to improve on the oscillator program I wrote last week so that it supports mouse-controlled real-time playing. When run, pyautogui will first get the cursor position. If the cursor is on the left side of the screen, the program plays a C4 indefinitely. If the cursor is on the right, the program plays a E4 indefinitely. Here is a short demonstration video of it working.

I spent quite a lot of time fixing the “snaps” when looping clips of a frequency. First I thought it can be fixed by trimming the generated frequency array so that the difference between the first element and the last is relatively small. However, the snap only got a little bit better. I then realized I have to reduce the software overhead (actual gap in time) of repeating a frequency array, so I tried to find a python library that supports looping with the lowest overhead. I have tried packages like pyaudio, simpleaudio, and pymusiclooper. However, since most of these libraries loop a wavfile on an infinite loop, the gap between each repeat is still noticeable. In the end, I used a library called sounddevice that implements looping using callbacks, and since there is virtually no gap between repeats, looping is now unnoticeable.

  • Is your progress on schedule or behind? If you are behind, what actions will be
    taken to catch up to the project schedule.

I think my progress is on schedule. However, using an existing synthesizer software is always a back up plan. In that case, I only need to figure out how to change parameters through my own program instead of its GUI.

  • What deliverables do you hope to complete in the next week?

I plan to add two more functionality to my oscillator program: real-time cursor-based volume control, and real-time vibrato. I plan to implement the vibrato using a envelope that performs amplitude modulation on the generated frequency array.

  • Particular ECE courses that covered the “keep it simple” principle

The most important thing I learned last week was to keep everything simple. After experimenting with looping frequency arrays, I found that the library that works the best are the ones that have the fewest lines of code to write. I don’t remember classes that explicitly covered this principle, but it is a theme in most programming courses like 18-213(i.e. keep your code short and simple).

Team Status Report for Feb 11

The most significant risk is the hand gesture/movement detection system. Since we plan to use our own data set and train our network, it could be more time-consuming than expected. As a contingency plan, we found two pre-trained gesture recognition models online: Real-time-GesRec and hand-gesture-recognition-mediapipe. However, these models do support more gestures, so we will only use a subset that maximizes the detection accuracy.

So far there are no changes made to the existing general design of the system. However, we did introduce a plan B to some of the subparts in the system. For example,  we are considering the possibility of using a pre-trained model in case we are not able to collect enough data in a short period of time and train our own. This a necessary precaution to ensure that a problem in one part of the process would not cause the overall hand gesture recognition component of the system to not function properly.

No updates to the current schedule have been created. Currently, we are still in the process of designing our implementation and finalizing design details.

Although we are still in the research and design stage, we did come across a DIY Python synthesizer tutorial that actually mimics the theremin quite well.

Our project includes environmental and economic considerations. We added an autonomous lighting system so that our instrument can function in a very dim environment. We also want our end product to be significantly cheaper than theremin on the market, which limits our budget to be under $400 dollars.

Oscar’s Status Report for Feb 11

Besides preparing for the presentation on Wednesday, I was researching potential software/code for our synthesizer. Specifically, I was looking for the following functionalities:

  • Supports playing sounds of different frequencies and volumes.
  • Can apply at least one adjustable musical effect.
  • Supports at least two different tone colors/instrument sounds.

I have tried building a DIY synthesizer using Python libraries like pyo, synthesizer, and C++ libraries like STK. After wrestling with import errors and dependency issues, I decided to build a synthesizer based on this post. It has a step-by-step tutorial that teaches you how to build an oscillator, a modulator, and a controller in Python. I modified the code provided in the post and wrote a simple Python program that can generate numpy arrays representing arbitrary frequencies sounds. Currently, the program plays a “C4-E4-G4” sequence on repeat.

My progress is on schedule, and I am planning to upgrade the synthesizer program so that it responds to real-time inputs (for example, mouse movement). Also, I need to fix the audio “snaps” problem. When looping a frequency array, the difference between the first and last element will cause the synthesizer to play a snap sound. I need to find a way to smooth out the snaps and make looping unnoticeable.