 Let's do a quick one. We'll do the usual body chaos stuff. Egypt music here. We have the app overview, right? So we have this three, yeah, it's that quickly in your chat. So also be kind of tutorial on how to do this. We have the index HTML main JavaScript and app. Byton's script. This is a flask application meant to be shared with you when we are done or have something useful. Fetching EEG data, the fetching data function retrieves EEG data from a specified URL using query parameters for start, count, and channel. It handles responses and errors from the network request, updating data and visualization. The update data function reads values from a user interface such as the data slider, channel selector, and window size, fetches the corresponding EEG data and then plots this data using the plot EEG data function. It also calls the convert EEG to music function to initiate the music generation process. Plotting EEG data, the plot EEG data function creates or updates a line chart using chart. JS to visualize EEG data, converting EEG data to music. The convert EEG to music function fetches the URL to initiate the conversion of EEG data to music notes. The play sequence function then plays these notes. MIDI and soundfront integration, the script integrates with WebMIDI. JS for handling MIDI devices and soundfront player for playing music sequences. Eventlessness and initialization, the script uses DOM content loaded to ensure the DOM is fully loaded before executing. It sets up eventlessness for UI elements like the data slider and the play button. It also initializes the soundfront instrument, a piano in this case, and configures interaction with MIDI devices. We haven't shared the Python script yet, but the problem with it is that when you run it, it says a conversion is successful, but this bit should have generated the notes, which it does not. So we have to fix that. So the music player is working, I don't know if you can hear it. You probably can. Testing one of the notes and then the idea is that when you slide through the EEG, more notes are being generated. So it's breaking the EEG down and converting different frequency components into musical notes and we're using a grand piano. We haven't started prompting it yet. This is just loading the code. So the three files, we have the index HTML, we already loaded. Main JavaScript code and the Flask application itself. So we have these routes. The plain one is calling index HTML, get the EEG data using the load data function and convert EEG using load data and then converting to EEG. Yeah, the convert EEG to music scales the EEG frequencies and maps them into musical notes. We have some scaling in there as well. And the linear, we're using linear interpolation at this stage. Just something simple for mapping. Yeah, we're still in debug mode because the mode doesn't work right now. The problem, I'm getting to the nitty gritty of it. And yes, we'll be having this errors, main js line 90. Yeah, we're not getting the notes. So we need to fix this troubleshoot properly. Expected data is not being received. Yeah, we're not receiving notes back in the issue. Might not be sending the expected data format. There might be an issue with how the data is being fetched. Okay, so we don't have any errors in the terminal. Yeah, the network traffic is okay. We have a sound font now. That's the bit that we were struggling with last time. So we have this grand piano loaded. It's working okay from there. When you move the position within the EEG file, yeah, we should have been getting data. Convert music returns to hundreds. So it's working okay. Spectre network traffic, the digit music. Correctly handling the response. Yeah, there might be a problem with that last bit. But first of all, this bit is not returning the notes. Yeah, we'll keep troubleshooting. So the backend sending. Right, so we had that test that we were doing just sending, just sending this notes. It's in different format. Okay, so that's not happening. Yeah, let's try a single note. Say C4. Yeah, this one should be returning the note. Doesn't give any errors. Yeah, what are we doing wrong? Something in the JavaScript. Yeah, we get a 200 response. That's fine. Problem is that the app, the EEG, it's the one using the function. Yeah, we have that already. Can print the notes. But then you can understand what the return statement. Yeah, I'm pretty sure we don't have any cause issues. Right, sending notes. Printed, okay. We've started putting in endpoints being hit. This is expected. Shows that the router is seeing correct parameters. Sending notes. Okay, we must be having issues with the front end. So the backend is working correctly. I'm just scripting sure that the JavaScript function is sending the server response correctly. Should be expecting a JSON object with the keys, message and notes. So that doesn't happen. You're getting a 200 for the response. Asynchronous, this might be the problem there. So first of all, we're getting a 200 for that response, for the get request. Yeah, the content, content message only has, it should have the notes in the JavaScript part. Hcon, the Egypt music. Yeah, data and data notes. Yes, I'm getting no data received. No notes data received. Okay, when the data console log here. And what's all that? It's something to do parsing that JSON response. And as to this, we should print the notes above in the terminal. Okay, does it though? Okay, we change this print test to 65. So this one again, because I'm not convinced I'm actually getting there. No, it is. No idea what the problem is. Right, that's actually has the response data. A get Egypt data, contrashift C. No, that's, yep, that's getting the data into the convert to music, which says conversion successful. Doesn't have the notes. Okay, doesn't have a fetch. So it has this function. It's the structure. So we have, yeah, we have a fetch URL there. Data, data notes. Okay, might finish it next time. See you later. Bye.