Giter Site home page Giter Site logo

unityabletonlink's Introduction

UnityAbletonLink

UnityAbletonLink is an Ableton Link plugin for Unity.

Building

After checked out the UnityAbletonLink repository, then check out all dependencies.

cd UnityAbletonLink
git submodule update --init --recursive

Open UnityAbletonLink.xcodeproj with Xcode, then build it.

Running

Create a new Unity project. Create a Plugins folder under the Assets folder of the project.

Mac

Copy UnityAbletonLink.bundle and CSharp/AbletonLink.cs into the Plugins folder.

Windows

Copy CSharp/AbletonLink.cs into the Plugins folder. Create the x86_64 folder under the Plugins folder. Copy UnityAbletonLink.dll into the Plugins/x86_64 folder.

Where AbletonLink.cs is a wrapper script for UnityAbletonLink plugin.

Write some script to use it. For example,

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Example : MonoBehaviour {

	private AbletonLink link;

	// Use this for initialization
	void Start () {
	}

	// Update is called once per frame
	void Update () {
        	double beat, phase, tempo, time;
		int numPeers;
        	AbletonLink.Instance.update(out beat, out phase, out tempo, out time, out numPeers);

		// We can obtain the latest beat and phase like this.
		Debug.Log ("beat: " + beat + " phase:" + phase);
	}
}

Attach the script to a GameObject (e.g. Main Camera or something).

Play the scene and play the other Ableton Link supported application such as Ableton Live, then you can see log messages like the following.

...
beat: 43.151854 phase:3.151854
UnityEngine.Debug:Log(Object)
beat: 43.265132 phase:3.265132
UnityEngine.Debug:Log(Object)
...

License

These codes are licensed under CC0.

CC0

unityabletonlink's People

Contributors

comoc avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.