Team Update 4/10

This week, we mainly focused on the interim demo. In preparing for the demo, we noticed that our Gantt chart needed to be updated. We have attached the new version here. This creates more specificity on the tasks we are working on and includes some of the delays we have had in reaching our goal.

One setback we had the morning of the demo was the integration between the game code itself and the drum module. Because the first time that this error happened was on the morning of the demonstration, we are still working on debugging it and ensuring that this does not happen again. Furthermore,  because the integration between Windows and Mac for the sound library we want to use for the game seems very difficult to transfer between platforms, we are working on picking and implementing a new package for this. Finally, on the creation of the beat map side, the actual beats are able to be created in a way that is somewhat similar to the song. However, more testing needs to occur. This is further explained in the individual post.

A large portion of our work is on aesthetic changes. The game play code (while mostly playable) had to be updated to reflect a more interesting user experience. The specific changes can be found in the individual team diagrams. Furthermore, the drum apparatus will now have lights to also create a more interesting user experience, so this is also being worked on.
Schedule wise, we are on track to follow the new gantt chart. We do not foresee any reason why we won’t be able to follow this schedule, so we should be able to have a playable game at the end of the semester!

Shreya’s Update 4/10

This week, I was mostly focused on the Interim Demo. Last week, I had the idea of using the STFT to separate the audio file into frequency bins to analyze through the intensity analysis. I thought this would be more efficient due to the variability of the number of bins. However, I was having some trouble implementing it.

I spoke to Professor Sullivan regarding the approach, and he mentioned that it would be better to use bandpass filters and then run an intensity analysis on that. I ended up implementing that with scipy and then running the intensity analysis on the filtered wav files.
On Wednesday, I had an odd bug where there would be no outputs during long stretches of time during the audio file. I was able to fix that by scaling the array, and then analyzing it. That issue is fixed.

Timing wise, while the algorithm takes about six minutes to analyze a three minute audio file, I should be able to get this down to three minutes as per the user requirements through streamlining the code. I will not be doing this for this week because this will likely be a finishing touch after tuning and testing the algorithm.

Currently, the beatmap seems to have an offset correlating to a song. George suggested adding a noise to the audio file whenever my algorithm detects a beat, so I should have that done by Wednesday so I can better understand whether there is an offset- or what exactly is happening.
I am fine on schedule. We have had to change the Gantt Chart which reflects our scheduling differences. The updated Gantt will be on this week’s team update.

 

Team Status Report for 4/2

Over the course of the previous week, the two primarily tasks we’ve worked on as a team were the modification of the C++ codebase so that it could function (and therefore be useful in testing) on Windows machines and the integration of our individual project components into a functional device that replicates the end-goals of our project.

Regarding the C++ codebase transfer, we wanted to make sure the codebase was operational on Windows machines, as up until this week we had only ever tested it using a Mac, and being able to run the code on Windows would make certain integration testing steps (such as Shreya testing Json files in the program) much easier. Unfortunately we did run into some issues derived from specific libraries, and although we have yet to resolve those issues for every library currently in the Mac version, the only ones we have yet to fully integrate aren’t integral to the code’s operation, so it was possible for us to display the beatmaps as a series of notes in the C++ game. The problematic library that we had to remove was related to audio, which is an integral part of our game’s design even if the code can run without it, so in the following weeks we hope to resolve that issue as well.

Regarding the integration of our individual modules, we’ve connected the three individual subsections (Shreya’s beatmaps, George’s C++ code, and Stephen’s drum module) into a singular system so that we can verify the full information stream of our project. This is in preparation for the interim demo next week, during which we hope to show an unpolished version of how we intend for our final product to function. Going into next week, we hope to further polish our system with improved beatmaps, visuals, and hardware modules before the interim demo, but we also need to make sure we don’t include any new/developing features into our system that we haven’t had the time to verify the accurate functioning of yet, as they could fail unexpected during the demo, preventing us from demonstrating the parts of our project we have functioning/meeting our expectations.

Regarding how this progress fits into our overall timeline, we are on pace with our expectations, but there still exists a good amount of polishing we need to perform before we’d feel comfortable calling our project a “game” like our end of semester target requires.

Shreya’s Update 4/2/2022

This week, I was working on getting the gameplay code installed on my computer. That worked around Wednesday, so I was able to begin visualizing the beat maps.
For the second half of the week, I started looking at melody tracking algorithms. I figured out how to map the frequency bands to the timing with a STFT (graph shown below).

