{"id":18248846,"url":"https://github.com/igorski/kosm","last_synced_at":"2025-04-04T15:32:35.899Z","repository":{"id":26858851,"uuid":"30318906","full_name":"igorski/kosm","owner":"igorski","description":"Kosm for Android source code","archived":true,"fork":false,"pushed_at":"2024-12-17T18:18:59.000Z","size":32005,"stargazers_count":34,"open_issues_count":0,"forks_count":12,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-02-10T12:27:19.246Z","etag":null,"topics":["android","audio","c-plus-plus","cplusplus","java","particles","physics","physics-engine"],"latest_commit_sha":null,"homepage":"https://www.igorski.nl/apps/kosm","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/igorski.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2015-02-04T20:15:52.000Z","updated_at":"2024-12-17T18:21:49.000Z","dependencies_parsed_at":"2024-11-05T09:43:25.629Z","dependency_job_id":"28bdeb60-a583-4dd9-be6b-39b8135c5cf6","html_url":"https://github.com/igorski/kosm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorski%2Fkosm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorski%2Fkosm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorski%2Fkosm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorski%2Fkosm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/igorski","download_url":"https://codeload.github.com/igorski/kosm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247203126,"owners_count":20900919,"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":["android","audio","c-plus-plus","cplusplus","java","particles","physics","physics-engine"],"created_at":"2024-11-05T09:38:28.647Z","updated_at":"2025-04-04T15:32:30.892Z","avatar_url":"https://github.com/igorski.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kosm\n\nan open source abstract audio application for Android. Kosm uses the accelerometer of your device to\ntrigger state changes in its audio engine which in turn responds by synthesizing audio on the fly. In\nother words : Kosm is a \"gravity sequencer\", or something.\n\nKeywords : chaos, chance, microtonal.\n\n## A word of codebase caution\n\nKosm is an old, old lady. The code base has been updated to work with modern Gradle based toolchains\nand to be available to work on Google Plays latest platform requirements, but the code base goes back\nquite a few years. Heck, it was originally built for Android 2.3.\n\nKosm is in maintenance mode. It will receive updates whenever Google Play's policies indicate that\na change is necessary to keep the app available.\n\n### MWEngine audio engine\n\nKosm is built on top of MWEngine, an open source audio engine for Android by igorski. MWEngine is\nwritten in C++, using OpenSL for low latency performance. Though the engine is written in C++ (and can be\nused solely within this context), the library is built using JNI (Java Native Interface) allowing its methods\nto be exposed to Java/Kotlin while still executing in a native layer outside of the Dalvik/ART VM.\n\nIn other words : high performance of the engine is ensured by the native layer operations, while ease of\ndevelopment is ensured by keeping application logic / UI within the realm of the Android Java SDK. For more\ndetails and plenty of Wiki documentation you can go to the MWEngine repository :\n\n[MWEngine on Github](https://github.com/igorski/MWEngine)\n\nNote: the supplied JNI code in this repository is a fork of an older MWEngine version. If you wish to use\nMWEngine with the latest performance improvements, processors and AAudio support, visit the aforementioned\nproject URL. It is recommended to build MWEngine as an .AAR library instead of copying files and makelists.\n\nKosm inherits most of the basic MWEngine classes, with the `/jni/kosm`-folder containing the\nKosm-specific \"AudioParticleEvent\" class.\n\n### APE Physics engine\n\nKosm relies on the APE physics engine and uses a modified version of the Android version. Sadly, the\noriginal Android library doesn't seem to be maintained anymore (the old Subversion repository on Google Code\nhas been [migrated to Github](https://github.com/msoftware/ape-physics-for-android) though)\n\nCredits for APE go to Alec Cove, Theo Galanakis (Java port) and Michiel van den Anker (Android port).\n\n### Build instructions\n\nYou will need both the Android SDK and the Android NDK installed. The Android NDK is used to compile the\naudio engine. All build commands bar the compilation of the audio engine code is done via Gradle.\n\n#### Compiling the audio engine\n\nThe makefile `CMakeLists.txt` will compile the MWEngine audio engine with all available modules.\nAfter compiling the C++ code, the `nl.igorski.mwengine.core`-namespace should be available to Java.\n\n#### Building the main application\n\nThe usual Gradle suspects such as `clean`, `build`, etc. are present. To instantly deploy a debug version of the\napplication onto an attached Android device / emulator, run :\n\n```\ngradle installDebug\n```\n\nTo create a signed release build, add the following into your Gradle's properties file (_~/.gradle/gradle.properties_)\nand replace the values accordingly:\n\n```\nRELEASE_STORE_FILE={path_to_.keystore_file}\nRELEASE_STORE_PASSWORD={password_for_.keystore}\nRELEASE_KEY_ALIAS={alias_for_.keystore}\nRELEASE_KEY_PASSWORD={password_for_.keystore}\n```\n\nyou can now build and sign a releasable APK by running:\n\n```\ngradle build\n```\n\nafter which the built and signed APK is available in `./build/outputs/apk-kosm-release.apk`\n    \n#### Application outline\n\nThe main Activity `Kosm.java` spawns an instance of *ParticleSequencer*. This is the main class\nresponsible for the applications behaviour.\n\nInside the ParticleSequencer there are two threads running :\n\n * **ViewRenderer** responsible for drawing the \"world\" and updating the physics engine (physicsWorld)\n * **MWEngine** responsible for rendering synthesized audio using the native layer engine\n\nThe ParticleSequencer listens to touch and sensor change events and delegates actions accordingly (see its \"event handlers\" section). This is basically what the app boils down to: monitoring sensor changes and synthesizing colliding \"particles\"; upon touching the screen surface, the ViewRenderer will spawn particles. Depending on the sequencer mode these particles have different behaviours (e.g. are static, respond to gravity, emit clones at a steady rate, etc.), when these particles collide with one another they will synthesize their audio. The \"mass\" and type of a particle determines the pitch and waveform used for synthesis (see **AudioParticle**).\n\nMost of the application logic is command-based (using a simplified abstraction of the PureMVC framework, see all _Core.notify()_ invocations)\nand the code for these commands should be self explanatory; a command basically ties together all actors of the application to execute a\nstate change. E.g. there are commands for creating the effects chain, opening/closing of the submenus, toggling sequencer modes, etc.\nAs such most of the logic is small and self contained.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figorski%2Fkosm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Figorski%2Fkosm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figorski%2Fkosm/lists"}