Test the chat It's working. Okay, I can't hear myself still. Well, that's because I'm using the wrong headphones Now it should be working maybe It's the what five six five ten six second delay. That is pretty annoying, but we can manage Can live with that? Live live? Okay, still can't hear myself. That's because the Tof Headphones are not connected Sounds like this live stream is a good start Fully it picks up. I have to keep talking just so I can test my own sound What the thumbnail for this live streams it will be wrong Let's refresh the page again. No, it's still wrong doing live development. Just in case anyone Wants to join in. I have to. It's the post about it first Start in a sec And this is a good place to be if you are sick of meetings I'm not sure why they, why they all the thumbnail, maybe a different thumbnail for this video. Anyway, it doesn't matter. I can manage So if you've seen the last couple of videos, we are doing an eG2 music conversion Before that couple of things to try out talk about So we updated Visual Studio Code with a November release version 1.85 And the interesting thing is I'm gonna try The new GitHub co-pilot chat Okay, let's seem to Remove that entirely or something Okay, let's change this interface Okay, can start a new session Material when we type add Symbol should, should give us another option there It doesn't Right, it's actually here Why? Okay, so workspace So if we ask where is eG2 music version Should be able to search the whole All the files, so it's searching something Doing something and yeah, still get this array buffer allocation fail So they have videos showing how it's working. Well, I don't know why It's not working for me I'm on Linux Ubuntu. So that's obviously The Microsoft's reason for it not working That's okay. Yeah, they keep changing it all the time. So it's kind of almost pointless reading those instructions because It's obviously a work in progress Close that Start a new chat Just another quick thing Not related to what we're doing Yes, why would talk about it? GitHub co-pilot can Explain this code Let it run for a while While it's doing that and there's two papers on there EG portable systems for This is a walk response potential research Event related brain potential No, why? Yeah, eventually that that makes sense So it's a display. It's an eG response to a certain stimulus and could be vision sound anything really But this paper We would not have time to read it all especially because they keep coming up. There's another paper similar Normally just when looking papers at some of the images Yeah, not a great image there. That's the study study paradigm. I assume Not an easy image to follow And those are get those should have been in different colors. Come on But yeah, even without the different colors you can supposedly see the difference in response When stimulus is present And this is amplitude Microvolts up to the eG so you can see it's bugger all in this case like five a microvolt a change No, plus minus six seven microvolts You can also see interestingly that this signal is not detrended. There's that some DC In it Especially in this third example, you know what the difference between the three examples Anyway, we would not have time to read this papers so we Want to use chpd for it. So if I pop the link in interestingly enough The NIH a website, I Think just doesn't have gives permission or GPT-4 to crawl and crawl the site I Think that's the reason why I'm getting this A message from GPT-4. This is the other paper I'm able to access and in the beginning of the article you have this DOI Link which goes to the original paper. It's in From TES in neuroscience. So what happens if we put this link in Trying to access that website with Bing Actually able to think just pick up the abstract of the article Read that weekly also Validation of a low-cost portable EEG system for ERP research from frontiers in neuroscience discusses the validation of the muse EEG system for a ventilated potential ERP research It demonstrates the muse a portable and affordable EEG system You effectively capture and analyze ERP components like N 200 P 300 and reward positivity typically used in cognitive and perceptual studies The research involved comparing data from the MUSC system with that from a standard EEG setup showing MUSC's potential for ERP research in various contexts Would you try reading the whole article? I'm mainly after any data published in association to this article Yep, let's scrolling that page again Skim in this Responses it keeps referring clear. Can you read the whole article? Yep, what are the key findings? Yep, it's still giving me stuff from the abstract The muse EEG system effectively captures ERP components like N 200 P 300 and reward positivity It's comparable to standard EEG systems in capturing these components MUSC's portability and affordability make it suitable for various research contexts including cognitive and perceptual studies Have you actually read the whole article or are you giving me information from the abstract and long? My main question is how does the muse EEG device quality signal compared to our EEG recording paradigms Yep, that says I don't have a Access to full text before I'm pretty sure it said I've read the article Yeah, so this day Bit confusing. I was pretty sure it's just giving me stuff from the Rome the abstract Clear now question should we do this question So this article is Creative commons open source Being can't download PDF. We just work on it to register side. No PDF was just downloaded Have the PDF now GPT for Can you read the whole article? Can you read the whole article and summarize? I'm mainly after Information regards the data set used for this article. Is it publicly available? Not sure if you allowed to do it or not You meet the link to the article and why You have it or a article choosing news validation of a low-cost portable EEG system for ERP research primarily examines the effectiveness of the muse EEG system for recording event related potentials out The study involves 60 participants and compared data from the MUSC system with a standard EEG setup Key findings include the MUSC systems ability to capture ERP components like N200 P300 and reward positivity comparable to a standard EEG It emphasizes MUSC's potential for cognitive and perceptual studies due to affordability and portability For detailed data and methodology, please refer to the full article You read the entire article. Did you read the whole article is That data set used in this study publicly available Yep, it's reading it again. So obviously this would be different from Uploading the actual text into GPT Just trying to work with the PDF The article doesn't specify the data set using publicly available Can still train How was the data collected what they multiple devices compared? Yep in a study EEG data were collected from 60 participants using both the muse EEG system and the standard EEG system to compare their performance Multiple devices were indeed compared the portable muse system and a laboratory grade EEG system The comparison focused on the accuracy and reliability of the MUSC system in capturing specific ERP Assessing its suitability for cognitive and perceptual research For more details on the data collection methods and device comparison you can refer to the full article here Like you to read the whole article and not refer to the link anymore Could you explain the figures? particularly figures 2 to 4 doesn't seem to have I'm pretty sure I didn't read the whole article. I don't know if it's reading it now as we go It keep referring to the article compares the muse EEG system with a standard EEG setup across figures 2 to 4 These figures present conditional waveforms and difference waveforms for different tasks and analysis methods showcasing the performance of the MUSC system compared to the standard setup They visually represent the reliability and quality of the MUSC system in capturing ERP components The comparison is made across different conditions and tasks indicating the MUSC systems effectiveness in a variety of scenarios For a detailed view and understanding of these figures, please refer to the full article here again without referencing the article in a link online link could you explain the details of figure number two Figure two in the article presents the ERP waveforms recorded from the MUSC system and the standard EEG system It compares these waveforms for different components and conditions illustrating the similarities and differences in data captured by both systems This figure is crucial for understanding the efficacy of the MUSC system in accurately recording ERP components compared to the traditional EEG setup It's a really bad figure to understand should be labels Conditional waveforms standard analysis electrode PZ The top is the electrode PZ middle reduced the mouse to put electrode TP 9 TP 10 and bottom is the MUSC Yeah, obviously this was cherry picked as well Where can I find the raw data for this study? The raw data for the study presented in the article is not specified as being publicly available within the article itself Typically such data sets may be provided in supplementary materials or in a data repository mentioned in the article If not explicitly stated researchers often contact the study authors directly to inquire about data availability for further research or analysis Should I read papers that do not publish the raw data? Whether to read papers without published raw data depends on your research needs and standards Papers without raw data can still offer valuable insights theories and methodologies However, if reproducibility and data analysis are crucial for your work access to raw data might be a determining factor The decision ultimately depends on your research objectives and the importance of data transparency in your field of study Well, it's also that the figures in these papers are not great. I would like to reproduce them in a different way So they actually made clearer Can you explain figure five? Figure five in the article presents the mean amplitudes of the N200, P300 and reward positivity ERP components across three different analyses standard reduced and MEWS The figure includes 95 confidence intervals free to component This visual comparison helps in understanding the performance of the MUSC system in detecting these ERP components relative to the standard EEG system So while the reduced and MEWS conditions are similar There seem to be a significant difference between the standard EEG recording both in N200 and P300 Yes, figure five indicates significant differences between the standard EEG and the reduced MUSC conditions in capturing N200 and P300 components This highlights the variations in data quality and accuracy between the systems particularly in detecting specific ERP components Such differences are important for evaluating the MUSC system's suitability for various research applications About reward positivity study In the reward positivity aspect of the study figure five shows a comparison of the MUSC and standard EEG systems The figure likely indicates the differences in capturing the reward positivity component Which is crucial for understanding the effectiveness and limitations of the MUSC system in this specific aspect of ERP research This data helps in assessing the MUSC system's overall utility for various ERP components including reward positivity Can you extract the data from the figure? Yep Anyway, I have no idea why So this is normal N200 Extracting specific data from a figure in a PDF document is beyond my capabilities However, you can manually analyze the figure by observing the graph data points and comparing the mean amplitudes and confidence intervals for each condition standard reduced MUSC This analysis can provide insights into the performance differences of the MUSC system in capturing the reward positivity component This is the figure. Can you extract data from it? Yep Yep Guess it's actually using a PLO library It's using OCR to extract text It didn't do a great job extracting the text I don't know how does it know it's successful or not. I mean it's extracted something The OCR process did not successfully extract the detailed data from the figure To accurately extract the data from the bar graphs for N200, P300, and reward positivity We would typically use image processing techniques to analyze the pixel values and convert them into numerical data However, this process can be complex and may not always yield precise results due to variations in image quality and graph formatting To proceed, I can attempt to manually estimate the values from the bar graphs based on their relative positions and the scale provided in the figure Would you like me to do that? Let's do that. So now to the numpy ring image Converting to grayscale thresholding In vet Find contours Yeah, there will be problem with those contours The background bit over there. Which is anyway, it's not a great graph Filter contours It's not only find It's in the cream The contour detection approach did not yield the desired outcome for data extraction Instead we can employ a more direct method by estimating the mean amplitude values from the bar plots based on the y-axis scale I will proceed with this manual estimation approach to approximate the values for each component N200, P300, reward positivity from the bar plots provided Let's analyze the image to estimate these values Right, so now it's doing another Estimate Showing the figure So I estimated the values for N200 Standard mean minus 5 No more Yeah, I think it's really struggling with this image Because the same values Mean approximately minus 5 micromic SU Min Massachusetts News Standard mean approximately 5 micromic Reduced mean approximately five sea range approximately 0 to 10 microvolts the values are wrong yep i don't know why i don't know why this figure is like that it seems like to begin with a very bad a bad figure but i wonder if there is a reasoning behind it was it meant to confuse OCR and image detection it definitely confuses the human but the contour detection was successful in identifying the bar shapes from the figure the fact that at data extraction we need to measure the heights of the bars against the y-axis scale this is typically done by calculating the pixel distance between the top and bottom of each bar then converting these pixel measurements to corresponding voltage values using the scale of the y-axis however the current setup of the code detects all contours not just bars and doesn't provide the data extraction functionality to extract the data we would need a more complex analysis which includes isolating each bar measuring it and mapping it to y-axis scale that's similar to the original code what is it doing now right so it extracted some numbers why they're so large they obviously the absolute value is wrong i wonder if it's still correct in terms of the ratio between them doesn't look like yeah no it's wrong there was an error in the code you didn't correct indexing the image is actual size and y-axis pixel positions need to be accurately determined to match the image dimensions i will correct the code and try again right well it doesn't really matter if it's not being able to return the absolute value because it can't read those little numbers which again should have been just bigger the y-axis numbers should still give you like the relative size yeah it got an error again it appears there was another indexing issue due to the x-coordinate exceeding the image width this is likely because the estimated x positions for the center of the bars are not aligned with the actual image's coordinates but proceed correctly we need to accurately determine the x coordinates within the bounds of the image dimensions i will make the necessary adjustments and try again well right it's kind of hopeless you can you know it's not gonna succeed doing this many reasons like the original image is really the original figure is really bad should we try this one probably not yeah the colors come on the color should have been different just bad bad bad what year was it from right this was from 2017 can try and have a more recent paper it was comparing eg again an oddball task comparing eg from this headband and the 1020 eg cap some math does look just synthetic right this is different colors which is good again this is just five seconds more data to find if the raw data is available this could be turned into a graph fairly easily i guess it's over here yeah so this is in different bands comparing the two devices one good thing about this first study is that they did a comparison to the standard not just a reduced number of lectures here i'm not sure what they're doing i assume they just to reduce the number of lectures comparison the GPT might have better luck with this it's actually comparisons in different devices there's no chart for it GPT just make starting new shit to this table first see you can manage it gets the prices etc surprise this paper haven't turned this into a chart again infographic whatever get the paper let's do a quick i'm still loading quick summary they obviously there's more information on the muse you know if the paper is biased or just what's available still generating stuff or was it reading document why did it take so long network care the document signal quality investigation of a new wearable frontal lobe eg device focuses on a new wearable eg device named Mindy this study includes simulated signal tests and signal quality comparison experiments to assess the reliability and performance of Mindy the device has showed a stable and reliable hardware circuit with high correlation coefficients greater than 0.9 in simulated tests in comparison experiments with the gold standard device Neera scan Mindy demonstrated its ability to record high-quality eg signals in various tasks such as resting auditory oddball and attention tasks the study concludes that Mindy there's a promising eg recording device with potential applications in audiology cognitive neuroscience and daily requirements regarding the comparison of portable eg devices Mindy stands out with its high resolution compatibility with both dry and wet electrodes and Wi-Fi connectivity for data transmission it also offers features like impedance detection multi-device synchronization and event marking making it versatile for various applications the study highlights Mindy's advantages including its ability to provide raw data access high sampling rates and extended battery life which are essential for sleep monitoring and long-term eg data collection in research and cable settings the eg data sets generated for study described in the document are available upon request to corresponding author this suggests that while the data is not directly publicly available it can be accessed by contacting the author responsible for research yeah that's the graph for the the table there isn't it's an uh no it's not how to summarize this table visually we got a timeout first for today so might in a break um in the past was giving us like a one hour timeout this time it's only was it now seven yes seven minutes we can continue in seven minutes i don't know if we will keep getting those but yes it's actually more a bombarding the model get a timeout you can learn more about the timeout i've already submitted this in past usage cap request okay so the summary for this two papers is there yeah this is not a great paper at least the way it's published i haven't actually read the whole thing but yes say this graph is just the chart itself the graphics of it are really bad because you can well for example chipt4 could not extract anything out of it so close this one they have a paper yeah the graphs are better it's a newer paper as well so but this is not the whole data set with both papers the data is not publicly available there is only what's in some of the tables within the paper itself first part the first one didn't have any papers just read this bit just take a break integrated AFE to connect EEG data there are three data acquisition modes one transmit data to the computer in the local area network by the 32 Spanish Mercedes Wi-Fi module two save data in the sd card and three transmit data to the computer via usb the data can be saved on the computer in that format Mindy is powered by lithium battery and the battery life is about 12 h data recorded using a 1000 hertz sampling rate in 24 bit resolution figure one wearable frontal EEG device Mindy a hardware circuit b shape design and electro location of the wearable frontal EEG device Mindy and c circuit diagram of Mindy according to the EEG 10 to 10 system 7 ag silver 1 chloride dry electrodes with 9 millimeters in diameter fb1 fb2 f7 f8 fbz fd7 and fd8 are installed on the fixed position of the headband the shredding figure one b among the seven electrodes four electrodes fb1 fb2 f7 and f8 are connected to the analog input of AFE to record EEG signals the short circuit at fd7 and fd8 electrodes are used as the reference ref and the fbz electrode is used as the ground and Mindy supports both dry electrodes and disposable patch ag silver 1 chloride gel electrodes to collect signals these dry electrodes can be directly contacted with the skin to measure EEG or a patch electrode of matching size can be installed on the dry electrodes to measure EEG Mindy was worn on the forehead to collect frontal EEG signals 2.2 simulated signal test task in the simulated signal test task the arbitrary function generator AFG tectonics AFG 3102 beef of norgan usa was applied to simulate sine square and triangular waves with different frequencies 10 hertz 20 hertz and 30 hertz and amplitudes 40 the frequency of the simulated signal was in a frequency range of commonly recorded EEG since this AFG cannot generate signals with an amplitude below 1 millivolt the amplitude of the simulated signal was higher than that of normally EEG as shown in figure 2 the AFG was connected to the dry sensors of Mindy the simulated signal was used as the input signal of Mindy Mindy collected signals with 1000 hertz sampling rate figure 2 the connection between the arbitrary function generator and Mindy been a simulated signal test experiment 2.3 signal quality comparison experiments in this day 19 healthy students 8 females and 11 males were recruited from southeast university nanding china participated in the signal quality comparison experiment the average age of the participants was 22.79 plus or minus 2.57 years old all participants were informed about the experimental protocol and that his needing attention then signed the informed consent before the experiment this study was approved by IEC for clinical research of jungar hospital affiliated with southeast university IRB number 2019 ZDSYLL073P01 in this day during the signal quality experiment EEG signals of four channels fb1 fb2 f7 and f8 were recorded by the standard acquisition device Neuroscan tsunami two acquisition system and the wearable Mindy device at the same time Mindy collected EEG signals through disposable patch ag silver one chloride wedger electrodes ambu blue sensor and boron demar while Neuroscan collected signals through 10 to 10 system electrode cap with conductor paste to ensure that the EEG collected during the experiment had good signal quality alcohol and scrub gel were used to clean the forehead to reduce the impedance between the electrodes and the skin before the experiment before EEG acquisition the skin electrode impedance of both Mindy and Neuroscan dropped below 10 kilo ohms the wearing position of Neuroscan and Mindy was shown in figure 3a after wearing the Neuroscan's electrode cap as normal Mindy was worn below the electrode cap the EEG collected by Neuroscan used the 10 to 10 system EEG cap so the Neuroscan electrode positions defaulted to the standard 10 to 10 system by adjusting the wearing position of Mindy for the angle of the patch electrodes the electrodes of Mindy were as close as possible to those of Neuroscan the heads circumference and shape of each subject were not the same but after adjustment the distance between Mindy's patch electrodes and Neuroscan's electrodes was within 1 centimeter for both devices the sampling rate of the EEG signals was 1000 hertz and the references were fd7 and fd8 figure 3 signal quality comparison experiments a wearing position of Neuroscan and Mindy b resting state task c water tree old ball task okay obviously the reference is very important to suggest the references on the device itself assume the electrodes are on the forehead so they actually not in the same position as the 10 10 EEG montage yeah so there's lots of questions about this one again the raw data is not available you'd expect the data from all the electrodes in a raw shape and form without processing anything yeah I'm not sure why include a figure like that that could be just mentioned in text this yeah I don't think this one is of much use as well well yeah this is handy you want those actual recordings resting state let's see oh I it's I open I closes it so A is eyes close and B is eyes open instead of eye motion or a blink so essentially this has whatever that is I assume it's an eye movement that the the mind deep the portable device recording was a double the eye movement the amplitude which if you consider it to be your artifact it's not a great thing so here as well the question about these things is so yes sometimes the amplitude is greater but the question is what out of it is actual EEG so this amplitude fluctuations could be non EEG could be slight movement or things like that so yeah it could be good to look at the raw data I don't like summaries like this they tend to be somewhat biased in the way it's being processed yeah relative power to what so it's out of all the power but how come it's relative power here as well I get relative yeah this relative power just look in this graph a lot alone you will assume that all these numbers should add up to one so you have a point three five point two two five point two point one the chip the OCR and the image processing would be able to extract extract these numbers I suspect let's run down point three two point two five point two and point one does come to one okay but what's relative power in here the numbers available in those tables no and then there's a comparison table with all these different devices where they weren't actually tested in the study so show how it's that relevant yeah we'll spend more time on it if the raw data was available but it's not anyway we already spent too much time on this and we should be going to use it before as we do this quickly we have this two one 35 now also didn't tell me yeah the title of the previous chat so yeah when you put the NIH it's called NCBI papers you get the access denied by robots which is fair enough but yeah we now have till one 35 so the time it came us before was wrong let's try github co-pilot chat will explain this one I don't know if you need to do this or not explain this yes still have that error don't be so it's too easy 3.5 for now old model it's 3.5 so much faster it's crazy fast and we have this java script co-pilot explain this hoping them to 3.5 as well how much faster is this crazy fast and look at the cheat then we have the up by I could get up co-pilot it's using the ngp4 f4 it's slower so we'll html java script item call let's play this and let's also run item call no we don't want the virtual environment this is what we had yesterday so just select shell 10 it's only 100 samples what's a current a segment size is 40 that's why it's played two nodes but both nodes were 21 one day two 20 ones that's not isn't it's okay but it's yeah shell 10 if we plot the whole birthday g it keeps bounding with 21s some 27s in there 34 it'll stop there just by reloading the page yeah this are the frequencies questions how is the frequency mapping explain how the frequency mapping is happening in the gold it's the gpt 3.5 the same thing there's two main steps finding dominant frequencies mapping frequencies to midi numbers by the way I'm really wondering if flesche the trending fft analysis identifying dominant frequencies scaling to midi numbers and doing adjacent response so couple of questions are we doing dominant frequencies only chat gpt yes in a provided code the eeg data processing focuses on identifying dominant frequencies in the eeg signal segments specifically it calculates the dominant frequency for each segment using the fast Fourier transform fft technique the code does not capture or analyze multiple frequencies simultaneously within each segment the dominant frequency represents the frequency component with the highest amplitude within a segment of the eeg data it provides a single prominent frequency value that characterizes the signal in our segment if you want to capture and analyze multiple frequencies or frequency components simultaneously in the eeg data you will need to modify the code to perform more comprehensive frequency analysis such as identifying multiple peaks in the fft result or applying techniques like spectral analysis to extract a broader range of frequency information from the eeg signal can we find how many peaks are there in the frequency spectrum peaks yes that's what I meant fast Fourier transforms and converted into a frequency demand and then into a frequency where the dominant should is highest so I want to 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 really quite heavy might have a plot option turn on turn off so if the plots turn off the tool will be faster can we modify the code can we modify the code to find multiple frequency spectrum peaks so potentially f0 f1 f2 yes you can modify the code to find and analyze multiple frequencies in the eeg data including a fundamental frequency f0 and its harmonics f1 f2 etc to achieve this you will need to make several modifications to go adjust segment size you may need to adjust the segment size use for fft analysis larger segments can capture more frequency information but may result in reduced time resolution identify multiple peaks instead of finding only the dominant frequency be modify the code to identify multiple peaks in the fft result for each segment this would involve searching for and recording the frequencies corresponding to these peaks filter harmonics after identifying multiple peaks you can filter and analyze the harmonic frequencies f1 f2 etc by examining frequencies that are integer multiples of the fundamental frequency f0 these harmonic frequencies will typically appear as peaks at integer multiples of the fundamental frequency store multiple frequencies store the frequencies corresponding to the identified peaks in each eeg data segment allowing you to capture multiple frequencies in a spectrum here's a high-level example of how you might modify the code python copy code hash modify the get underscore dominant underscore frequencies function to return multiple frequencies def get underscore frequencies eeg underscore data sampling underscore 8 segment underscore size equals 40 frequencies equals hash divide eeg underscore data into segments and analyze each segment for high in range 0 then eeg underscore data segment underscore size segment equals eeg underscore data ii i plus segment underscore size if then segment less than segment underscore size break hash skipping complete segment harsh to trend the segment the trended underscore segment equals to trend underscore data segment hash up by fft to the The Trinidad segment FFT underscore result equals NB dot FFT dot FFT, the Trinidad underscore segment FFT underscore for Q's equals NB dot FFT, FFT for Q, then, the Trinidad underscore segment D equals 1, something underscore 8. Hush extract the magnitudes FFT underscore magnitudes equals NB dot FFT. Hush modify the converted E to music root to return multiple frequencies. Hush modify the scale underscore E underscore underscore midi function to handle multiple frequencies. Please note that these modifications provide a general idea of how you could adapt the code to capture and analyze multiple frequencies, including harmonics. The specific implementation details may vary based on your requirements and the characteristics of your EEG data. So see what GitHub cupart says, suggesting another function, we have catch frequencies already now. So how many top frequencies is it finding, finding some of the topics, so how about one, two, three, and then play them as separate notes, in a different suggestion, but I think this one actually will actually work, number is preset somewhere, isn't it? Please note that these modifications provide a general idea of how you could adapt the code to capture and analyze multiple frequencies, including harmonics. The specific implementation details may vary based on your requirements and the characteristics of your EEG data. The code can be used to identify multiple peaks, instead of finding only the dominant frequency peak, modify the code to identify multiple peaks in the FFT result for each segment. This will involve searching for and recording the frequencies corresponding to these peaks. Just quickly again, so I want to try it quickly. It will be quick to implement. Just quickly, I should have done. In this modified function, find underscore multiple underscore frequencies, the code identifies peaks in the FFT magnitude spectrum and extracts the corresponding frequencies. You can adjust the threshold parameter to control the sensitivity of peak detection. We have one of five that peaks, and then take three of them, but we shouldn't be assuming there are three peaks, or should we, three peak frequencies in the spectrum separate and play together. Yes, you can modify the code to find multiple peak frequencies in the spectrum and then play them together as a chord. Here's a high level outline of the modifications you can make. Modify the frequency analysis function. Adjust the get underscore dominant underscore frequencies function to find the n highest peaks in the FFT result instead of just one. You can use functions like arg partition or arg max with appropriate conditions to identify the indices of the highest peaks. Extract multiple dominant frequencies. Modify the code to extract the frequencies corresponding to the identified peak indices. Store these frequencies in an array or list. Scale frequencies to midi numbers. Use the frequency underscore underscore midi underscore number function to scale each of the extracted frequencies to midi numbers. Play the chord. Once you have the midi numbers representing the multiple dominant frequencies, you can play them together as a chord. You may need to use a library or tool that supports playing multiple midi notes simultaneously. Here's a simplified example of how you can modify the code to play three dominant frequencies together as a chord. Python, copy code hash inside the convert e to music root. Hash modify decide to find the n highest peaks instead of one peak underscore indices equals nb arg partition FFT underscore magnitudes nn. Hash. In this example, n represents the number of dominant frequencies you want to capture and play as a chord. You may need to adjust the code further to handle user input or other requirements specific to your application. We're going to be using a play the way and now let's change this for reference only. Let's modify this quickly, can 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. Window size of 100. Pretty sure we have the segment size at 40, that's why we're getting two notes. Should be a middle of a seizure. Okay, okay, okay, okay, okay. First, it's horrible. Well, that's why we're looking at chords, looking at chords. Update the get underscore dominant underscore frequencies function to return the top three dominant frequencies instead of just one. You can achieve this by sorting the dominant frequencies into sending order and selecting the top three. Yeah, top three, yeah, this one is three, they would not be played to key ever, they'd be played one after another. Modify the convert underscore eq function to handle the three dominant frequencies and convert them into three separate MIDI numbers. You can then play these MIDI numbers together as a chord. With these modifications, the convert underscore eq function will return three MIDI numbers corresponding to the top three dominant frequencies found in the EEG data. You can then play these MIDI numbers together as a chord. Yeah, okay, how do I do that? First of all, because we're making so many changes, let's do some saving. Well, this tool definitely works, but yesterday, get rid of all these copies as we're changing the bottom chord, particularly the 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 that top three in the list, still returning dominant frequencies to the output should be the same to modify, convert the EEG and the sampling rate to the next 10 and part of the MIDI numbers. This will stuff up my code, give it a go anyway, the HDS-2200 doesn't work, so it's supposed to be rewritten elsewhere as a default, it must be in the HTML, even if you play at least 400, that will be one second worth of data, and inside we should have 10 notes. If one player did actually change something on the page, so it's a second different channel. Yeah, okay, that problem, so if I click this, this is an unrelated problem, I use a scroller to make a cheat data once, and wipe does it twice, change the code, play MIDI numbers together as a code, also get the A when using the scroller, twice, get off once only. To play the MIDI numbers together as a code, and to prevent notes from playing twice when using a scroller, you can make the following modifications to code, update the play sequence function to accept the 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. I already have a play sequence, no, why not, how do we play, how many functions do we have, something wrong with this search, do 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 HE. Update the play sequence function to accept the 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, let's have piano ready, do we have piano ready somewhere, it's not in JavaScript, are you sure this is Python, this is JavaScript, isn't it, play sequence, yes we do have play sequence, yeah my mistake here, this should be JavaScript, not Python, to update a JavaScript, let's see, MIDI numbers, it's the same, the index to create another constant to hold all the oscillators for the chord, let's just try that, function looks complete, we need the frequency, do I have this function now, let's do it by the code, so we have frequency to MIDI number, with these modifications, when you call the play sequence function with a list of MIDI numbers, you will play them together as a chord by creating multiple oscillators for each note and stopping them after a short duration, this should prevent notes from playing twice and play them together as a chord, adjust the duration and oscillator settings as needed for your desired sound, this is a stick, let's test that again, then let's take here JavaScript as this function, 78, that's actually, a different line is it, 77, 15, while it sounds more likely, MIDI 2 frequency, and this work, piano, dotted with all notes, that's nice, yeah that's very wrong, isn't it? for these modifications, when you call the play sequence function with a list of MIDI numbers, you will play them together as a chord by creating multiple oscillators for each note and stopping them after a short duration, this should prevent notes from playing twice and play them together as a chord, adjust the duration and oscillator settings as needed for your desired sound, it's something very wrong, so for window size of 400, expect, I expect then chords, chords, play one after the other, one after the other, yep also are the chords made of notes or frequencies, yep why do I need another function, can we just modify one of the existing functions? you can certainly modify one of the existing functions to play chords sequentially without creating a separate play chord sequentially function, here's an updated version of the play sequence function that achieves this, in this modified play sequence function the promise chain is created directly within the function and it plays the chord sequentially waiting for each chord to complete before starting the next one, the result function is passed to the play chord function to signal when the chord has finished playing ok, we don't actually have the play chord function as well, but we need a play chord, can we just modify existing functions? certainly, you can modify the existing functions to play chords sequentially without introducing additional functions, here's a way to achieve sequential chord playback by modifying the play sequence function still has play chord in it, what's in play chord again? play chord, we have a modifying play sequence, it's here it seems like you've integrated the chord playing functionality in the existing code, here are the modifications you made to the code to include the chord playback functionality yep, so it's here you can add some debugging statements to your code to help identify the issue for example, you can add a console.log statement before the free tube to log the value of MIDI numbers in a bit, 3 MIDI numbers for each segment this JavaScript code is part of a web application that transforms EEG, electro and cephogram, later in the music here's a brief overview of its key functions audio context management, get audio context, creates an audio context for handling audio operations resume audio context, resumes the audio context if it's suspended, ensuring continuous audio playback piano sound loading, load piano, uses the sound from library to load piano sounds it sets a global piano object in the flag piano ready when the piano is loaded fetching EEG data, fetch EEG data, start, count, channel, fetches EEG data from a serve endpoint, with parameters for data start, count and channel data update and plotting, update data, updates the EEG data based on user interactions like slider movements or channel selection it then plots the EEG data and converts it to music EEG data visualization, plot EEG data, EEG data, plots the EEG data using chart, yes converting EEG to music, convert EEG to music, start, count, channel, converts EEG data into MIDI numbers this data is then used to generate music music playback, the functions play chord, MIDI numbers, then play sequence, chords, play musical chords and sequences, respectively MIDI to frequency, MIDI number, converts MIDI numbers to frequencies user interactions a band listeners are set up for playing MIDI sequences and for debouncing the data update function, ensuring smoother user interaction the bouncing function, the bounce, funk, weight, or media, is a utility function to limit the rate at which a function can fire this script combines web audio API, data fetching, and interactive visualizations to create an interesting application that turns brainwave data into music this python script is for a flask web application that turns EEG data into music it consists of several key components flask application set up, the application is set up using flask or web framework for python roots are defined for serving the main page and handling specific requests like fetching EEG data and converting it to music roots renders the main page, index, 8tml get EEG data, fetches EEG data based on provided parameters like start, count, and channel convert EEG to music, converts EEG data into MIDI numbers suitable for generating music data loading and processing load underscore data, start, count, channel, loads EEG data from a text file, selecting a specific channel and range the trend underscore data, data, removes linear trends from the data, preparing it to frequency analysis get underscore dominant underscore frequencies, EEG underscore data, sampling underscore 8, segment underscore size determines the dominant frequencies in segments of EEG data using fast Fourier transform, FFD music conversion frequency underscore to underscore MIDI underscore number, frequency, converts frequencies to MIDI numbers scale underscore EEG underscore to underscore MIDI, EEG underscore frequencies, scales the EEG frequencies to MIDI numbers ensuring they form within a standard piano range configuration and constants, the script sets various constants such as the sampling frequency, FS, and file parts for EEG data error handling, the roots are equipped with tri accept blocks to handle exceptions and return appropriate responses main function, the application is started with app.run, debug equals true, in the main box, enabling debugging mode for development purposes this application integrates data processing with web technology, showcasing an innovative way to visualize and interact with EEG data it's designed to read EEG data, analyze it, and transform it into a musical format, creating a unique auditory experience based on brainwave patterns the error type error, MIDI numbers, for each is not a function, suggests the MIDI numbers, which is expected to be an array there's not an array format where it is passed the play chord function this issue typically arises when the expected input format doesn't matter the actual data being received let's examine a couple of potential causes and solutions incorrect data format, ensure the MIDI numbers is indeed an array can we make sure for each segment we find three peak frequencies and then translate them into three nodes and then play them as a chord you can modify the get underscore dominant underscore frequencies function to find the top three peak frequencies in each segment and then translate these frequencies into nodes to play them as a chord here's an approach to achieve this modify get underscore dominant underscore frequencies function, update this function to return the top three frequencies for each segment instead of just one dominant frequency sure I changed this already, honestly, you know what make sure the play chord and play sequence can handle an array of arrays, where each array represents a chord, an array of three MIDI numbers yes we don't have these functions make sure the play chord and play sequence can handle an array of arrays, where each array represents a chord, an array of three MIDI numbers converting frequencies to chords, you'll need to dust the scale underscore eg underscore underscore MIDI function or add a new function to handle the conversion of three frequencies to a chord, an array of three MIDI numbers integration, make sure that the data flow from the EEG data processing, Python, and the music playback, JavaScript, greatly handles this new structure of data, particularly the format of the data sent from the flask after time by implementing these changes, your application will be able to find the top three frequencies in each EEG data segment and translate them into chords for playback MIDI to frequency conversion, MIDI to frequency, MIDI number, converts a MIDI number to its corresponding frequency chord playing, play chord, MIDI numbers, takes an array of MIDI numbers, lengths should be three for chord, and plays them simultaneously oscillator creation, for each MIDI number, an oscillator is created with the corresponding frequency gain node, a gain node is used to control the volume of each note start and stop, each oscillator is started immediately and stopped after one second, you can adjust the duration as needed error handling, the function checks if MIDI numbers is a valid array with exactly three elements remember, you need to have an audio context available and make sure the browser's auto-play policy is handled, eg, requiring user interaction before playing sound this function should be integrated with the rest of your application where MIDI numbers are generated and played as chords sequence validation, this function first checks if chords is a valid array of chords, where each chord is an array of three MIDI numbers chord duration, chord duration specifies the length of time each chord is played it's set to 1000 milliseconds, one second, it can be adjusted playing chords sequentially, the function uses a recursive approach with set timeout to play each chord after the previous one has finished iteration over chords, play next chord is a recursive function that plays each chord in the sequence and schedules itself to play the next chord after the current one has finished starting the sequence, the sequence of chords is started by initially calling play next chord this implementation assumes that play chord plays each chord for exactly chord duration milliseconds adjust chord duration as needed based on our application's requirements and the implementation of play chord this function should fit into the broader context of your web application where the sequence of chords is determined from the eg data she could somehow jump between GPT-4 and 3.5 because obviously some things are simple and could be much quicker addressed by 3.5 so generally in the code are we creating MIDI notes but then eventually turning them back to frequencies? is that correct? yep ok that was a sound, it was horrible frequencies to MIDI notes these extracted frequencies are then mapped to MIDI notes MIDI notes are a standard way to represent musical notes in the digital world each MIDI note corresponds to a specific frequency the mapping is done using the formula after converting a frequency to a MIDI note number this step is necessary because it's easier to work with MIDI note numbers for musical purposes like ensuring the notes are within a certain musical scale or range MIDI notes are frequencies for playback when it's time to play these notes the MIDI note numbers are converted back into frequencies this is because in the end you need actual sound frequencies to play music the web audio API which you are using for playback requires frequencies in HZ to generate sound using oscillators the conversion from MIDI notes back to frequencies is done using the standard formula that mapped MIDI note numbers to their corresponding frequencies in summary the process starts with the eg data, biological signals, transforms these signals into a musical representation, MIDI notes and then converts these MIDI notes back into sound frequencies for playback this approach allows for an interesting and creative way to interact with the eg data, turning it into a musical experience ok, so the conclusion is for now sounds very horrible try playing with some more the other thing is pretty sure we have to increase the segment size it's not chess, is it? no, python what is it? segment size, no, it's 40 yeah, this segment size should be longer if we make it about 100 we will run on the page and we do the whole segment so this should have the seizure onset and after the seizure sorry for that, I have to reduce the volume it's pretty horrible to start this page those are the frequencies that meant to be translated into notes into chords each three, so that would be your dominant frequency and essentially F1 and F2 so meant to be finding three peaks in the FFT in the spectrum will work by some of them just repeat themself, does it mean it couldn't find the third peak or 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 will 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 I don't need to remap this those frequencies generally working yeah, any suggestions comments screaming at me presenting something horribly wrong do let me know and I'll see you next time


Good afternoon. Welcome to the session on securing and insecure world. Of course, I'm biased, but if it is one session, and that was your, you should go to, it is this one. So you've done a good choice. And with this panel, I think we're also going to get enlightened. We are faced with the most complex geopolitical backdrop in any Davos, this is in the last decades. And I like the title how we can make an insecure world a bit more secure. On my left, I have Annalena Berbach, federal minister of foreign affairs, Germany. Then we have His Highness Faisal Al Saud, minister of foreign affairs, Saudi Arabia. Then we have Sandra Chris Coons from the US, Delaware, the former seat of President Biden. Then we have Yousef Tugar, minister of foreign affairs in Nigeria. Welcome, minister. How many days have you been in the job? Sounds like forever, but only since August. They say being foreign minister, one, they're dog years. I think dog years is like seven, is it? So then we go also to the Finnish foreign minister, Elina Valtonen, welcome. And then I think it doesn't need that much presentation. Jens Doltmerg, the secretary general of NATO. So give them an applause. So we start on a little bit of a positive note. We will have to touch on the situation in the Middle East, the danger of escalation, latest development in the Red Sea, but of course also the ongoing war in Gaza. We will also have to touch on the other war in Ukraine. We'll also have to touch on what we just heard this morning, China's premier and the G2 US China, but also the order that we left is gone. The post called war order. We're between orders. So we don't really know what the new order will be. Hopefully not the jungle growing back, but something based on international law and the UN charter. So we will also touch on that. And then I think 45 minutes are gone. So without any further ado, Your Highness, Minister Faisal, where to start and end? How worried are you about the situation in the Red Sea? It's one of the major transportation canals of the world. We're seeing no ships going around Africa instead of in the canal. Was it necessary to take the steps? We did know. Are you supportive of them? And you have been trying to reign in the Houthis for quite a while, haven't you? I think we are incredibly concerned for regional security in general. And of course, freedom of navigation in the Red Sea is something that impacts all of us. And we think the priority needs to be de-escalation, de-escalation in the Red Sea, but in the entire region. And we are going to engage to make that happen. And part of that, of course, is also making sure that we engage with all stakeholders. How connected is this with the war in Gaza? I mean, it's clearly connected, given that it's coming in that context. And in any case, we need to focus on the war in Gaza, not because of the Red Sea. We need to focus on the war in Gaza because of its impact on the Palestinians first, but on regional security in general, and on the risks that it poses for further escalation. And we've seen now close to 30,000 civilians killed in Gaza. We continue to see civilians being killed every day. We continue to see restrictions on access to material aid. And frankly, we don't see any real sign that any strategic objectives that Israel has claimed are becoming any closer. So we need to have a ceasefire immediately. We need to set the ground for a credible process that enables the Palestinian Authority that allows us to have a process towards peace in the region. This will resolve many of the challenges that we have in the region. But continuing as we are now, continuing to see the suffering that's happening in Gaza, is likely to lead to continuing cycles of escalation. I think many of us were a bit relieved that it did not escalate the situation in Gaza to Lebanon. But what we're seeing now is it has escalated to Yemen and has impact on the navigation in the Red Sea. You also, in the kingdom, had the rapprochement with Iran. Are you surprised of the role in Iran when it comes to this situation and with the escalation with the Houthis, or are they not that involved? I can't speak for the Iranians. But what I can say, again, I just want to make clear that our priority and our emphasis is on finding the path to de-escalation. And that is primarily, in our view, through a ceasefire in Gaza. That is through serious engagement across the region. But we need to focus on the immediate crisis. The immediate crisis is the suffering that's happening in Gaza. We're continuing to see that going on. We don't see any real prospects for that ending. And I'm somewhat heartened to see that the international community has been moving more in the direction that we have called for since the beginning, which is calling for ceasefires, which is calling for more humanitarian aid. But we need to do more. Clearly, not enough has been done because the killing continues and the suffering continues. Minister Berbock, I think you visited the region, Israel, and the Palestinian areas also four times since 7th of October. You heard what His Highness is saying, that we need a ceasefire. We need to de-escalate. What's your take on what the minister just said? Well, also the two of us, but with many colleagues and friends, we have been in constant contact in the last three months because in my assessment, this is a total disaster. It's a disaster for Israel. It's a disaster for the civilians in Gaza. It's a disaster for the whole world. And we are working nonstop at foreign minister level at the moment to prevent that just a spark could burn the whole region. And not only the region. I mean, we feel the consequences also in Ukraine. We feel the consequences that in Europe, media is not reporting about the most heavy attacks from Russia on civilians in Ukraine since the start of the Russian invasion. We feel the consequences. I traveled after I've been last week to Israel to Gaza, rougher border crossing, and also to the neighboring countries. I went to the Philippines and Malaysia. We as Germany feel the consequences there, because in Malaysia I'm being asked, so do you have any sentiments against Muslim countries? Because you are not calling for a ceasefire in the wording my dear colleague and friend, Prince Faisal, has put in it, we are calling for a sustainable ceasefire, because I believe that a ceasefire, unfortunately, doesn't fall from the sky. We can only reach a ceasefire if both sides are ready. That's a suffering for oneself, also and it's a suffering from the others. And my assessment, and actually not only assessment, I'm really emotional about this, because we are speaking about children still in hostage with Hamas in Gaza, one year old child. We are speaking about a boy I just saw in Alarish Hospital when I was there. When I went from Gaza crossing Rafa to the hospital 10 kilometers away, at the same moment, a five-year-old boy came by ambulance waiting for weeks that he could come to Egypt to be treated in the hospital. I just entered only with his mother and his baby sister. The whole rest of the family have been killed. And the discussion about the ceasefire sounds so technical, but it's about saving these children. Those children still being hostage, those children suffering under the humanitarian disaster. And I believe the problem we are in is actually we know the solution. We can only come out together on a plan, on the ceasefire, on a plan, on a two-state solution. But at the moment, we are stuck in a vicious circle, because the vicious circle means you cannot say, but you have to start or you have to start. It has to come all together, the freeing of the hostages, the ending of the humanitarian situation, the question, and this is where we might disagree, that there has to be the call from the whole international community that Hamas has to lay down its weapon. So Israel is not threatened from Gaza anymore. And obviously, and this is what others are asking from us, like Germany standing with Israel's right to self-defense, obviously this includes also a change of strategy that not so many civilians are dying in. At the moment, we are stuck in this vicious circle, and we have to find, and I think this is our obligation, as an international community of those who believe in the rule of law, to find the solution, to come out of this vicious circle. Yeah, and this is why I'm traveling. Many colleagues are traveling all around the clock to come to peace, not only for the region, but I would say for the whole world. Well, thank you. Isn't it the danger that the humanitarian sufferings in Gaza will just continue and continue until there is a political solution? Because at the two former, during the two former Gaza wars, there were conferences after where there was a lot of money pledged and one rebuilt Gaza. But I guess the international donors don't want to rebuild again if there is a danger for total or destruction in the few years. And then I'm looking at what are the realistic scenarios. One scenario is the Seattleists just stay. So we're on, like, a pre-2005 situation before Israel pulled out. Then we can see a situation where the PA and Fatah takes over the rule of Gaza. I guess they will be quite reluctant. I don't know what Abomasin says in his discussions with you on this. And then the third one could be Fatah Hamas. But I guess Israel is not very open for that solution. So what is now really the most realistic outcome for Gaza that can also bring humanitarian relief and bring us on the path, as you mentioned, for a two-state solution? I believe the only way out is a two-state solution. If everybody recognized that Israelis can only live in peace and security when Palestinians live in peace and security, but the other side is also true, Palestinians can only live in peace and security if Israelis for the future are guaranteed that also they are capable of living in peace and security without any rockets flying anymore. So actually, I would say the answer is there on the table. But the problem is the bridge over the other side of the river. We cannot walk together, because on the concrete measures right now, it's always this tit for tat. If this doesn't happen first, then this cannot happen. And we have to end this blame game. And I believe, again, it needs actors, different countries, which come together and say, this is the way how we bridge it, and maybe change our course, not asking the question on which side are you on. We are in a black and white situation also in our countries. Yeah, we are so divided on it. If we ask it from the point of the people, and I mean human and foreign politics, it's about the people. If we are, what do the people of Israel, what do the people of Gaza need? And they need, obviously, in Gaza, humanitarian access now. So the question, how do we come to the political answers, is that we have to change course on the humanitarian situation. This is why, concretely now for me, German foreign minister, I was saying loud and clear that the access to Gaza has to change. I believe that it's highly important that Ashtodport and RS can be used as border crossing as well. Obviously, there was checks, but I was standing there besides estimated 3,000 trucks waiting to enter Gaza. People are starving there, and here's the food. So the food and the water has to come in. On the other hand, and this is what I'm discussing with our friends and colleagues, we cannot ignore that the majority of the hostages is still in the hand of Hamas. Some people think, well, the hostages have been freed now. No, the majority is still in the hand of Hamas. So while speaking about humanitarian access to come in, because of the people, we have to say together, and this is my call for other countries who haven't addressed it so clearly yet to call on the freeing of the hostages, so without any conditions. And if we do both together, I believe this could be the step which we need on then further question of the role of Fatah, the role of the PA. I was there, I was speaking about the question of reforming, about the question of holding up elections. I mean, this was also a discussion before that we need, obviously, elections also in the West Bank. But then you can end up with Hamas winning in the West Bank too, can't you? Well, this is interesting.  I mean, this leads nowhere. And when I was in Israel this time, I also spoke to researchers. And there were interesting findings. In German media, it was reported that an assessment which has been made in Gaza and in the West Bank, it was reported the majority is now for Hamas. In Gaza and the West Bank. When I spoke to the researcher in Israel, actually, the finding was it was a majority. If you ask all the people, but it's always the same with polls, the question is, how do you ask the question? And the question, if they would support Hamas in this kind of situation, it was not about 50%. So it was not the majority. Many people obviously said, we don't know. And actually, the increase from the support of Hamas, at least to this poll, has increased only by 4% to 6% over the last three months. So the rhetoric, which is also there in German and Western media of saying, now there's a big push for Hamas. This is not the finding from the people. Because obviously, the people are also suffering under Hamas.   We have to address, again, a question for us international players to find a solution. We have to also think, and this is what we are discussing, the day after. So how can we hold election? What would be the precondition? My precondition, obviously, guaranteeing the right of Israel and guaranteeing the right of the Palestinians, live in peace and security. I mean, these are the international rules the Charter of the United Nations was founded on. And the worst thing we could do is just wait and see. For me, this is no option at all. Obviously, it's very difficult to move one step further. But wait and see, we saw now in the last three months, just leads to further escalation. And therefore, I'm really thankful for the exchange here today. No, thank you very much, Senator Kunz. In the Arab peace plan, if there was a two-state solution, the Arab countries were guaranteeing also for Israel's security. It was a Palestinian state. But it was a broad regional understanding, based also on the global understanding. Listening to Prince Faisal, also the German foreign minister, how can, is there a possibility at all to break the current impulse, both in Gaza? When will the war end? How will it end? And also on the two-state solutions, because there is like almost 30, is more than 30 years since the Oslo process now. Yes, I am optimistic that there is a possibility of peace along that framework. Two months ago, a group of 10 senators, five Republicans, five Democrats, went to Riyadh, met with the Crown Prince, went to Tel Aviv, met with Prime Minister Netanyahu, the war cabinet. And other leaders in Israel went to Cairo and met with President Al-Sisi. And the possibility of that regional peace, regional reconciliation with a real path towards a Palestinian state is still there. But the conditions on the ground have gotten worse every single day. The suffering of civilians in Gaza has gotten to an unacceptable level. The refusal to deliver humanitarian assistance at scale has become unacceptable. And the continued holding of hostages by Hamas. There was a encouraging period. Qatar helped facilitate the release of some hostages. There's just also been the delivery of some medicines. But we are a long way from resolving this. And making any positive path forward requires a change, both in the sentiments and the leadership in Israel, as well as the sentiments in the region. The United States canon should play a central and a facilitating role. But we cannot make peace where there are people who are not willing to or committed to. This is a shattering moment for the people of Israel to re-examine whether a strategy of having both Hamas and Fatah in the West Bank in Gaza was wise or unwise, whether or not there is a guarantee of security returning to that, and whether or not it's sustainable globally for Israel to continue this conduct of the war in Gaza. I would argue it is not. There is also a regional actor we have to be clear about. It is Iran that is providing the drones and the missiles that are killing civilians in Ukraine. It is Iran that has provided a lot of the training and the support that makes Houthi drone attacks and missile attacks possible, Hamas attacks possible. And we have to be clear eyed that there is an accelerating trajectory of difficulty. The DPRK and Iran have provided critical resources to Russia for which they will be rewarded with technology that will make the world even more dangerous. So I think we need to be decisive. I think we need to be engaged. And I think we need to be clear eyed. We have talked for a long time about a Palestinian state without making any real progress. And so I think this is a moment for bold action. I agree with much of what the minister had said about a sustainable ceasefire, but the conditions for creating that are going to require some real changes. Our Secretary of State has been throughout the region tirelessly, so too have many other American leaders. I am actually hopeful that this is possible, but hope is not a strategy without significant investment and real change. Is that possible with the current Israeli government? Prime Minister Netanyahu has made a career for a long time of opposing a two-state solution. This is not recent. This is not news. So I think it falls to the Israeli people to decide as a democracy what they see as the right path forward. But there's also very short time. There is a short window before the American political election season squeezes out any possibility of us ratifying or engaging or supporting a new security arrangement in the region. There's also many elections in other places. This is the year of many complex and challenging elections. And so I think the time is short. But for those, if there is an agreement, we saw that the JSPOA was just terminated by Trump. So if he was to be reelected and the Biden administration made deals now, could we count on the new administration continuing? The United States rarely ratifies security treaties, but when we do, we keep them. We have just enacted our Defense Authorization Act. It includes a provision that passed with an overwhelming bipartisan majority. Our ratification of the NATO treaty decades ago was silent about whether or not an American president could unilaterally withdraw America from NATO. It's no longer silent. We have amended the statute. An American president can no longer unilaterally withdraw us from NATO. Why was that done? I think it's clear. Before I have a follow-up question about on a different topic, Senator Coons, but Prince Faisal, short reactions from you, from what Senator Coons said, and also what German Foreign Minister said? I think what's important to note here is that there is general agreement. And what we need to do is translate that agreement into concrete action. Minister Behrbock very eloquently discussed the fact that peace and security of Israel is intimately linked with peace and security for the Palestinians. And that's something that we have supported in the kingdom since 1981, the Faisal proposal on peace. So we are fully on board with that. We agree that regional peace includes peace for Israel, but that can only happen through peace for the Palestinians through a Palestinian state. And I hear from Senator Coons exactly the same sentiment. And this is something that we have been, indeed, working on with the administration, the US administration. And it continues, I think it's even more relevant in the context of Raza. The fact is that what Israel is doing now is putting the prospects for regional peace and security at risk. There is a pathway towards a much better future for the region, for the Palestinians, and for Israel. That is peace. And we are fully committed to that. But again, the first step for that is ceasefire. And I will say that a ceasefire, of course, means ceasefire on all sides. But that can only happen as should be a starting point towards a permanent, sustainable peace, which can only happen through true justice for the Palestinian people. Thank you. And I think also the kingdom has said, in that context, it could even be recognition of Israel from the kingdom if that was part of a bigger political agreement. Certainly. Senator Coons, we had Premier of China speaking this morning. Second largest economy in the world, 20% of the global economy. US 25% of the global economy, almost 50% all together. I think one of the few bipartisan topics in DC is the view on China. But following President Biden's and Xi Jinping's meeting in San Francisco during the APEC meeting, there is no broader understanding, at least, established a kind of a floor. So where do you see the relationship between the US and China in the next decade? Will it be, as your president have said, extreme competition, but also agreements on areas where there is common interest? Or will it not only be de-risking, but also in certain areas going into decoupling? Well, I think, to a great extent, that will depend on the outcome of our presidential election. I do think President Biden made some real progress in reducing the risk of military encounters in the South China Sea, of profound misunderstandings. We have fundamentally different systems and values, but we are deeply interconnected economically and reopening military to military lines of communication to reduce the possibility of an unintentional conflict is a positive step. I believe Xi Jinping also heard, there was a delegation of senators that went and he dedicated a great deal of time to a respectful engagement and heard about fentanyl and its consequences in our country where it is killing huge numbers of Americans and that has been driving some of the anger at China is the nationally shared sense of grievance that the PRC was taking no significant steps to reduce the production and export to the United States of Fentanyl. Substantive steps have been taken and that is a positive sign. We need to now figure out how it is that we can find areas of cooperation, whether it's on climate change or on pandemics or on research, while recognizing that we will vigorously compete. We are each taking steps to constrain the other in terms of technology that are raising some concerns in conversations I've had here. But I think it is also worth being clear that in terms of the international rules-based order, China continues to do things in the economic zones of regional neighbors, in terms of constraining freedom of navigation, in terms of their view of the international flow of data and the theft of intellectual property that causes us some concerns and some issues. I also think that she watched closely the world's response to Putin's aggression against Ukraine. And it's important that we in the United States continue to meet our commitments to Ukraine, that we continue to work in partnership with the 50 other countries that are determined to push back on the invasion of a neighboring sovereign country, and that we continue our work together to find a way that we can derisk this relationship in a positive direction for the world. Thank you. We're discussing Middle East, but we're also discussing East-West. But North-South has also been a prominent topic during the last three years. There's been lack of trust between the South and the North. Some people would say it started with, not necessarily, but it accelerated during COVID, where you saw that Global South did not have access to the most effective vaccines. And the Global North was then seeing vaccination third, fourth times. And it all started to vaccinate children. And there were vulnerable groups not having access to vaccines in the Global South. So Minister Tugar, Nigeria, one of the really big powers in the Global South. You'll listen to the discussion, of course, so far. But is there a way that we can see a reconciliation between the North and the South? And what has to change from the North? Is there anything that has to change from the South? And what would be the fundamental fundamental that these, this cooperation, the pillars, that this cooperation will be built on? UN Charter, is it international law? Very interesting to hear also from the new Nigerian administration on this, Minister. Well, what we have to do is to collectively practice what we preach. So the values that we uphold, democracy, rule of law, need to be practiced. And we need to see them being practiced in the very decision-making bodies or entities for the planet. So to begin with, the UN Security Council, it needs to democratize. Clearly, it is not fit for purpose.  It is the most populous country on the continent, on the African continent. It has a population of 220 million people. It's going to be 400 by the year 2050. It belongs in a UN Security Council, for instance. And there are several other key decision-making bodies. With or without veto power? Permanent seat. But no more veto powers, huh? We should do away with the veto power. Clearly, it's clumsy. It's not working. And again, when you look at the global security architecture, it is impacted upon by such undemocratic entities that influence decisions. Again, you have a situation where, in the past, when we had a bipolar world, we had neutral ground for diplomats to engage, for diplomacy to be allowed to resolve issues, to preempt conflicts, and diffuse them. We don't have that anymore. We no longer have Austria the way it used to be, or Switzerland where we are today, Scandinavia. When I was studying international relations many decades ago, we even had the term Finlandization, and all of that. That no longer exists. So we're increasingly seeing a situation where diplomats and diplomacy are taking the backseat, and disagreements are being securitized. And security chiefs, defense policy makers, are taking the front seat. And of course, for the guy with the hammer, everything is a nail. So we end up with increasing conflicts. So we need to allow for, of course, some of these things have to do with also the global financial situation, problems to do with the economy. So if a foreign affairs ministry is not deemed to be a revenue generator, then one that maybe produces weapons and cells and has more revenue generation takes the forefront. So we really need to allow for diplomats to play a more sort of important role when it comes to dialogue, when it comes to engagement between countries. And that is missing. Thank you. Thank you very much, minister. Jens Stoltenberg, first we'll come back to Ukraine. But I asked Sandra Kunz a question about the US and China, but also the West and China. And last year, Secretary General of NATO spoke about China. That was the first time I've heard. So I think NATO is, of course, first and foremost, transatlantic treaty organization looking at defending its member countries. But I think you also have enlarged also the things that you do address. And how do you rack to what Sandra Kunz said about US relationship with China? And how do you think the West should deal with China? So first of all, you are right that NATO is a transatlantic alliance, Europe and North America. And we will remain a regional alliance. But the transatlantic region faces global threats. Security is not longer regional. Security is global. So what happens in Asia matters for Europe. And what happens in Europe matters for Asia. And therefore, of course, we don't regard China as an adversary. But China's heavy investments in modern military capabilities, including more and more advanced nuclear weapons. China's way of behavior, especially in the South China Sea. And the way China is actually violating core principles for NATO, democracy, the rule of law, journalism, freedom of expression, as we have seen in Hong Kong. All of that matters for NATO. And we also have to understand that this is not about NATO moving into Asia, but it's about the fact that China is coming closer to us. We see them in Africa. We see them in the Arctic. We see them trying to control a critical infrastructure. Not so many years ago, we had a big discussion about 5G. And many allies said this is only a commercial issue. No, it's also an issue about our security. So therefore, for all these reasons, of course, NATO has to address what happens in Asia, not because we are a global security alliance, but because what happens there matters for us. And vice versa. I visited Japan and South Korea, close partners of NATO. They are concerned about what happens in Ukraine because they know that the more success Putin has in Ukraine, the more likely it is that Beijing will use force. So we have to have a global approach, even though we are regional countries, regional organizations, the world is interconnected. And of course, NATO has taken the consequence of that. Thank you. We were at the session together this morning with President Zelensky. Are the Ukrainians winning, or would you say not losing, the war in Ukraine? The situation on the battlefield is extremely difficult. The Russians are now pushing on many front lines. And of course, the big offensive that the Ukrainians launched last summer didn't give the results we all hoped for. And we see how Russia is now building up, how they are acquiring drones from Iran, actually building their own drone factory to produce their own drones in Tartarstan with help from Iran, how they get ammunition and ballistic missiles from North Korea. And they have also demonstrated a high tolerance for casualties. So overall, Russia is pushing hard. And this is serious, and we should never underestimate Russia. Having said that, I really believe that there is also a cause for optimism. First of all, we have to remember where we started. When this war started with the full-fledged invasion back in 2022, then most experts believed that Russia was going to take Kiev within days and control Ukraine within weeks. That didn't happen. The opposite happened. The Ukrainians pushed back, liberated the Northeast and the South Haesong. They have made big military victories in the Black Sea, opened up a corridor. So now they're actually able to export grain and other stuff through the Black Sea. And we have seen how they've been able to hit both the Russian Air Force and the Russian Navy. These are big military victories for Ukraine. The most important thing is that Ukraine has survived as a sovereign independent nation, which is a big win for them. And Russia is losing, meaning that Russia has lost what they wanted to achieve with the war. And that was to control Ukraine. Ukraine, the people of Ukraine, have never trust Russia less than they do today. And they want to be part of the West, of the European Union and NATO, and they're closer to us than ever before. And this is a big loss for Russia. We have to support them. And I'm also quite confident that NATO Allies will continue to provide support. Because support for Ukraine is not charity. Support for Ukraine is investment in our own security. And therefore, Allies have provided unprecedented support. Now we are ramping up production. There was just an agreement now to acquire close to 1,000 new interceptors for the Patriot batteries. One example of how Allies are stepping up to refill their own stocks, but also be able to support Ukraine in the future. So we just have to stand by Ukraine. And some stage, Russia will understand that they are paying a too high price and sit down and agree to some kind of just peace. But we need to stand by Ukraine. Thank you. You're also a Secretary General of NATO. You're on top of all the juicy intelligence. We heard this morning that Russia has lost more than 200 soldiers, half of their tanks, in your 300. You said that again? 300,000. 300,000, yeah. And half of their tanks. And of course, also having severe impact on their economy. It's said in the morning it's a war economy. So you can then use the traditional measures. But with what you're hearing also as Secretary General of NATO, are the Russians aware, you think, that this war did not go as planned and are aware of all the casualties? And for a nation that has lost half of their tanks and 300,000 soldiers, that's not a minor thing. Is there something happening in Russia, or is it just not? I'm very careful predicting about both how the war will develop. Wars are by nature unpredictable. And I'm even more careful about predicting what will happen inside Russia. We saw progressing last year, surprises may happen. But we don't have any indications where any big change inside Russia. But of course, there can be surprises. Again, I think what really matters is what we do. And we just have to do whatever we can to increase the price for Russia. And of course, when they had lost 300,000 soldiers or casualties, thousands of armed vehicles, hundreds of planes, this is something that matters for Russia and for ordinary Russians. Their economy is struggling. They are paying a high economic price. They are paying a high political price. They are more politically isolated, also in the near and broad in Caucasus and Central Asia. And so what we can do is not to predict with certainty what will happen. But what we can do is to just maximize the likelihood that at some stage, President Putin will understand that to continue this war, we'll have a too high price. And then at some stage, he has to sit down and negotiate some kind of just lasting peace where Ukraine prevails as a sovereign independent nation. And the paradox is that if we want that to happen, a peaceful just end to this war, the way to get there are more or is more weapons to Ukraine. So the more credible we are in our military, military support, the more likely it is that the diplomats will succeed. Because what happens around the negotiating table with diplomats is so closely linked to the situation on the battlefield. There are no indications that Putin is planning for peace now, but he will when he realized that we will not give up, that we have the military strength to support Ukraine and then he will sit down and the diplomats can take over. Thank you, Jens. In the morning meeting, someone also said that Putin is the father of the modern Ukraine. But Minister Elena Valtanen of Finland, I guess Finland would not have become a NATO member if it wasn't for Putin's war on Ukraine. Yeah, probably not. We never kind of saw the need for that, even though, well, personally, I have been in favor of that for decades, but not all of us Finns. And we thought that we would be able to defend ourselves and deter Russia based on our strong own defense forces. But I have to say, I mean, in this narrative, and perhaps also what my colleague from Nigeria referred to, I'm not hugely proud of the Finnish piece of history of the Finlandization, and that's got nothing to do with diplomacy. It was enforced on us. I mean, living next to a huge neighbor who is not only unpredictable, but very aggressive, and we've had our past where we have had to defend our country against the aggression and the invasion from back then Soviet Union. Luckily, we were able to remain independent. Never were part of the Soviet Union. But those few decades where we really had to constrain our sovereignty in order to remain independent, that's not based on the UN Charter, right? I mean, every sovereign nation has to right to decide on themselves, or more precisely, those people living in those democracies, they have the right. And that is exactly that the Ukrainians are now fighting for, because they decided, more than 10 years ago, the Ukrainian people, they want to have a European future. They want to have a future where each individual counts, they can decide on their own future. And that's why we need to assist them, because nobody wants to have a world where only the strongest, the most powerful are to decide. And I'm sure that applies to Nigeria just as much as it applies to the 5 million people of Finland. And only just finally, NATO does not enlarge by force. It is the free people in democratic nations who choose to join. And that goes for Finland and Sweden, just like anybody else. And we didn't join, because we wanted to threaten Russia. Come on, 5 million Finns threatening Russia, come on. It's never happened in the future. Don't believe that narrative. We are there in order to protect our values and stand up for the UN Charter. You just told me that you had to close the border again towards Russia for another month? That's right. Well, yeah, we've experienced, especially after the summer, some increasing, so to say, harassment from Russia. So now there's this hybrid operation going on where Russia has not only let third country citizens enter Finland, cross our border without valid documentation. But they have also been, or we have evidence that they are actively mobilizing those people, also direct from their original countries. And that's obviously not something we can accept. It's part of our sovereignty and territorial integrity. And plus Finland is obviously not only protecting its own border, but also that of the EU and NATO. Many of those people who have entered our country well are criminals or have even wore criminal records. And many of them stay in Finland. They have all of them seek asylum. But many also continue on towards the rest of the Schengen area. And of course, we can't have that happen. Time is up, but Minister Tugar, I think you wanted a short reply. I would have loved to continue another half an hour. But I learned, though, in my political past, that you should always end when people still want you to continue. I'm not sure all politicians stick to that. But Minister Tugar, I'll do a very, very short closing. Yeah, so real quickly, not a reply, just a reaction. I spoke about Finlandization within the context of a bipolar world and ways to avert conflicts. And in this case, nuclear annihilation. So perhaps that was the price that we had to pay. It was regrettable. But the point I was trying to make was the need for there to be neutral ground for diplomats, for countries to engage with each other to avert conflicts. But I couldn't agree more with the minister with regards to freedom of self-determination. Because what you described could apply exactly to Palestine. They have the right. They have the right to self-determination. The same way that Finland, so we could. But I don't want us to keep on nitpicking and picking and choosing which conflicts to highlight. What is important is also that we pay close attention to proxy wars and actions and the use of proxies to formant conflicts in third party nations. So this is something that is happening that we see increasingly. And unless the diplomats engage with each other, you cannot diffuse such tensions. But we need to roll that back as quickly as possible. No, thank you very much, minister. I feel extremely privileged to have had the chance to moderate such a panel. Great leaders in their different fields. The title was, as I said, the beginning, securing an insecure world. I think we took a small step forward in at least establishing some potential pillars for what a more secure world could be. And to you, minister from Nigeria, also on the diplomacy. I think we need more diplomacy and not less diplomacy and both in Gaza, Ukraine, US, China, North, South, East, West. It doesn't hurt to talk. It doesn't hurt to have a dialogue. And that is what we're trying also here in Davos. I'm being asked three times this morning about people that are invited to Davos. Why did they invite her? Why did we invite him? We don't agree with them. Exactly. That's why they're here, because we can have a dialogue. If you only then deal with the people you agree with. Then there will be conflicts. There will be no further understanding. And of course, that's part of the whole disinformation agenda. If you look at something, the algorithms just make sure that you look even more at something that is even more extreme than you look at. Maybe it wasn't extreme at all, but it was a little bit edgy. So thank you very much to the panel. Really appreciate it. Thank you. Give them a big applause.


I am BM1 Bruno Duomaral and I am part of the Expeditionary Mine Cargo Measure Company. We are currently in the middle of the Baltic Sea and we are searching, utilizing underwater unmanned vehicles in search of unexploded ordnance. We are here integrated with NATO Forces in support of Baltops 16. This is the United States Navy vessel. Over. Basically to promote security and stability in the Baltic region.