forked from sandeepmistry/esp8266-OSC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
executable file
·136 lines (102 loc) · 6.95 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
OSC for Arduino and Related Microcontrollers
This is an Arduino and Teensy library implementation of the OSC encoding (http://opensoundcontrol.org)
It was developed primarily by Yotam Mann and Adrian Freed at CNMAT where OSC was invented.
It benefits from contributions from John MacCallum, Matt Wright, Jeff Lubow and Andy Schmeder
and many beta testers.
- Supports the four basic OSC data types (32-bit integers, 32-bit floats, strings, and blobs - arbitrary length byte sequences)
- Supports the optional 64-bit timetag data type and Booleans
- Address pattern matching
- Dynamic memory allocation
- Sends and receives OSC packets over transport layers that implements the Arduino Stream Class such as Serial and Ethernet UDP
- It has been tested on Basic Arduinos, Lilypads, Flora, Arduino Ethernet, Arduino Leonardo, Teensy primarily with the Wiznet W5100 chip
New in this release:
- Beginnings of support for timetags with initial implementations for teensy 3, teensy 2 and Atmega Arduinos
- Sketches compile also in MPIDE for PIC32's there has been limited testing on the Fubarino MINI
(watch out on this platform: it connects and numbers digital pins in use for USB and clock XTAL!)
- Added Boolean type according to OSC 1.0 optional type spec. (lightly tested)
Supported IDE:
Arduino 1.05 and 1.6.3 (tested for Due Serial and Teensy so far)
Best Supported Board:
The Teensy 3.0 and 3.1 and LC have the performance and memory that afford rich OSC implementations.
Our primary test platform for new development is the Teensy 3.1 which currently offers the best performance
of any of the Arduinos and variants. We greatly appreciate Paul Stoffregen's ongoing work
with "best practice" engineering of high performance microcontrollers.
Unsupported boards:
Arduino Yun and related openwrt/arduino hybrids (e.g. Draguino):
Marco Brianza is exploring these interesting approaches to running this OSC library on the Atmel 32u4 in the Yun:
https://github.com/cylinderlight/udp2serial
https://github.com/cylinderlight/udp2serialSPI
The Yun still lacks the Linux-side support to reliably move data between the 32u4 and the router's cpu. We recommend that you add a Teensy to
the USB port of an OpenWrt router to get good performance and reliability with our library.
Roadmap (your contributions appreciated):
2015:
- use of github release features
- support for special OSC types in CNMAT's "o." especially subbundles
- examples for recent OSC support in node.js and Node Red
- nested bundles
- performance tuning
- 86duino testing and examples
- spark core examples
- Better Time Tags that avoid the overflow limitation of Arduino timer code
- Time Tag synchronization
Potentials for 2016 and beyond:
- Unit testing
- Bluetooth LE
- TCP/IP Examples
- examples for more applications (i.e. TouchOSC, Processing with SLIP)
- deadline scheduling of OSC 64-bit timetags
- Support for Arduino WiFi
- ADK support
API Documentation and examples are available at http://cnmat.berkeley.edu/oscuino
This is an active development and research project with revisions available on the GIT repository:
https://github.com/CNMAT/OSC.
We welcome and appreciate your contributions and feedback there.
////////////////////////////////////////////////////////////////////////
SLIPSerial
The OSC for Arduino library includes extensions of the USB serial and Hardware serial functions of the Arduino core that sends and receives data using the SLIP encoding.
This makes Max/MSP and PD integration very simple using CNMAT's o.io.slipserial.
The SLIPSerial library implements the same methods as the Serial object with additional "beginPacket" and "endPacket" methods to
mark the boundaries of each packet in a serial stream.
////////////////////////////////////////////////////////////////////////
Installation from GitHub
We recommend Arduino 1.05 or greater and Teensyduino 1.14 or later if you use the Teensy.
Download the zip from github. Unzip it and remove text after the "-" in the name (i.e. -master) because
the Arduino IDE doesn't allow certain characters in library names.
Move the OSC folder into your "libraries" folder in your Arduino Sketch search path.
Now you will see OSC examples under the Examples menu of Arduino.
The Applications folder contains examples for Max/MSP and PD and Processing that work with the example sketches. This will be expanded to include other applications like TouchOSC and Processing
For the Max/MSP examples you will need to download the CNMAT max externals package that includes the "o." objects available at http://cnmat.berkeley.edu/downloads
////////////////////////////////////////////////////////////////////////
Guide
As well as many small examples illustrating the API, there is a larger application called "oscuino"
that illustrates how to use OSC to simplify situations Firmata and Maxuino are typically used in.
////////////////////////////////////////////////////////////////////////
Performance
Currently best performance is achieved with Arduinos with built-in USB Serial, i.e. Teensy 3.0, Teensy 2.0 and 2.0++ and Leanardo variants (12Mbps max)
This is because the Wiznet 5100 used in the Ethernet Arduino and shields uses really slow SPI (0.3Mbps)
This will change as people retool to use the much faster Wiznet 5200 which has been measured with the Due at 6Mbps
http://forum.pjrc.com/threads/17951-WIZ820io-Ethernet-and-2nd-power-supply-with-teensy-3-0
http://arduino.cc/forum/index.php?topic=139147.0
The serial examples use a 9600 baud rate which is reliable on most of the FTDI based Arduinos.
The slow rate is required for Arduino's without clock chips such as the TinyLili.
Once you have established that things work at 9600 baud you will find it very beneficial to increase the rate.
e.g. Serial.begin(345600); // !! 115200, 230400, 345600, 460800 X
////////////////////////////////////////////////////////////////////////
License
Written by Yotam Mann and Adrian Freed, The Center for New Music and Audio Technologies,
University of California, Berkeley. Copyright (c) 2013, The Regents of
the University of California (Regents).
Permission to use, copy, modify, distribute, and distribute modified versions
of this software and its documentation without fee and without a signed
licensing agreement, is hereby granted, provided that the above copyright
notice, this paragraph and the following two paragraphs appear in all copies,
modifications, and distributions.
IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING
OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF REGENTS HAS
BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED
HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE
MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.