PHONK

github version PRs welcome

:tada: Hello! I'm happy to see you here reading about PHONK!!

PHONK is a self-contained creative scripting toolbox for new and old Android devices. Create scripts rapidly from your phone or using the remote Web Editor on your computer. The API is simple and extensive. GUI, audio, graphics, bluetooth ble, arduino, OSC, midi, and much more.

Have a look in the PHONK website for more info

animation

Features

How to install it

Get it from

If you have an Android phone with a version higher than 4.1 (that's from 2012!) then it should work! If you find a problem, please create an issue.

During the first install, the app will

  1. Ask you for a bunch of permissions. I recommend accepting all of them to be able to run the examples. You can always revoke them :)
  2. Install the examples in the device "sdcard" folder. Doing this we can easily access the examples and self-made scripts from any other app.

How to create your first script

Check the Getting started guide for a more detailed explanation

Run the PHONK app in your Android device. You can create your first script within the device although it might be a bit cumbersome using the device virtual keyboard.

Instead, connect your computer and Android to the same Wifi network. On your computer open the browser and type the ip address indicated on your phone after pressing "Start web editor". A web editor will load allowing you to code on the phone.

You can create a new project and copy and paste this into the editor.

// ui elements need x, y, w, h normalized paramaters
ui.addButton('Start accelerometer', 0.1, 0.45, 0.8, 0.1).onClick(function () {
  sensors.accelerometer.start()
})

sensors.accelerometer.onChange(function (e) {
  console.log(e.x, e.y, e.z)
})

Now run the project. :tada:

You can explore the variety of examples included in PHONK and modify them in order to explore its capabilities.

Compile it yourself

PHONK depends on 3 subprojects. Each of them is on a different repository so things are a bit easy to manage.

  1. The main PHONK Android project. (this repo)
  2. The Web Editor https://github.com/victordiaz/phonk-editor
  3. The examples https://github.com/victordiaz/phonk-examples

In order to compile PHONK you should fetch the 3 repos so they follow the following folder structure.

phonk_project
 ├ phonk # the Android project
 ├ phonk-editor
 └ phonk-examples

Once you fetched all projects, you should

  1. Copy the examples to the assets android assets folder. Go to the phonk-examples folder and run npm run cleanAndDeploy
  2. Add the Web Editor to the Android app asset folder. Go to the phonk-editor folder, npm install to install the Web Editor dependencies and finally run npm run buildAndDeploy to build the Web Editor and copy
  3. In Android Studio import the phonk folder and build the project.

Once you've done that, there is not neccessity to do the first steps anymore unless you want to update the Web Editor or the examples.

Project structure

The PHONK app is divided into two modules phonk_app and phonk_apprunner.

Get Involved

Roadmap

License

This project is licensed under the terms of the GPL / LGPL v3 License. You can check out the full LICENSE description on the file LICENSE.txt.