This forum uses cookies This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

 Xmas receiver mathematical insights bulligan Junior Member Posts: 4 Threads: 1 Joined: May 2023 Institution: Torricelli 05-05-2023, 09:53 AM Hello, I'm into a project at school and i need to know everything mathematical/physical about the xmas receiver experiment (Fourier transform, all the frequencies used, phyphox algorithm to decrypt...) can somebody help me? (https://phyphox.org/xmas/) Jens Noriʇzsɔɥ Senior Member Posts: 500 Threads: 22 Joined: Apr 2020 Institution: RWTH Aachen University 05-05-2023, 06:08 PM (This post was last modified: 05-05-2023, 10:38 PM by Jens Noriʇzsɔɥ.) Technically, https://phyphox.org/xmas/ already provides most of the information: the general principle is explained and the .phyphox file is open source (see https://phyphox.org/wiki/index.php/Phyphox_file_format). I try to break it down a bit. The audio file plays four concurrent notes, one each in the ranges [749…2249] (x coordinate), [2249…3749] (y coordinate), [3749…5249] (color and repeat), and [5249…5624] (checksum) Hertz. Each segment is divided into subranges of the width 48000/2048=23.4375 Hz. On each of these range a FFT is mapped and in each the maximum is searched. If the maximum of the first range is in the nx-th segment, then the x coordinate is this nx (1…64). If the maximum of the second range is in the ny-th segment, then the y coordinate is this ny (1…64). If the maximum of the third range is in the n-th segment, then the remainder of n divided by 8 gives the color (0…7) and the quotient of n divided by 8 (the integer part of n/8) tells how often the point should be repeated in x direction (internally we add one, so 1…8 is the possible length of the horizontal block in the graph). If the maximum of the forth range is in the c-th segment, then the remainder of (nx+ny+n) divided by 16 needs to match c–1 (0…15) or the entire point is discarded. HTH a bit. Jens Noriʇzsɔɥ Senior Member Posts: 500 Threads: 22 Joined: Apr 2020 Institution: RWTH Aachen University 05-05-2023, 06:11 PM You could try to decode some points with the help of the “Audio Spectrum”. In the “History” tab you could tap on the waterfall diagram, in order to show it fullscreen, and then tap on the (almost) white maxima to obtain the individual frequencies… bulligan Junior Member Posts: 4 Threads: 1 Joined: May 2023 Institution: Torricelli 05-12-2023, 09:46 AM (05-05-2023, 06:08 PM)Jens Noritzsch Wrote: Technically, https://phyphox.org/xmas/ already provides most of the information: the general principle is explained and the .phyphox file is open source (see https://phyphox.org/wiki/index.php/Phyphox_file_format). I try to break it down a bit. The audio file plays four concurrent notes, one each in the ranges [749…2249] (x coordinate), [2249…3749] (y coordinate), [3749…5249] (color and repeat), and [5249…5624] (checksum) Hertz. Each segment is divided into subranges of the width 48000/2048=23.4375 Hz. On each of these range a FFT is mapped and in each the maximum is searched. If the maximum of the first range is in the nx-th segment, then the x coordinate is this nx (1…64). If the maximum of the second range is in the ny-th segment, then the y coordinate is this ny (1…64). If the maximum of the third range is in the n-th segment, then the remainder of n divided by 8 gives the color (0…7) and the quotient of n divided by 8 (the integer part of n/8) tells how often the point should be repeated in x direction (internally we add one, so 1…8 is the possible length of the horizontal block in the graph). If the maximum of the forth range is in the c-th segment, then the remainder of (nx+ny+n) divided by 16 needs to match c–1 (0…15) or the entire point is discarded. HTH a bit. Thanks, i'll start from this. I have the idea of trying to use the generator and analyze the spectrum of the .wav file when encrypting RGB images (for example: completely white or green or blue or red or green) to see how it works. Jens Noriʇzsɔɥ Senior Member Posts: 500 Threads: 22 Joined: Apr 2020 Institution: RWTH Aachen University 05-12-2023, 10:17 AM I should have mentioned that you could find the encoder in the source of https://phyphox.org/xmas-generator-2021.html (it's plain uncompressed javascript). That's likely much easier to read than the phyphox file format… bulligan Junior Member Posts: 4 Threads: 1 Joined: May 2023 Institution: Torricelli 05-15-2023, 12:10 PM (05-12-2023, 10:17 AM)Jens Noritzsch Wrote: I should have mentioned that you could find the encoder in the source of https://phyphox.org/xmas-generator-2021.html (it's plain uncompressed javascript). That's likely much easier to read than the phyphox file format… Hello, sorry again, i dont quite understand this part of the code:  function hue2index(h, s, v) {         if (s < 0.5) {             return 7; //White         } else {             if (h < 0.083333333) {                 return 3; //red             } else if (h < 0.25) {                 return 4; //yellow             } else if (h < 0.416666667) {                 return 5; //green             } else if (h < 0.583333333) {                 return 6; //cyan             } else if (h < 0.75) {                 return 1; //blue             } else if (h < 0.916666667) {                 return 2; //magenta             } else {                 return 3; //red (again)             } Mainly i dont understand where 0.0833333, 0.4166666 .... come from. Thanks in advance Jens Noriʇzsɔɥ Senior Member Posts: 500 Threads: 22 Joined: Apr 2020 Institution: RWTH Aachen University 05-15-2023, 02:25 PM Hue is –simplified– an angle on the color circle, see https://en.wikipedia.org/wiki/Hue, for instance. The identification of colors can thus be reduced to a single number rather than multiple in other color spaces. bulligan Junior Member Posts: 4 Threads: 1 Joined: May 2023 Institution: Torricelli 05-22-2023, 06:40 PM (05-15-2023, 02:25 PM)Jens Noritzsch Wrote: Hue is –simplified– an angle on the color circle, see https://en.wikipedia.org/wiki/Hue, for instance. The identification of colors can thus be reduced to a single number rather than multiple in other color spaces. Hey, i did the spectrum of the "most common" colors to analyze their spectrum. This is the result, what can i understand from it? Thanks Attached Files Thumbnail(s) « Next Oldest | Next Newest »

Forum Jump: