{"id":26507733,"url":"https://github.com/jacksonwalters/synesthesiaer","last_synced_at":"2025-03-20T23:33:11.590Z","repository":{"id":64411292,"uuid":"140096821","full_name":"jacksonwalters/synesthesiaer","owner":"jacksonwalters","description":"Keyboard which assigns a prime number, light frequency, and pure tone to each key and mixes them in a natural way to obtain numbers, colors, and sound.","archived":false,"fork":false,"pushed_at":"2022-12-10T18:48:56.000Z","size":14582,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-12-19T11:03:55.367Z","etag":null,"topics":["music-visualizer","prime-numbers","rgb-color","tones"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jacksonwalters.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-07T15:45:20.000Z","updated_at":"2022-12-07T20:20:28.000Z","dependencies_parsed_at":"2022-12-17T19:24:30.643Z","dependency_job_id":null,"html_url":"https://github.com/jacksonwalters/synesthesiaer","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacksonwalters%2Fsynesthesiaer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacksonwalters%2Fsynesthesiaer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacksonwalters%2Fsynesthesiaer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacksonwalters%2Fsynesthesiaer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jacksonwalters","download_url":"https://codeload.github.com/jacksonwalters/synesthesiaer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244711713,"owners_count":20497415,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["music-visualizer","prime-numbers","rgb-color","tones"],"created_at":"2025-03-20T23:33:11.033Z","updated_at":"2025-03-20T23:33:11.585Z","avatar_url":"https://github.com/jacksonwalters.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"#pygame virtual keyboard which assigns a prime number, light frequency, and sound frequency\n#to keys. it mixes the light frequencies to corresponding RGB colors, mixes\n#the pure tones to sounds, and multiplies the primes to get unique numbers.\n\nhttps://pypi.org/project/synesthesiaer/0.0.4/\n\n```\npip install synesthesiaer\npython3 -m synesthesiaer.main\n```\n\nThis code assigns a color and sound to a range of positive integers in a natural\nway.\n\nInput: n\n\n1) Factor n into a product of primes n = p_1^s_1 * ... * p_r ^s_r\n\n2) Map every prime to a wavelength into the visible range which is roughly 380nm (800Thz, violet) - 700nm (400Thz, red). Use f_red*(f_violet/f_red)^((i-1)/(num_keys-1)) in analogy to the keyboard mapping of sound frequencies 440Hz*2^((i-49)/12).\n\n3) For example, the number 197 is p_45. Its light frequency is 492 THz -\u003e  608nm wavelength, so red. 563 is p_103, so 649 THz -\u003e 462nm, so blue. Combining them we get the number 110911 which has a bright purple color. \n\n4) To convert this spectrum to the appropriate color of light we use the CIE color matching functions (https://www.cs.rit.edu/~ncs/color/t_spectr.html). This can be implemented in almost any language. (https://mathematica.stackexchange.com/questions/57389/convert-spectral-distribution-to-rgb-color/57457#57457).\n\nOutput: An RBG color specification.\n\nA similar method can be used for sound, in which case we just scale into the audible range of 20Hz - 20kHz. We then need to mix the tones to get a sound using a synthesizer package, in this case tones.\n\nImportantly, *spectra* of colors and sounds combine additively. Combining natural numbers via multiplication is straightforward.\n\nThis could be used to make a keyboard whose keys are appropriately colored and labeled by prime numbers.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacksonwalters%2Fsynesthesiaer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjacksonwalters%2Fsynesthesiaer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacksonwalters%2Fsynesthesiaer/lists"}