 just quickly look at another tool to only have a javascript for so the source code will be in the browser got how it works we'll get the co-pilot to explain it quickly so essentially when I put my hands higher the sound is louder it's too separate it's not mentioning it why should have mentioned two separate scales musical scales one is more annoying than the other yeah sometimes it's confusing um what is it my right hand for left hand it's turning yellow like that yeah some sort of detection error there's just not enough light in the room it's meant to be left and left hand they overlap as well I think yes c5 c5 is over there so essentially this would be c4 c5 then you have a4 a5 now I think if you close your hand and stretch it if you close your hand the notes will be shorter if you open it they should be longer in theory yeah it's the distance between the finger and the thumb yeah it kind of works could be more pronounced well first why is it so annoying second what controls the speed is that the distance between the thumb and the finger if so the difference is not very pronounced should have been longer why is it generating so much stuff yeah so x-coordinates triggering the scale so that's works I was asking about what happens does not should be longer with the hand open the ratio of note determine the distance between the thumb and the index finger it's normalized between a range of zero and one multiplied by eight okay that eight don't like magic numbers normalized distance how to make the normalized distance more sensitive yeah it's that way how to make the direction more sensitive to the normalized distance conclusion in the current in the distance between the thumb index and normalized range zero and one this means that the large change in distance will result in a relatively small change in normalized distance let us sense the dvd factor it's still multiplied by eight there's still a magic number this is interesting just fix that quickly we do want that code the most curious if we already have the sensitivity factor variable why do we still need to multiply by eight this will be essentially multiplying by 16 is it it doesn't look like there's much difference duration now should be longer then quickly to need to restart this all right that's why the camera is blinking seems like it's going the other way so if it was to think we need this magical number obviously supposed to the fuzzy logic stuff this one just works okay this is better and then we have the two scales they overlap okay this works how about the two scales can we make them sound more musical can we play chords or something also do the scales overlap do something with a mouth as well or something else we can move we can dance to it the scale defined because c major for the left hand and a minor for the right hand a minor is a relative minor what a minor is a relative minor of c major meaning they share the same key signature however the scales are defined do overlap they include the notes c4 and c5 the above them c5 no that one doesn't have c4 all right to make that sound more musical you could consider using different scale they do not overlap and that's what before you told me the the opposite this is using actual chords the defined set of chords for each hand play using example of how i might do that tone chord function using this because it does not exist in tone gs library and so i tell me this would not work would it if it won't work so this chord would not work yes play chords especially when moving the fingers or something could play one note four notes together something let me check how many fingers are shown on camera and based on the number of fingers play a corresponding number of notes simultaneously also how do we make sure the notes played simultaneously matched as in chords so we'll obviously what was provided before is not the complete function now this is the same stuff kitab kopa that's playing up so what i want to do is generate the multiple notes depending on how many fingers are shown so four fingers will play a chord of four notes hopefully of matched notes as well so existing chords not made up chords so it's suggesting something suggested something over here but obviously it would not do that so we write thing up around can check if anything is shown on camera and based on the number of fingers play corresponding number of notes simultaneously how to make sure the notes play simultaneously not matched as in chords stretch it quickly yeah with the whole chord i mean that's what kitab kopa does anyway just sending the whole chord on so those will be all short notes open palm level will be volume that should be intuitive so if we start from here open hand will play longer notes and yeah there's the scale now can train to be a conductor or something if you like yes you can check the number of fingers shown on camera and play corresponding musical notes simultaneously essentially forming chords to achieve this you can use the landmarks provided by the media pipe hands model each hand is represented by 21 landmarks with specific landmarks for each fingertip by analyzing these landmarks you can determine if a finger is extended or not detect extended fingers you'll need to determine which fingers are extended this typically involves comparing the positions of the fingertip landmarks to other landmarks on the same finger for example if the tip of the index finger is farther away from the base of the finger than a certain threshold you can consider it extended chord mapping define mappings for the number of extended fingers to specific chords for instance if one finger is extended you could play a c major chord two fingers for b minor and so on that's not what i mean but simultaneous note playing when you detect a specific number of extended fingers trigger the corresponding chord this involves playing multiple notes simultaneously with tone js you can use tone polysynth to play chords github uh github copilot just told me that the tone js doesn't does not have an option to play chords let's go confront confront github copilot just su su the code i'm pretty sure that last response was not relevant but the one it's detective it's doing false detection and so the and the hands of my on my on my head it's not cool make just because it's too dark in the room or something i extend the existing code to include the functionality for detecting extended fingers and playing chords this includes defining the get extended fingers function and integrating it with the unresults function to play chords based on the number of extended fingers okay i have to finish up might leave you with some generated music here is the continuation of your existing javascript code and landmarks eight represent base middle and tip of the index finger respectively function to play chords based on extended fingers function play chord extended fingers const chords equals one c4 e4 feet g4 feet c major two d4 f4 feet a4 feet d minor add more chords for different numbers of extended finger yes playing to those uh those legit chords c major d minor should be modify the unresults function to include chord playing function unresults results existing code for processing hand results that polis initialized polysynth for playing chords cons polysynth equals new tone polysynth tone synth the destination anyway hopefully you will be able to play around with it soon on bodycares.co and i'll see you later bye