{"id":49808551,"url":"https://github.com/diegovdc/time-time","last_synced_at":"2026-05-12T23:45:03.675Z","repository":{"id":56689183,"uuid":"194203661","full_name":"diegovdc/time-time","owner":"diegovdc","description":"A Polychronic library for precisely sequencing events in time.","archived":false,"fork":false,"pushed_at":"2025-09-18T19:41:33.000Z","size":1745,"stargazers_count":2,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-12T23:44:32.470Z","etag":null,"topics":["live-coding","music","polychrony","polyrhythms","rhythm","sequencer","time"],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/diegovdc.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-06-28T04:01:43.000Z","updated_at":"2025-11-06T07:00:06.000Z","dependencies_parsed_at":"2024-02-16T03:31:47.706Z","dependency_job_id":"6eda4090-7445-45d4-9a87-8cb7432d8604","html_url":"https://github.com/diegovdc/time-time","commit_stats":null,"previous_names":["diegovdc/time-time"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/diegovdc/time-time","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegovdc%2Ftime-time","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegovdc%2Ftime-time/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegovdc%2Ftime-time/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegovdc%2Ftime-time/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/diegovdc","download_url":"https://codeload.github.com/diegovdc/time-time/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegovdc%2Ftime-time/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32961785,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-12T23:30:32.555Z","status":"ssl_error","status_checked_at":"2026-05-12T23:30:18.191Z","response_time":102,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["live-coding","music","polychrony","polyrhythms","rhythm","sequencer","time"],"created_at":"2026-05-12T23:45:02.827Z","updated_at":"2026-05-12T23:45:03.663Z","avatar_url":"https://github.com/diegovdc.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# time-tiem\n\nA Polychronic library for precisely sequencing events in time.\n\nThe aim of `time-tiem` is to develop low-ish level composable functions for the flexible development of higher level sequencers that can do anything from common sequencing tasks to highly coordinated polytemporality. \n\nThe aim includes the development of such higher level constructs. \n\nIt is important to note that these sequencing tools are agnostic of medium, so it is possible to sequence audio, video, text or whichever thing that can be put into a function call.\n\n\n\n\n\n## Usage\n\n### ref-rain\n\nThe focus of `ref-rain` is to provide a good live coding experience by allowing the sequencer to be modified in real time without losing track of the following events in it's timeline. \n\n``` clojure\n(require '[time-time.dynacan.players.gen-poly :as gp])\n\n(gp/ref-rain\n    :id :my-sequencer ;; identifier of the sequencer, useful when recompiling (will apply changes on the next event, rather than restarting the sequencer)\n    :durs [3 2 3 3 2] ;; a vector of durations, this are durations in beats and will run at the tempo specified below.\n    :tempo 120\n    :ratio 1 ;; `1/2` will make everything run twice as fast, etc.\n    :on-event (fn [{:keys [data]}]\n                ;; `data` is the current event data and will print something like:\n                #_{:durs [3 2 3 3 2]\n                   :index 0\n                   :started-at 1660746728661\n                   :current-event {:dur 3, :event-dur 1500N}\n                   :playing? true\n                   :ratio 1\n                   :dur 3\n                   :on-event (fn [] #_some-function)}\n                (println data)))\n                \n(gp/stop :my-sequencer) ;; stop this sequencer\n(gp/stop) ;; stop all sequencers\n```\n\nThe `on-event` macro is useful for accessing the most commonly required values of an event, and provides the at-index function:\n\n``` clojure\n(gp/ref-rain\n    :id :my-sequencer-2\n    :durs [3 2 3 3 2]\n    :tempo 120\n    :on-event (gp/on-event\n                ;; notice that we just need to pass a function call to execute\n                (println index\n                         dur    ;; event dur as stated in the durs vector\n                         dur-ms ;; duration converted to milliseconds\n                         (at-index [:one :two :three]) ; provided by on-event, get the value at index, will wrap using `mod` if index overflows\n                         (keys data))))\n                         \n(gp/stop)\n```\n\n\u003c!--\n## Time units\n\nConventions:\n\n`:elapsed` Elapsed time in abstract time units (no real temporal value, can be mapped to milliseconds, seconds, etc.)\n`:elapsed-ms` Elapsed time in milliseconds\n\n`:echoic-distance`\n`:echoic-distance-event-qty`\n\n\n;;TODO\n:cp-at\n:\\*-at\n\n;; TODO\nsequencing-3 `:current-event` is not clear\n\n### What are Abstract time units?\n\n# WIP\n\nTime management:\n\ntiempo en milisecs:\nej: :elapsed-ms\n\ntodo lo demas q sean unidades abstractas de tiempo: Unidades de tiempo. Explicar abstract time units (ATU)\n\nlos miliseconds es UTC son utiles para relacinarse con el tiempo de la maquina.\n\nejs:\n\n:elapsed 1.2\n:elapsed-ms 1923873940\n\n---\n\ninterval-from-cp (echDist)\nevents-from-cp (qty)\n\nfunction to calculate the echoic distance (if needed)\n\nEchoic dist = diferencia entre interval-from-cp-v1 and interval-from-cp-v2\n\nechoic distance son datos q se pueden usar!\n\n//////\nevent\u003c-\u003ecp\n--\u003e\n\n## Note\nThis library is a work in progress and mostly a workshop for myself, so the code is not polished as it should. If you are using this library, feel free to let make me aware of so that I can take more care of the code and the documentation.\n\n\n## License\n\nThis program and the accompanying materials are made available under the\nterms of the Eclipse Public License 2.0 which is available at\nhttp://www.eclipse.org/legal/epl-2.0.\n\nThis Source Code may also be made available under the following Secondary\nLicenses when the conditions for such availability set forth in the Eclipse\nPublic License, v. 2.0 are satisfied: GNU General Public License as published by\nthe Free Software Foundation, either version 2 of the License, or (at your\noption) any later version, with the GNU Classpath Exception which is available\nat https://www.gnu.org/software/classpath/license.html.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiegovdc%2Ftime-time","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiegovdc%2Ftime-time","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiegovdc%2Ftime-time/lists"}