<commit_before>Cordova OSC Plugin
==================

This plugin enables your app to send and receive [OSC](http://opensoundcontrol.org/spec-1_1) messages.


Installation
------------

1. Clone the repository: `git clone https://github.com/philippbosch/cordova-osc-plugin.git`,
   *or:* download a [ZIP file](https://github.com/philippbosch/cordova-osc-plugin/archive/master.zip) and extract it.
2. Copy `CDVOSC.h` and `CDVOSC.m` from the `ios` folder to the `Plugins` folder in your XCode project.
3. Copy `osc.js` from the `www` folder to the www folder in your XCode project.
4. Add a reference to the JavaScript file in your HTML code right after the `cordova-x.x.x.js` script, like so:
   `<script src="osc.js"></script>`.
5. In your app's `config.xml` file look out for the `<plugins>` section and append `<plugin name="OSC" value="CDVOSC" />` to it.


Usage
-----

### Sending messages

```javascript
// setup the remote host to which you want to send messages
var remote = window.plugins.osc.createRemoteLocation('192.168.0.123', 11000);

// create an empty message with the desired address pattern
var msg = window.plugins.osc.createMessage('/address');

// add values to your message<commit_msg>Update installation instructions, include vvosc installation.<commit_after>Cordova OSC Plugin
==================

This plugin enables your [Cordova](http://cordova.apache.org/) / [PhoneGap](http://phonegap.com/) app to send and receive [OSC](http://opensoundcontrol.org/spec-1_1) messages. It depends on the [VVOSC library](https://github.com/markcerqueira/vvosc-ios).


Installation
------------

1. Get **VVOSC** from [here](https://github.com/markcerqueira/vvosc-ios), either by cloning the repo (`git clone https://github.com/markcerqueira/vvosc-ios.git`) or by downloading and extracting a [ZIP file](https://github.com/markcerqueira/vvosc-ios/archive/master.zip).
2. Drag `VVOSC/include` and `VVOSC/libVVOSC.a` into your XCode project. Select the *Copy items into destination folder* and *Create groups for any added folders* options.
3. Clone the repository: `git clone https://github.com/philippbosch/cordova-osc-plugin.git`,
   *or:* download a [ZIP file](https://github.com/philippbosch/cordova-osc-plugin/archive/master.zip) and extract it.
4. Drag `CDVOSC.h` and `CDVOSC.m` from the `ios` folder to the `Plugins` folder in your XCode project.
5. Copy `osc.js` from the `www` folder to the `www` folder in your XCode project.
6. Add a reference to the JavaScript file in your HTML code right after the `cordova-x.x.x.js` script, like so:
   `<script src="osc.js"></script>`.
7. In your app's `config.xml` file look out for the `<plugins>` section and append `<plugin name="OSC" value="CDVOSC" />` to it.


Usage
-----

### Sending messages

```javascript
// setup the remote host to which you want to send messages
var remote = window.plugins.osc.createRemoteLocation('192.168.0.123', 11000);

// create an empty message with the desired address pattern
var msg = window.plugins.osc.createMessage('/address');

// add values to your message
{'fraction_non_alphanumeric': 0.14720314033366044, 'fraction_numerical': 0.015047432122996402, 'mean_word_length': 4.183050847457627, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 8, 'lorem ipsum': 0, 'www.': 4, 'xml': 2}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5638679', 'n_tokens_mistral': 983, 'n_tokens_neox': 941, 'n_words': 333}