I’m working on extracting the melody itself and getting the time stamps. According to this paper, the algorithm is to determine the frequency of the melody line (orange line on the bottom of the graph) and then extract the time stamps from those frequencies. I’m currently looking at using an external package to get these frequencies, but I should have a weak melody tracker by Monday.

For scheduling, I should be fine. I’m working on the automatic part of the beat tracker and the melody tracker simultaneously, so I’m pretty much on schedule.

Stephen’s Status Report for 4/2

Over the course of the last week I’ve been primarily working on getting the C++ code to work on my Windows computer, as well as prepping for the upcoming interim demo on Wednesday 4/6.

Although last week I mentioned that I was expecting the PCBs I had ordered to arrive, I had actually misread the manufacturing completion date as the shipping arrival date. The true shipping arrival date turned out to be 4/4, so I haven’t gotten my hands on the PCBs yet, which has prevented me from soldering the components and printing the final drum design like originally planned.

As such, I’ve mainly been working on other minor tasks in preparation for next week. For example, both I and Shreya spent some time working with Visual Studio 2022 in an effort to get the C++ code working on our Windows machines. We did manage to get it working eventually, but only after removing an audio library, which will be necessary in our final product and so we’ll need to find a way to incorporate it back into the Windows version of the codebase later.

Additionally, I’ve been prepping the demo drum module for use in the interim demo. A video of such can be seen here:

When pressing the drum, the ESP32 simultaneously sends a serial signal to the computer (to be read by the C++ code) while also powering the feedback LEDs that give users a physical means of knowing their hit was detected. Other than improvements to the design/layout, this is exactly how the final drum module is planned to function.

Other than those two tasks, I’ve also been working on some modifications to the ESP32 code to handle multiple drum inputs as well as designing some drafts of what the ESP32 housing will look like. Due to the cost and time required to get custom PCBs, that likely won’t be feasible for the ESP32 module. As such, I’m planning on using a combination of breadboards and internal wiring to achieve the needed stability and connection quality with the ESP32.

Regarding where I feel this progress is at, I think I’m on schedule as what I have currently is sufficient for presentation during the interim demo next week. Although I would’ve liked to have the final drum module/PCB printed, soldered, and assembled together by then, I may still be able to do so depending on when the PCBs arrive next week. Once I do get that final module printed and assembled, most of the remaining objectives I’ll have going forward will be related to integration and helping out on other tasks where I can.

Team Status Report for 3/26

Our project was scheduled to reach MVP this week. We’ve met this benchmark in some ways, but have fallen short in other ways.

An MVP is suppose to be the minimum viable version of our game. This means that game is supposed to be in a playable state, and that we could theoretically give the game to a friend and they could play it start to finish. Our game isn’t quite at this stage yet. Instead, this week we were able to successfully complete a tech demo of the entire pipeline of technologies: a signal can get sent from the drum, be received by the computer, and then displayed on the screen.

Here is a screenshot of the game:

Our project currently meets the MVP benchmark in the sense that “all of the technologies have been tested and they can interact with each other”. However, our project falls short because it is not yet an engaging video game experience. There is still a lot of aesthetic changes that need to be added to the game before it feels like a fun experience.

We ran into an unexpected challenges with integration this week. The game does not compile on Windows, which means that Shreya and Stephen cannot run the game on their computers yet. We need to divert some of our energy this week to fixing this before proceeding with other features of the game. As a result, the gantt chart has been updated. Here is a screenshot of our latest Gantt chart:

Our MVP deadline was pushed back by a week, which means that we are currently 1 week behind schedule. However, we incorporated 1 week of “slack time” in our schedule, so we are still on track to meet the end of semester deadline.

Shreya’s Status Report for 3/26

For this week, I was working on testing and verifying the accuracy of the beat map. I mentioned before that I didn’t particularly trust the accuracy of the beat map. While looking at the beat tracking accuracy on the game itself, there was a slight offset and then some issues with the accuracy of the beat tracker. I think this is primarily due to the energy calculation I had instituted.
Originally, I was working with the equation that the scalar multiplier was equal to c = (-.0025714*energy) + 1.5142857

This worked fine on the primarily instrumental audio file. However, with the popular pop songs, I was unable to use this algorithm because the shift in intensities is a lot more varied when looking at the beats. Through testing, I need to find a new variable function for c.
One issue we ran into was that it’s difficult to visualize the beatmaps without the game code itself. The code unfortunately does not work on Windows, so we are having some trouble testing it. That is also reflected on the new gantt chart in our team status report.
Unfortunately, this does put us a few days behind schedule and I may have to implement a simpler melody tracker to compensate, but that will be determined. I created a side testing platform with the Python standard audio processing data, but the visualizer is still more accurate. I can continue work on the scalar c function without it for now.
We are slightly behind schedule, but we should be able to complete the project in time.

