Latest 1.1.3
Homepage https://github.com/devinroth/SwiftOSC
License MIT
Platforms ios 9.0, osx 10.10
Authors

SwiftOSC v1.1.3

Build Status
Version
License
Platform

SwiftOSC is a Swift Open Sound Control 1.1 client and server framework.

Installation

pod 'SwiftOSC', '~> 1.1'

OR

Step 1

Clone or download repository from Github.

Step 2

Open SwiftOSC.xcworkspace and build SwiftOSC frameworks.

Step 3

Embed SwiftOSC into project.

Quick Start

OSC Server

Step 1

Import SwiftOSC framework into your project

import SwiftOSC

Step 2

Create Server

var server = OSCServer(address: "", port: 8080)

Step 3

Start server

server.start()

Step 4

Setup server delegate to handle incoming OSC Data

class OSCHandler: OSCServerDelegate {

    func didReceive(_ message: OSCMessage){
        if let integer = message.arguments[0] as Int {
            print("Received int (integer)"
        } else {
            print(message)
        }
    }
}
server.delegate =  OSCHandler()

OSC Client

Step 1

Import SwiftOSC framework into your project

import SwiftOSC

Step 2

Create client

var client = OSCClient(address: "localhost", port: 8080)

Step 3

Create a message

var message = OSCMessage(
    OSCAddressPattern("/"), 
    100, 
    5.0, 
    "Hello World", 
    Blob(), 
    true, 
    false, 
    nil, 
    impulse, 
    Timetag(1)
)

Step 4

Send message

client.send(message)

Known Issues

  • All OSC messages are delivered immediately. Timetags are ignored.

About

Devin Roth is a composer and programmer. When not composing, teaching, or being a dad, Devin attempts to make his life more efficient by writing programs.

For additional information on Open Sound Control visit http://opensoundcontrol.org/.

Latest podspec

{
    "name": "SwiftOSC",
    "version": "1.1.3",
    "summary": "SwiftOSC is an Open Sound Control client and server framework written in Swift.",
    "description": "SwiftOSC is an Open Sound Control client and server framework written in Swift. SwiftOSC impliments all the functionality of the OSC 1.0 specifications (http://opensoundcontrol.org/spec-1_0) and is also exteneded to include the features of OSC 1.1 (https://hangar.org/webnou/wp-content/uploads/2012/01/Nime09OSCfinal.pdf).",
    "homepage": "https://github.com/devinroth/SwiftOSC",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Devin Roth": "[email protected]"
    },
    "source": {
        "git": "https://github.com/devinroth/SwiftOSC.git",
        "tag": "1.1.3"
    },
    "platforms": {
        "ios": "9.0",
        "osx": "10.10"
    },
    "ios": {
        "source_files": [
            "Framework/iOS/iOS}",
            "Framework/iOS/**/*.{c,h,m,swift}",
            "Framework/SwiftOSC/**/*.{c,h,m,swift}"
        ]
    },
    "osx": {
        "source_files": [
            "Framework/macOS/macOS",
            "Framework/macOS/**/*.{c,h,m,swift}",
            "Framework/SwiftOSC/**/*.{c,h,m,swift}"
        ]
    },
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This