 So if you select shell 10, it's only 100 samples. What's current is segment size is 40. That's why it's played two nodes, but both nodes were 21 one day. Yeah, two, 21s. That's not good. I said it's okay, but it's, yeah. Shell 10, if we plot the whole thing, let's say G, it keeps bounding with 21s. Some 27s in there, 34. They'll stop that by reloading the page. Explain how the frequency mapping is happening in the code sketch of 3.5, the same thing. There's two main steps, finding dominant frequencies, mapping frequencies to midi numbers, right? Reconciliation, de-trending, FFT analysis, identifying dominant frequencies, scaling to midi numbers, and doing adjacent response. So couple of questions. Are we doing dominant frequencies only? Can we find how many peaks are there in the frequency spectrum? So I wanna see if there are multiple frequency components in the data. So that would be within each segment size. I don't know if we should be plotting it because the tool is really quite heavy. Might have a plot option turn on, turn off. So if the plots turn off, the tool will be faster, hopefully. Can we modify the code to find multiple frequency spectrum peaks? So potentially F0, F1, F2, suggesting another function, F-ketch frequencies, I already know. So how many top frequencies is it finding? Five. I didn't see the top peaks. So how about we do three and then play them as separate notes? The adjective for a different suggestion, but I think this one actually will actually work. Number is preset somewhere, isn't it? We have one of find the peaks and then take three of them, but we should be assuming there are three peaks. Or should we? Find three peak frequencies in the spectrum and then turn them into the separate notes. We have played together a chord. Like chords. Let's modify this quickly. Can we modify the code to find three peak frequencies in the spectrum and then turn them into three separate notes played together? Currently, we have one note at a time. The window size of 100. And for sure we have the segment size at 40. That's why we're getting two notes. Should be a middle of a seizure. Okay, get chords. Yeah, one, two, three. Yeah, this minus three. They would not be played together. They'd be played one after another. Particularly, they get dominant frequencies. We'll get the three of them at once. Dominant frequencies, FFT, sampling rate, FFT. Yeah, this bit, so we're getting the top three in the list. Still returning dominant frequencies. So the output should be the same. We need to modify. Convert the G. The sampling rate is a mixed band. And lots of the midi numbers. This will stuff up my code. Give it a go anyway. They change this to 200. Doesn't work. So it's being rewritten elsewhere as the default. That must be in the HTML. And play at least 400. That will be one second worth of data. Inside of it should have 10 notes. If I'm playing till I actually change something on the page, select a different channel. Yeah, okay, no problem. So if I click this, this is an overlay, the problem. I use the scroller, getting a cheat data once. Why does it twice things? I'll change the code, lay midi numbers together as code. Also, when using the scroller, it twice it's dead off once only. How many functions do we have? Something wrong with this search. So I have nine definitions. Trend data, get dominant frequency. Scale to midi, frequency to midi. Load data, load data. We're already playing with the G. Update the play sequence function to accept a list of midi numbers and play them together as a code. You can do this by calling the play method for each midi number simultaneously. Yeah, but we don't have this function. Do we have PN ready somewhere? It's not in JavaScript. Wait, are you sure this is Python? This is JavaScript, isn't it? Play sequence. Yes, we do have play sequence. Yeah, made a mistake here. This should be JavaScript. Not Python. To update a JavaScript, let's say midi numbers is the same index to create another constant to hold all the oscillators for the code. Let's just try it out. Function is complete. Midi to frequency. So we have frequency to midi number. This is a mistake. And it's test like engine. Then make a mistake here. JavaScript does this function. It's 78. That's actually a different line. It's at 77. 751 sounds more likely. Midi to frequency. And this work, piano dotted with all notes. That's nice. Yeah, that's very wrong, isn't it? It's something very wrong. So for window size of 400, I expect 10 chords playing one after the other. And maybe three midi numbers for each segment. Can we make sure for each segment, we find three peak frequencies and then translate them into three notes and then play them as a chord. She could somehow jump between GPT-4 and 3.5 because obviously some things are simple and could be much quicker dressed by 3.5. So generally in the code, are we creating midi notes but then eventually turning them back to frequencies? Is that correct? Okay, that was a sound. It was horrible. It was horrible. Okay, so the conclusion is for now, sounds very horrible. Let's try playing with some more. The other thing is, we sure we have to increase the segment size. It's not JS, is it? No, Python. Oops. Not that. Second set. No, it's 40. This exercise should be longer. We can make it about 100. We run on the page and we do the whole segment. So this should have the seizure on set. So we start this page. And those are the frequencies that meant to be translated into notes, into chords, each three. So that would be your terminal frequency and essentially F1 and F2. So meant to be finding three peaks in the FFT in the spectrogram. Yeah, this will need more work. So by some of them, just repeat themself. Does it mean it couldn't find the third peak? Are any of them different like having three different components? No, they'll have one and two of the same. Sure, why? So if the segment size is 400, essentially we'll generate a chord every second. Let's try that quickly. There should be less of them. There's chords. Let's try the whole thing. All right, we'll need to remap those frequencies. It's generally working, okay. Yeah, any suggestions, comments, screaming at me? I'm doing something horribly wrong to let me know. And I'll see you next time. Bye.