Stephen’s Status Report for 3/26

As mentioned in my previous status report, this week’s tasks were primarily focused on designing the finalized version of the drum module which incorporated what I learned through the prototype, designing a PCB to house the circuitry within that final module, and drafting the BOM for the components I’d need.

Here are the results of that progress:

The New Drum Module Design:

The EAGLE PCB board:

And the BOM for the EAGLE board and for the FSRs I’ll need:

The main change between these designs and the old prototype module is that I’ve removed the center platform in the drum module. This platform led to some undesired force dissipation along the crossbars, and as such I’m going to instead have the FSR supported through a platform that comes directly through the center of the PCB from the module’s base. Additionally, I’ve trimmed some of the wasted material from the prototype design, which when combined with the removed crossbar should hopefully reduce the printing costs.

The PCB also has LEDs in its 4 corners, which was a post-MVP target we had and which I feel should be readily achievable. I’ve already performed tests of the drum module using some spare LEDs I ad on hand, so I’m confident the ESP32 should be capable of adding this light feedback to the system. The needed holes for these LEDs to stick through have also been added to the drum module design.

Regarding the BOM, all of the components have been ordered. The PCBs are currently expected to arrive this Monday and I picked up the other components (excluding the FSRs) yesterday. I currently plan to test these components on a breadboard this weekend, and then solder them to the PCBs once they arrive this week. Assuming everything goes well, I’ll likely also print the new drum module by the end of this week to test the entire system together.

Regarding how this progress fits into our timeline, I think I’m on good pace with our initial estimations. As I mentioned last week, I feel the place I’m currently at aligns well with where I’d like to be for MVP even though I technically didn’t have the drum count we targeted for MVP (due to the additional 3D printing costs). If everything goes exactly as planned, I’ll likely have some flexible time in the coming weeks, so I’ll hopefully be able to help with improving the C++ code in areas like the game’s main menu.

George’s Status Report for 3/26

We’ve hit a few roadblocks this week.  My goals for this week were to figure out how to execute Shreya’s Python code from the cpp code, and debug some beatmap timing issues. I didn’t get to either of these. Instead, I worked on debugging some drum input issues and cross platform compilation issues so that we could reach MVP.

Drum Input Issues

Our MVP was scheduled to be completed by this week, but I unexpectedly encountered an issue with the drum input earlier this week. I reprioritized by tasks this week to ensure that we met the MVP. Here is the issue: the drum could connect to the game, but the inputs were being interpreted incorrectly. When the player holds the drum down, the game would think that the player is hitting the drum repeatedly. I debugged and resolved the issue.

Cross Platform Compilation Issues

The game currently does not compile on Windows. I currently am the main contributor to our gameplay code, and I use MacOS. However, we would like Stephen and Shreya to add features to the game as well. We tried to compile the game this week and we encountered many compilation issues on Windows, and I met with them to debug this. I think that I am going to need a solid 3 hours of debugging before I can figure out clearly why the game is not working on their machines.

More Files

I added some starter code for MainMenuMode.cpp, SongSelectionMode.cpp, and ScoreScreenMode.cpp.

 

My goals for next week are:

  1. Get the game to compile on Windows
  2. Look into executing Python from C++

Team Status Report for 3/19

This week, we worked on finishing up the individual parts of our assignments that needed to be completed before we can reach MVP. For George, this meant getting the game to read the hits from the drum apparatus and the JSON from the beat mapper. For Stephen, this meant getting the drum module prototype into a functional state and sending its hit information to the game code in a way that was readable. For Shreya, this meant finishing up the beat tracker and working on sending the beat information to the game code to be integrated.

Ideally, we should be able to hit MVP in the coming week. These components are mostly finished and this weekend, we should be finishing up the integration as well.

We have several challenges/concerns over the next week:

  1. Scheduling – if integration is not finished this weekend, we may push our MVP to Friday of this week instead of Monday. This is not a large issue because MVP would suggest most of our game is done. The gantt chart does not need to be updated yet, but it may need to be next week if we do not meet our deadline.
  2. Accuracy of the beat tracker – because Librosa (the Python standard) is not necessarily as reliable as we originally believed, the accuracy of the beat tracker is still unknown. Shreya’s blog post has more details on the specific problem. However, if it is not as accurate as we need, there will need to be more specific time in testing and tweaking to ensure we get the needed results.