Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Open Sound Control 2007/11/16 Dinh Trong Thuy RTLab Outline OSC Introduction OSC Introduction Lego remote control using OSC MC Helper OSC message Programming environment Further study References OSC Introduction Created by Matt Wright, Center for New Music and Audio Technology (CNMAT), Univ. California, Berkeley Open Sound Control (OSC) is an open, transportindependent, message-based protocol developed for communication among devices. The OSC is already supported in Max/MSP, Pd, Flash (via FLOSC), Ruby, Python, Java, Perl, PHP, Objective C, SuperCollider, … OSC Introduction (cont.) OSC features: Open-ended, dynamic, URL-style symbolic naming scheme Numeric and symbolic arguments to messages Pattern matching language to specify multiple targets of a single message High resolution time tags "Bundles" of messages whose effects must occur simultaneously Query system to dynamically find out the capabilities of an OSC server and get documentation Lego remote control using OSC OSC message OSC client under (Linux, Windows) OSC server (ARM7) Socket connection USB Wireless: ZigBee… Sensor Motor MC Helper Upload new firmware to ARM7 Get a quick glance at the current state of your Make Controller - IP address, name, serial number, etc. using OSC protocol Manually send OSC messages to your Make Controller (ARM7) over Ethernet and USB Allow Flash (or other programs) communicate with ARM7 connected to the computer Open source. Written in C++, built with QT4 MC Helper (cont.) MC Helper (cont.) the port that the board will send outgoing OSC messages on the port that the board is listening on for incoming OSC messages MC Helper (cont.) OSC messages Type the OSC message here OSC message The basic unit of OSC data is a message OSC messages are composed of an address, and the data to be sent to that address Each OSC message must start with a slash (/) OSC address: Looks like a URL Self defined by OSC server Each element in the address is like a directory with other element inside it Each element is separated from a next by a slash Example: /network/address OSC message (cont.) The data Can be sent to that address by including them in the message after the address Data values can be integers, floats or strings There is a space between the address and the data Example: /network/address 155.230.15.123 Additional address can be added, each separate by a space OSC message (cont.) OSC message in Make Controller Kit project: /subsystem/device/property data Example: /appled/*/state 1 Turn on all the led numbered /appled/[0-3]/state 0 Turn off the led numbered from 0 to 3 Programming environment Microcontroller: AT91SAM7X256 C programming language Open source: Make Controller Firmware Compiler toolchain: GNUARM Rowley CrossWorks MC Helper Programming environment (cont.) Application Board library Controller library Default program run on ARM7 Project names Programming environment (cont.) Programming environment (cont.) The Controller Library: High level abstraction from the Atmel structure, lwIP and FreeRTOS Firmware API examples: Io: Controls access to the SAM7X’s IO lines Network: Interface to the TCP/IP stack PWM: Control the PWM devices Rtos: Provides many basic OS primitives System: Provides access to system variables Timer: Provides a timer mechanism Led: Controls the status LED Programming environment (cont.) The Application Board Library Builds on the Controller Library Has functions for manipulating the board inputs and outputs in a variety of ways, controlling Servo motors, etc. Firmware API examples: AppLed: Control the Application Board Leds Motor: Control DC Motors PwmOut: Control output using PWM Servo: Control Hobby Servo Motors Further study OSC source code in details Demo program Using MC Helper to control LED and Motor via OSC messages Remote client program Further study (cont.) OSC client (Linux, Windows) OSC message OSC server (ARM7) Led Motor Issues USB parameter should be here When press send button, sometime it works however, it usually does nothing. In the theory, It has to work every time it is pressed These errors happen in some computer But they do not occur on some other computers References http://www.cnmat.berkeley.edu/OpenSoundC ontrol/ http://www.makingthings.com/ Q&A