git-svn-id: svn://code.dyne.org/veejay/trunk@59 eb8d1916-c9e9-0310-b8de-cf0c9472ead5
This commit is contained in:
Niels Elburg
2004-12-01 11:27:33 +00:00
parent 418fc2a164
commit f0d9edb087
52 changed files with 28128 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
1. run make in libOSC
2. run make in send+dump
now you have a sendOSC utility in send+dump

View File

@@ -0,0 +1,7 @@
/Makefile/1.1.1.1/Wed Oct 27 23:48:55 2004//
/OSC-client.c/1.1.1.1/Wed Oct 27 23:48:55 2004//
/OSC-client.h/1.1.1.1/Wed Oct 27 23:48:56 2004//
/OSC-timetag.c/1.1.1.1/Wed Oct 27 23:48:55 2004//
/OSC-timetag.h/1.1.1.1/Wed Oct 27 23:48:55 2004//
/index.html/1.1.1.1/Wed Oct 27 23:48:55 2004//
D

View File

@@ -0,0 +1 @@
veejay/test/OSC/libOSC

View File

@@ -0,0 +1 @@
:pserver:niels@cvs.dyne.org:/veejay

View File

@@ -0,0 +1,21 @@
CFLAGS= -O2
LIB=libOSC.a
LIBOBJS= ${LIB}(OSC-client.o) ${LIB}(OSC-timetag.o)
all: ${LIBOBJS}
.c.a:
${CC} -c ${CFLAGS} $<
${AR} ${ARFLAGS} $@ $*.o
rm -f $*.o
test_OSC: test_OSC.o ${LIB}
cc -o test_OSC test_OSC.o ${LIB}
test_OSC_timeTag: test_OSC_timeTag.o OSC-timetag.o
cc -o test_OSC_timeTag test_OSC_timeTag.o OSC-timetag.o
clean:
rm -f ${LIB} *.o

View File

@@ -0,0 +1,470 @@
/*
Written by Matt Wright, The Center for New Music and Audio Technologies,
University of California, Berkeley. Copyright (c) 1996,97,98,99,2000,01,02,03
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.
*/
/*
Author: Matt Wright
Version 2.2: Calls htonl in the right places 20000620
Version 2.3: Gets typed messages right.
Version 2.4: 031215: (re)added ChangeOutermostTimestamp(), htonl() OSX kludge
*/
/* Here are the possible values of the state field: */
#define EMPTY 0 /* Nothing written to packet yet */
#define ONE_MSG_ARGS 1 /* Packet has a single message; gathering arguments */
#define NEED_COUNT 2 /* Just opened a bundle; must write message name or
open another bundle */
#define GET_ARGS 3 /* Getting arguments to a message. If we see a message
name or a bundle open/close then the current message
will end. */
#define DONE 4 /* All open bundles have been closed, so can't write
anything else */
#include "OSC-client.h"
#ifdef TARGET_API_MAC_CARBON
/* KLUDGE for OSX: */
#define htonl(x) (x)
#endif
char *OSC_errorMessage;
static int strlen(char *s);
static int OSC_padString(char *dest, char *str);
static int OSC_padStringWithAnExtraStupidComma(char *dest, char *str);
static int OSC_WritePadding(char *dest, int i);
static int CheckTypeTag(OSCbuf *buf, char expectedType);
void OSC_initBuffer(OSCbuf *buf, int size, char *byteArray) {
buf->buffer = byteArray;
buf->size = size;
OSC_resetBuffer(buf);
}
void OSC_resetBuffer(OSCbuf *buf) {
buf->bufptr = buf->buffer;
buf->state = EMPTY;
buf->bundleDepth = 0;
buf->prevCounts[0] = 0;
buf->outerMostTimeStamp = 0;
buf->gettingFirstUntypedArg = 0;
buf->typeStringPtr = 0;
}
int OSC_isBufferEmpty(OSCbuf *buf) {
return buf->bufptr == buf->buffer;
}
int OSC_freeSpaceInBuffer(OSCbuf *buf) {
return buf->size - (buf->bufptr - buf->buffer);
}
int OSC_isBufferDone(OSCbuf *buf) {
return (buf->state == DONE || buf->state == ONE_MSG_ARGS);
}
char *OSC_getPacket(OSCbuf *buf) {
#ifdef ERROR_CHECK_GETPACKET
if (buf->state == DONE || buf->state == ONE_MSG_ARGS) {
return buf->buffer;
} else {
OSC_errorMessage = "Packet has unterminated bundles";
return 0;
}
#else
return buf->buffer;
#endif
}
int OSC_packetSize(OSCbuf *buf) {
#ifdef ERROR_CHECK_PACKETSIZE
if (buf->state == DONE || buf->state == ONE_MSG_ARGS) {
return (buf->bufptr - buf->buffer);
} else {
OSC_errorMessage = "Packet has unterminated bundles";
return 0;
}
#else
return (buf->bufptr - buf->buffer);
#endif
}
#define CheckOverflow(buf, bytesNeeded) { \
if ((bytesNeeded) > OSC_freeSpaceInBuffer(buf)) { \
OSC_errorMessage = "buffer overflow"; \
return 1; \
} \
}
static void PatchMessageSize(OSCbuf *buf) {
int4byte size;
size = buf->bufptr - ((char *) buf->thisMsgSize) - 4;
*(buf->thisMsgSize) = htonl(size);
}
int OSC_openBundle(OSCbuf *buf, OSCTimeTag tt) {
if (buf->state == ONE_MSG_ARGS) {
OSC_errorMessage = "Can't open a bundle in a one-message packet";
return 3;
}
if (buf->state == DONE) {
OSC_errorMessage = "This packet is finished; can't open a new bundle";
return 4;
}
if (++(buf->bundleDepth) >= MAX_BUNDLE_NESTING) {
OSC_errorMessage = "Bundles nested too deeply; change MAX_BUNDLE_NESTING in OpenSoundControl.h";
return 2;
}
if (CheckTypeTag(buf, '\0')) return 9;
if (buf->state == GET_ARGS) {
PatchMessageSize(buf);
}
if (buf->state == EMPTY) {
/* Need 16 bytes for "#bundle" and time tag */
CheckOverflow(buf, 16);
} else {
/* This bundle is inside another bundle, so we need to leave
a blank size count for the size of this current bundle. */
CheckOverflow(buf, 20);
*((int4byte *)buf->bufptr) = 0xaaaaaaaa;
buf->prevCounts[buf->bundleDepth] = (int4byte *)buf->bufptr;
buf->bufptr += 4;
}
buf->bufptr += OSC_padString(buf->bufptr, "#bundle");
*((OSCTimeTag *) buf->bufptr) = tt;
if (buf->state == EMPTY) {
buf->outerMostTimeStamp = (OSCTimeTag *) buf->bufptr;
}
if (htonl(1) != 1) {
/* Byte swap the 8-byte integer time tag */
int4byte *intp = (int4byte *)buf->bufptr;
intp[0] = htonl(intp[0]);
intp[1] = htonl(intp[1]);
#ifdef HAS8BYTEINT
{ /* tt is a 64-bit int so we have to swap the two 32-bit words.
(Otherwise tt is a struct of two 32-bit words, and even though
each word was wrong-endian, they were in the right order
in the struct.) */
int4byte temp = intp[0];
intp[0] = intp[1];
intp[1] = temp;
}
#endif
}
buf->bufptr += sizeof(OSCTimeTag);
buf->state = NEED_COUNT;
buf->gettingFirstUntypedArg = 0;
buf->typeStringPtr = 0;
return 0;
}
int ChangeOutermostTimestamp(OSCbuf *buf, OSCTimeTag tt) {
if (buf->outerMostTimeStamp == 0) {
OSC_errorMessage = "No outermost timestamp to change.";
return 1;
} else {
*(buf->outerMostTimeStamp) = tt;
return 0;
}
}
int OSC_closeBundle(OSCbuf *buf) {
if (buf->bundleDepth == 0) {
/* This handles EMPTY, ONE_MSG, ARGS, and DONE */
OSC_errorMessage = "Can't close bundle; no bundle is open!";
return 5;
}
if (CheckTypeTag(buf, '\0')) return 9;
if (buf->state == GET_ARGS) {
PatchMessageSize(buf);
}
if (buf->bundleDepth == 1) {
/* Closing the last bundle: No bundle size to patch */
buf->state = DONE;
} else {
/* Closing a sub-bundle: patch bundle size */
int size = buf->bufptr - ((char *) buf->prevCounts[buf->bundleDepth]) - 4;
*(buf->prevCounts[buf->bundleDepth]) = htonl(size);
buf->state = NEED_COUNT;
}
--buf->bundleDepth;
buf->gettingFirstUntypedArg = 0;
buf->typeStringPtr = 0;
return 0;
}
int OSC_closeAllBundles(OSCbuf *buf) {
if (buf->bundleDepth == 0) {
/* This handles EMPTY, ONE_MSG, ARGS, and DONE */
OSC_errorMessage = "Can't close all bundles; no bundle is open!";
return 6;
}
if (CheckTypeTag(buf, '\0')) return 9;
while (buf->bundleDepth > 0) {
OSC_closeBundle(buf);
}
buf->typeStringPtr = 0;
return 0;
}
int OSC_writeAddress(OSCbuf *buf, char *name) {
int4byte paddedLength;
if (buf->state == ONE_MSG_ARGS) {
OSC_errorMessage = "This packet is not a bundle, so you can't write another address";
return 7;
}
if (buf->state == DONE) {
OSC_errorMessage = "This packet is finished; can't write another address";
return 8;
}
if (CheckTypeTag(buf, '\0')) return 9;
paddedLength = OSC_effectiveStringLength(name);
if (buf->state == EMPTY) {
/* This will be a one-message packet, so no sizes to worry about */
CheckOverflow(buf, paddedLength);
buf->state = ONE_MSG_ARGS;
} else {
/* GET_ARGS or NEED_COUNT */
CheckOverflow(buf, 4+paddedLength);
if (buf->state == GET_ARGS) {
/* Close the old message */
PatchMessageSize(buf);
}
buf->thisMsgSize = (int4byte *)buf->bufptr;
*(buf->thisMsgSize) = 0xbbbbbbbb;
buf->bufptr += 4;
buf->state = GET_ARGS;
}
/* Now write the name */
buf->bufptr += OSC_padString(buf->bufptr, name);
buf->typeStringPtr = 0;
buf->gettingFirstUntypedArg = 1;
return 0;
}
int OSC_writeAddressAndTypes(OSCbuf *buf, char *name, char *types) {
int result;
int4byte paddedLength;
if (CheckTypeTag(buf, '\0')) return 9;
result = OSC_writeAddress(buf, name);
if (result) return result;
paddedLength = OSC_effectiveStringLength(types);
CheckOverflow(buf, paddedLength);
buf->typeStringPtr = buf->bufptr + 1; /* skip comma */
buf->bufptr += OSC_padString(buf->bufptr, types);
buf->gettingFirstUntypedArg = 0;
return 0;
}
static int CheckTypeTag(OSCbuf *buf, char expectedType) {
if (buf->typeStringPtr) {
if (*(buf->typeStringPtr) != expectedType) {
if (expectedType == '\0') {
OSC_errorMessage =
"According to the type tag I expected more arguments.";
} else if (*(buf->typeStringPtr) == '\0') {
OSC_errorMessage =
"According to the type tag I didn't expect any more arguments.";
} else {
OSC_errorMessage =
"According to the type tag I expected an argument of a different type.";
/* printf("* Expected %c, string now %s\n", expectedType, buf->typeStringPtr); */
}
return 9;
}
++(buf->typeStringPtr);
}
return 0;
}
int OSC_writeFloatArg(OSCbuf *buf, float arg) {
int4byte *intp;
int result;
CheckOverflow(buf, 4);
if (CheckTypeTag(buf, 'f')) return 9;
/* Pretend arg is a long int so we can use htonl() */
intp = ((int4byte *) &arg);
*((int4byte *) buf->bufptr) = htonl(*intp);
buf->bufptr += 4;
buf->gettingFirstUntypedArg = 0;
return 0;
}
int OSC_writeFloatArgs(OSCbuf *buf, int numFloats, float *args) {
int i;
int4byte *intp;
CheckOverflow(buf, 4 * numFloats);
/* Pretend args are long ints so we can use htonl() */
intp = ((int4byte *) args);
for (i = 0; i < numFloats; i++) {
if (CheckTypeTag(buf, 'f')) return 9;
*((int4byte *) buf->bufptr) = htonl(intp[i]);
buf->bufptr += 4;
}
buf->gettingFirstUntypedArg = 0;
return 0;
}
int OSC_writeIntArg(OSCbuf *buf, int4byte arg) {
CheckOverflow(buf, 4);
if (CheckTypeTag(buf, 'i')) return 9;
*((int4byte *) buf->bufptr) = htonl(arg);
buf->bufptr += 4;
buf->gettingFirstUntypedArg = 0;
return 0;
}
int OSC_writeStringArg(OSCbuf *buf, char *arg) {
int len;
if (CheckTypeTag(buf, 's')) return 9;
len = OSC_effectiveStringLength(arg);
if (buf->gettingFirstUntypedArg && arg[0] == ',') {
/* This un-type-tagged message starts with a string
that starts with a comma, so we have to escape it
(with a double comma) so it won't look like a type
tag string. */
CheckOverflow(buf, len+4); /* Too conservative */
buf->bufptr +=
OSC_padStringWithAnExtraStupidComma(buf->bufptr, arg);
} else {
CheckOverflow(buf, len);
buf->bufptr += OSC_padString(buf->bufptr, arg);
}
buf->gettingFirstUntypedArg = 0;
return 0;
}
/* String utilities */
static int strlen(char *s) {
int i;
for (i=0; s[i] != '\0'; i++) /* Do nothing */ ;
return i;
}
#define STRING_ALIGN_PAD 4
int OSC_effectiveStringLength(char *string) {
int len = strlen(string) + 1; /* We need space for the null char. */
/* Round up len to next multiple of STRING_ALIGN_PAD to account for alignment padding */
if ((len % STRING_ALIGN_PAD) != 0) {
len += STRING_ALIGN_PAD - (len % STRING_ALIGN_PAD);
}
return len;
}
static int OSC_padString(char *dest, char *str) {
int i;
for (i = 0; str[i] != '\0'; i++) {
dest[i] = str[i];
}
return OSC_WritePadding(dest, i);
}
static int OSC_padStringWithAnExtraStupidComma(char *dest, char *str) {
int i;
dest[0] = ',';
for (i = 0; str[i] != '\0'; i++) {
dest[i+1] = str[i];
}
return OSC_WritePadding(dest, i+1);
}
static int OSC_WritePadding(char *dest, int i) {
dest[i] = '\0';
i++;
for (; (i % STRING_ALIGN_PAD) != 0; i++) {
dest[i] = '\0';
}
return i;
}

View File

@@ -0,0 +1,180 @@
/*
Written by Matt Wright, The Center for New Music and Audio Technologies,
University of California, Berkeley. Copyright (c) 1996,97,98,99,2000,01,02,03
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.
*/
/*
OSC-client.h: library for constructing OpenSoundControl messages.
Derived from SynthControl.h
Author: Matt Wright
Version 0.1: 6/13/97
Version 0.2: 7/21/2000: Support for type-tagged messages
Version 0.3: 031215: (re)added ChangeOutermostTimestamp()
General notes:
This library abstracts away the data format for the OpenSoundControl
protocol. Users of this library can construct OpenSoundControl packets
with a function call interface instead of knowing how to lay out the bits.
All issues of memory allocation are deferred to the user of this library.
There are two data structures that the user must allocate. The first
is the actual buffer that the message will be written into. This buffer
can be any size, but if it's too small there's a possibility that it
will become overfull. The other data structure is called an OSCbuf,
and it holds all the state used by the library as it's constructing
a buffer.
All procedures that have the possibility of an error condition return int,
with 0 indicating no error and nonzero indicating an error. The variable
OSC_errorMessage will be set to point to a string containing an error
message explaining what the problem is.
*/
#include "OSC-timetag.h"
/* The int4byte type has to be a 4-byte integer. You may have to
change this to long or something else on your system. */
#ifdef __MWERKS__
/* In Metrowerks you can set ints to be 2 or 4 bytes on 68K, but long is
always 4 bytes */
typedef long int4byte;
#else
typedef int int4byte;
#endif
/* The maximum depth of bundles within bundles within bundles within...
This is the size of a static array. If you exceed this limit you'll
get an error message. */
#define MAX_BUNDLE_NESTING 32
/* Don't ever manipulate the data in the OSCbuf struct directly. (It's
declared here in the header file only so your program will be able to
declare variables of type OSCbuf and have the right amount of memory
be allocated.) */
typedef struct OSCbuf_struct {
char *buffer; /* The buffer to hold the OSC packet */
int size; /* Size of the buffer */
char *bufptr; /* Current position as we fill the buffer */
int state; /* State of partially-constructed message */
int4byte *thisMsgSize; /* Pointer to count field before
currently-being-written message */
int4byte *prevCounts[MAX_BUNDLE_NESTING];
/* Pointers to count field before each currently
open bundle */
int bundleDepth; /* How many sub-sub-bundles are we in now? */
OSCTimeTag *outerMostTimeStamp; /* Pointer to highest-level enclosing timestamp */
char *typeStringPtr; /* This pointer advances through the type
tag string as you add arguments. */
int gettingFirstUntypedArg; /* nonzero if this message doesn't have
a type tag and we're waiting for the 1st arg */
} OSCbuf;
/* Initialize the given OSCbuf. The user of this module must pass in the
block of memory that this OSCbuf will use for a buffer, and the number of
bytes in that block. (It's the user's job to allocate the memory because
you do it differently in different systems.) */
void OSC_initBuffer(OSCbuf *buf, int size, char *byteArray);
/* Reset the given OSCbuf. Do this after you send out the contents of
the buffer and want to start writing new data into it. */
void OSC_resetBuffer(OSCbuf *buf);
/* Is the buffer empty? (I.e., would it be stupid to send the buffer
contents to the synth?) */
int OSC_isBufferEmpty(OSCbuf *buf);
/* How much space is left in the buffer? */
int OSC_freeSpaceInBuffer(OSCbuf *buf);
/* Does the buffer contain a valid OSC packet? (Returns nonzero if yes.) */
int OSC_isBufferDone(OSCbuf *buf);
/* When you're ready to send out the buffer (i.e., when OSC_isBufferDone()
returns true), call these two procedures to get the OSC packet that's been
assembled and its size in bytes. (And then call OSC_resetBuffer() if you
want to re-use this OSCbuf for the next packet.) */
char *OSC_getPacket(OSCbuf *buf);
int OSC_packetSize(OSCbuf *buf);
/* If a packet already has a timestamp, change it to the given new one. */
int ChangeOutermostTimestamp(OSCbuf *buf, OSCTimeTag tt);
/* Here's the basic model for building up OSC messages in an OSCbuf:
- Make sure the OSCbuf has been initialized with OSC_initBuffer().
- To open a bundle, call OSC_openBundle(). You can then write
messages or open new bundles within the bundle you opened.
Call OSC_closeBundle() to close the bundle. Note that a packet
does not have to have a bundle; it can instead consist of just a
single message.
- For each message you want to send:
- Call OSC_writeAddress() with the name of your message. (In
addition to writing your message name into the buffer, this
procedure will also leave space for the size count of this message.)
- Alternately, call OSC_writeAddressAndTypes() with the name of
your message and with a type string listing the types of all the
arguments you will be putting in this message.
- Now write each of the arguments into the buffer, by calling one of:
OSC_writeFloatArg()
OSC_writeFloatArgs()
OSC_writeIntArg()
OSC_writeStringArg()
- Now your message is complete; you can send out the buffer or you can
add another message to it.
*/
int OSC_openBundle(OSCbuf *buf, OSCTimeTag tt);
int OSC_closeBundle(OSCbuf *buf);
int OSC_closeAllBundles(OSCbuf *buf);
int OSC_writeAddress(OSCbuf *buf, char *name);
int OSC_writeAddressAndTypes(OSCbuf *buf, char *name, char *types);
int OSC_writeFloatArg(OSCbuf *buf, float arg);
int OSC_writeFloatArgs(OSCbuf *buf, int numFloats, float *args);
int OSC_writeIntArg(OSCbuf *buf, int4byte arg);
int OSC_writeStringArg(OSCbuf *buf, char *arg);
extern char *OSC_errorMessage;
/* How many bytes will be needed in the OSC format to hold the given
string? The length of the string, plus the null char, plus any padding
needed for 4-byte alignment. */
int OSC_effectiveStringLength(char *string);

View File

@@ -0,0 +1,170 @@
/*
Copyright (c) 1998,99,2000,01,02,03. The Regents of the University of California (Regents).
All Rights Reserved. Written by Matt Wright, Center for New Music and Audio Technologies,
University of California, Berkeley.
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.
The OpenSound Control WWW page is
http://www.cnmat.berkeley.edu/OpenSoundControl
*/
/*
OSC_timeTag.c: library for manipulating OSC time tags
Matt Wright, 5/29/97
Version 0.2 (9/11/98): cleaned up so no explicit type names in the .c file.
*/
#include "OSC-timetag.h"
#ifdef HAS8BYTEINT
#define TWO_TO_THE_32_FLOAT 4294967296.0f
OSCTimeTag OSCTT_Immediately(void) {
return (OSCTimeTag) 1;
}
OSCTimeTag OSCTT_BiggestPossibleTimeTag(void) {
return (OSCTimeTag) 0xffffffffffffffff;
}
OSCTimeTag OSCTT_PlusSeconds(OSCTimeTag original, float secondsOffset) {
int64 offset = (int64) (secondsOffset * TWO_TO_THE_32_FLOAT);
/* printf("* OSCTT_PlusSeconds %llx plus %f seconds (i.e., %lld offset) is %llx\n", original,
secondsOffset, offset, original + offset); */
return original + offset;
}
int OSCTT_Compare(OSCTimeTag left, OSCTimeTag right) {
#if 0
printf("***** OSCTT_Compare(%llx, %llx): %d\n", left, right,
(left<right) ? -1 : ((left == right) ? 0 : 1));
#endif
if (left < right) {
return -1;
} else if (left == right) {
return 0;
} else {
return 1;
}
}
#ifdef __sgi
#include <sys/time.h>
#define SECONDS_FROM_1900_to_1970 2208988800 /* 17 leap years */
#define TWO_TO_THE_32_OVER_ONE_MILLION 4295
OSCTimeTag OSCTT_CurrentTime(void) {
uint64 result;
uint32 usecOffset;
struct timeval tv;
struct timezone tz;
BSDgettimeofday(&tv, &tz);
/* First get the seconds right */
result = (unsigned) SECONDS_FROM_1900_to_1970 +
(unsigned) tv.tv_sec -
(unsigned) 60 * tz.tz_minuteswest +
(unsigned) (tz.tz_dsttime ? 3600 : 0);
#if 0
/* No timezone, no DST version ... */
result = (unsigned) SECONDS_FROM_1900_to_1970 +
(unsigned) tv.tv_sec;
#endif
/* make seconds the high-order 32 bits */
result = result << 32;
/* Now get the fractional part. */
usecOffset = (unsigned) tv.tv_usec * (unsigned) TWO_TO_THE_32_OVER_ONE_MILLION;
/* printf("** %ld microsec is offset %x\n", tv.tv_usec, usecOffset); */
result += usecOffset;
/* printf("* OSCTT_CurrentTime is %llx\n", result); */
return result;
}
#else /* __sgi */
/* Instead of asking your operating system what time it is, it might be
clever to find out the current time at the instant your application
starts audio processing, and then keep track of the number of samples
output to know how much time has passed. */
/* Loser version for systems that have no ability to tell the current time: */
OSCTimeTag OSCTT_CurrentTime(void) {
return (OSCTimeTag) 1;
}
#endif /* __sgi */
#else /* Not HAS8BYTEINT */
OSCTimeTag OSCTT_CurrentTime(void) {
OSCTimeTag result;
result.seconds = 0;
result.fraction = 1;
return result;
}
OSCTimeTag OSCTT_BiggestPossibleTimeTag(void) {
OSCTimeTag result;
result.seconds = 0xffffffff;
result.fraction = 0xffffffff;
return result;
}
OSCTimeTag OSCTT_Immediately(void) {
OSCTimeTag result;
result.seconds = 0;
result.fraction = 1;
return result;
}
OSCTimeTag OSCTT_PlusSeconds(OSCTimeTag original, float secondsOffset) {
OSCTimeTag result;
result.seconds = 0;
result.fraction = 1;
return result;
}
int OSCTT_Compare(OSCTimeTag left, OSCTimeTag right) {
/* Untested! */
int highResult = left.seconds - right.seconds;
if (highResult != 0) return highResult;
return left.fraction - right.fraction;
}
#endif /* HAS8BYTEINT */

View File

@@ -0,0 +1,88 @@
/*
Written by Matt Wright, The Center for New Music and Audio Technologies,
University of California, Berkeley. Copyright (c) 1998,99,2000,01,02,03,04
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.
The OpenSound Control WWW page is
http://www.cnmat.berkeley.edu/OpenSoundControl
*/
/*
OSC_timeTag.h: library for manipulating OSC time tags
Matt Wright, 5/29/97
Time tags in OSC have the same format as in NTP: 64 bit fixed point, with the
top 32 bits giving number of seconds sinve midnight 1/1/1900 and the bottom
32 bits giving fractional parts of a second. We represent this by a 64-bit
unsigned long if possible, or else a struct.
NB: On many architectures with 64-bit ints, it's illegal (like maybe a bus error)
to dereference a pointer to a 64-bit int that's not 64-bit aligned.
*/
#ifndef OSC_TIMETAG
#define OSC_TIMETAG
#ifdef __sgi
#define HAS8BYTEINT
/* You may have to change this typedef if there's some other
way to specify 64 bit ints on your system */
typedef long long int64;
typedef unsigned long long uint64;
typedef unsigned long uint32;
#else
/* You may have to redefine this typedef if ints on your system
aren't 32 bits. */
typedef unsigned int uint32;
#endif
#ifdef HAS8BYTEINT
typedef uint64 OSCTimeTag;
#else
typedef struct {
uint32 seconds;
uint32 fraction;
} OSCTimeTag;
#endif
/* Return a time tag representing the current time (as of when this
procedure is called). */
OSCTimeTag OSCTT_CurrentTime(void);
/* Return the time tag 0x0000000000000001, indicating to the receiving device
that it should process the message immediately. */
OSCTimeTag OSCTT_Immediately(void);
/* Return the time tag 0xffffffffffffffff, a time so far in the future that
it's effectively infinity. */
OSCTimeTag OSCTT_BiggestPossibleTimeTag(void);
/* Given a time tag and a number of seconds to add to the time tag, return
the new time tag */
OSCTimeTag OSCTT_PlusSeconds(OSCTimeTag original, float secondsOffset);
/* Compare two time tags. Return negative if first is < second, 0 if
they're equal, and positive if first > second. */
int OSCTT_Compare(OSCTimeTag left, OSCTimeTag right);
#endif /* OSC_TIMETAG */

View File

@@ -0,0 +1,20 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<TITLE>Index of /OpenSoundControl/src/libOSC</TITLE>
</HEAD>
<BODY>
<H1>Index of /OpenSoundControl/src/libOSC</H1>
<PRE><IMG SRC="/icons/blank.gif" ALT=" "> <A HREF="?N=D">Name</A> <A HREF="?M=A">Last modified</A> <A HREF="?S=A">Size</A> <A HREF="?D=A">Description</A>
<HR>
<IMG SRC="/icons/back.gif" ALT="[DIR]"> <A HREF="/OpenSoundControl/src/">Parent Directory</A> 02-Feb-2004 11:51 -
<IMG SRC="/icons/text.gif" ALT="[TXT]"> <A HREF="Makefile">Makefile</A> 24-Sep-2003 13:10 1k
<IMG SRC="/icons/text.gif" ALT="[TXT]"> <A HREF="OSC-client.c">OSC-client.c</A> 06-Jan-2004 08:21 12k
<IMG SRC="/icons/text.gif" ALT="[TXT]"> <A HREF="OSC-client.h">OSC-client.h</A> 06-Jan-2004 08:20 7k
<IMG SRC="/icons/text.gif" ALT="[TXT]"> <A HREF="OSC-timetag.c">OSC-timetag.c</A> 12-Apr-2004 11:05 5k
<IMG SRC="/icons/text.gif" ALT="[TXT]"> <A HREF="OSC-timetag.h">OSC-timetag.h</A> 12-Apr-2004 11:05 3k
<IMG SRC="/icons/text.gif" ALT="[TXT]"> <A HREF="test_OSC.c">test_OSC.c</A> 24-Sep-2003 13:10 3k
<IMG SRC="/icons/text.gif" ALT="[TXT]"> <A HREF="test_OSC_timeTag.c">test_OSC_timeTag.c</A> 24-Sep-2003 13:10 1k
</PRE><HR>
<ADDRESS>Apache/1.3.27 Server at cnmat.cnmat.berkeley.edu Port 80</ADDRESS>
</BODY></HTML>

View File

@@ -0,0 +1,23 @@
#!/bin/perl
my $CMD="sendOSC -h localhost 3492";
system( "$CMD /clip/new,1,1000" );
system( "$CMD /clip/select,1");
for (my $l = 0; $l < 4; $l ++ )
{
for (my $i = 0; $i < 20; $i ++ )
{
system( "$CMD /entry/preset,0,0,151,$i,0,$i,0" );
}
for ( my $i = 60; $i > 0 ; $i -- )
{
system( "$CMD /entry/preset,0,0,151,$i,0,$i,0" );
}
}

View File

@@ -0,0 +1,7 @@
/Makefile/1.1.1.1/Wed Oct 27 23:48:55 2004//
/dumpOSC.c/1.1.1.1/Wed Oct 27 23:48:55 2004//
/dumpUDP.c/1.1.1.1/Wed Oct 27 23:48:55 2004//
/htmsocket.c/1.1.1.1/Wed Oct 27 23:48:55 2004//
/htmsocket.h/1.1.1.1/Wed Oct 27 23:48:55 2004//
/sendOSC.c/1.1.1.1/Wed Oct 27 23:48:55 2004//
D

View File

@@ -0,0 +1 @@
veejay/test/OSC/send+dump

View File

@@ -0,0 +1 @@
:pserver:niels@cvs.dyne.org:/veejay

View File

@@ -0,0 +1,26 @@
LIBOSCDIR = ../libOSC
LIBOSC = ${LIBOSCDIR}/libOSC.a
CFLAGS= -O2 -I$(LIBOSCDIR) -Wall
DEFS= -Dunix
DUMPOBJS=dumpOSC.o
both: sendOSC dumpOSC
sendOSC: sendOSC.o htmsocket.o ${LIBOSC}
${CC} ${CFLAGS} ${DEFS} -o sendOSC sendOSC.o htmsocket.o ${LIBOSC}
dumpOSC: ${DUMPOBJS}
${CC} ${CFLAGS} ${DEFS} -o $@ ${DUMPOBJS}
dumpUDP: dumpUDP.o
${CC} ${CFLAGS} ${DEFS} -o dumpUDP dumpUDP.o
${LIBOSC}:
echo "You need to go to " ${LIBOSCDIR} " and do a make."
clean:
rm -f sendOSC dumpOSC *.o

View File

@@ -0,0 +1,717 @@
/*
Copyright (c) 1992,1993,1994,1995,1996,1997,2000.
The Regents of the University of California (Regents).
All Rights Reserved.
Permission to use, copy, modify, and distribute this software and its
documentation for educational, research, and not-for-profit purposes, 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. Contact The Office of
Technology Licensing, UC Berkeley, 2150 Shattuck Avenue, Suite 510, Berkeley,
CA 94720-1620, (510) 643-7201, for commercial licensing opportunities.
Written by Matt Wright and Adrian Freed, The Center for New Music and Audio
Technologies, University of California, Berkeley.
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.
*/
/*
dumpOSC.c
server that displays OpenSoundControl messages sent to it
for debugging client udp and UNIX protocol
by Matt Wright, 6/3/97
modified from dumpSC.c, by Matt Wright and Adrian Freed
version 0.2: Added "-silent" option a.k.a. "-quiet"
version 0.3: Incorporated patches from Nicola Bernardini to make
things Linux-friendly. Also added ntohl() in the right places
to support little-endian architectures.
compile:
cc -o dumpOSC dumpOSC.c
to-do:
More robustness in saying exactly what's wrong with ill-formed
messages. (If they don't make sense, show exactly what was
received.)
Time-based features: print time-received for each packet
Clean up to separate OSC parsing code from socket/select stuff
*/
#ifdef unix
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <netinet/in.h>
#include <rpc/rpc.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <sys/times.h>
#include <sys/param.h>
#include <sys/time.h>
#include <sys/ioctl.h>
#include <ctype.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <pwd.h>
#include <signal.h>
#include <grp.h>
#include <sys/file.h>
#include <sys/prctl.h>
#include <bits/sigset.h>
#ifdef NEED_SCHEDCTL_AND_LOCK
#include <sys/schedctl.h>
#include <sys/lock.h>
#endif
char *htm_error_string;
typedef int Boolean;
typedef void *OBJ;
typedef struct ClientAddressStruct {
struct sockaddr_in cl_addr;
int clilen;
int sockfd;
} *ClientAddr;
Boolean ShowBytes = FALSE;
Boolean Silent = FALSE;
/* Declarations */
static int unixinitudp(int chan);
static int initudp(int chan);
static void closeudp(int sockfd);
Boolean ClientReply(int packetsize, void *packet, int socketfd,
void *clientaddresspointer, int clientaddressbufferlength);
void sgi_CleanExit(void);
Boolean sgi_HaveToQuit(void);
int RegisterPollingDevice(int fd, void (*callbackfunction)(int , void *), void *dummy);
static void catch_sigint();
static int Synthmessage(char *m, int n, void *clientdesc, int clientdesclength, int fd) ;
void ParseOSCPacket(char *buf, int n, ClientAddr returnAddr);
static void Smessage(char *address, void *v, int n, ClientAddr returnAddr);
static void PrintTypeTaggedArgs(void *v, int n);
static void PrintHeuristicallyTypeGuessedArgs(void *v, int n, int skipComma);
char *DataAfterAlignedString(char *string, char *boundary) ;
Boolean IsNiceString(char *string, char *boundary) ;
void complain(char *s, ...);
#define UNIXDG_PATH "/tmp/htm"
#define UNIXDG_TMP "/tmp/htm.XXXXXX"
static int unixinitudp(int chan)
{
struct sockaddr_un serv_addr;
int sockfd;
if((sockfd = socket(AF_UNIX, SOCK_DGRAM, 0)) < 0)
return sockfd;
bzero((char *)&serv_addr, sizeof(serv_addr));
serv_addr.sun_family = AF_UNIX;
strcpy(serv_addr.sun_path, UNIXDG_PATH);
sprintf(serv_addr.sun_path+strlen(serv_addr.sun_path), "%d", chan);
unlink(serv_addr.sun_path);
if(bind(sockfd, (struct sockaddr *) &serv_addr, sizeof(serv_addr.sun_family)+strlen(serv_addr.sun_path)) < 0)
{
perror("unable to bind\n");
return -1;
}
fcntl(sockfd, F_SETFL, FNDELAY);
return sockfd;
}
static int initudp(int chan)
{
struct sockaddr_in serv_addr;
int sockfd;
if((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
return sockfd;
bzero((char *)&serv_addr, sizeof(serv_addr));
serv_addr.sin_family = AF_INET;
serv_addr.sin_addr.s_addr = htonl(INADDR_ANY);
serv_addr.sin_port = htons(chan);
if(bind(sockfd, (struct sockaddr *) &serv_addr, sizeof(serv_addr)) < 0)
{
perror("unable to bind\n");
return -1;
}
fcntl(sockfd, F_SETFL, FNDELAY);
return sockfd;
}
static void closeudp(int sockfd) {
close(sockfd);
}
static Boolean catchupflag=FALSE;
Boolean ClientReply(int packetsize, void *packet, int socketfd,
void *clientaddresspointer, int clientaddressbufferlength)
{
if(!clientaddresspointer) return FALSE;
catchupflag= TRUE;
return packetsize==sendto(socketfd, packet, packetsize, 0, clientaddresspointer, clientaddressbufferlength);
}
static Boolean exitflag= FALSE;
void sgi_CleanExit(void) {
exitflag = TRUE;
}
Boolean sgi_HaveToQuit(void) {
return exitflag;
}
/* file descriptor poll table */
static int npolldevs =0;
typedef struct polldev
{
int fd;
void (*callbackfunction)(int , void *);
void *dummy;
} polldev;
#define TABMAX 8
static polldev polldevs[TABMAX];
/* Register a device (referred to by a file descriptor that the caller
should have already successfully obtained from a system call) to be
polled as real-time constraints allowed.
When a select(2) call indicates activity on the file descriptor, the
callback function is called with the file descripter as first
argument and the given dummy argument (presumably a pointer to the
instance variables associated with the device).
*/
int RegisterPollingDevice(int fd, void (*callbackfunction)(int , void *), void *dummy)
{
if(npolldevs<TABMAX)
{
polldevs[npolldevs].fd = fd;
polldevs[npolldevs].callbackfunction = callbackfunction;
polldevs[npolldevs].dummy = dummy;
}
else return -1;
return npolldevs++;
}
static int caught_sigint;
static void catch_sigint() {
caught_sigint = 1;
}
static int sockfd, usockfd;
static int Synthmessage(char *m, int n, void *clientdesc, int clientdesclength, int fd) {
struct ClientAddressStruct ras;
ClientAddr ra = &ras;
catchupflag= FALSE;
ras.cl_addr = *((struct sockaddr_in *) clientdesc);
ras.clilen = clientdesclength;
ras.sockfd = fd;
if (ShowBytes) {
int i;
printf("%d byte message:\n", n);
for (i = 0; i < n; ++i) {
printf(" %x (%c)\t", m[i], m[i]);
if (i%4 == 3) printf("\n");
}
printf("\n");
}
ParseOSCPacket(m, n, ra);
return catchupflag;
}
void PrintClientAddr(ClientAddr CA) {
unsigned long addr = CA->cl_addr.sin_addr.s_addr;
printf("Client address %p:\n", CA);
printf(" clilen %d, sockfd %d\n", CA->clilen, CA->sockfd);
printf(" sin_family %d, sin_port %d\n", CA->cl_addr.sin_family,
CA->cl_addr.sin_port);
printf(" address: (%x) %s\n", addr, inet_ntoa(CA->cl_addr.sin_addr));
printf(" sin_zero = \"%c%c%c%c%c%c%c%c\"\n",
CA->cl_addr.sin_zero[0],
CA->cl_addr.sin_zero[1],
CA->cl_addr.sin_zero[2],
CA->cl_addr.sin_zero[3],
CA->cl_addr.sin_zero[4],
CA->cl_addr.sin_zero[5],
CA->cl_addr.sin_zero[6],
CA->cl_addr.sin_zero[7]);
printf("\n");
}
void ParseOSCPacket(char *buf, int n, ClientAddr returnAddr) {
int size, messageLen, i;
char *messageName;
char *args;
#ifdef PRINTADDRS
PrintClientAddr(returnAddr);
#endif
if ((n%4) != 0) {
complain("SynthControl packet size (%d) not a multiple of 4 bytes: dropping",
n);
return;
}
if ((n >= 8) && (strncmp(buf, "#bundle", 8) == 0)) {
/* This is a bundle message. */
if (n < 16) {
complain("Bundle message too small (%d bytes) for time tag", n);
return;
}
/* Print the time tag */
printf("[ %lx%08lx\n", ntohl(*((unsigned long *)(buf+8))),
ntohl(*((unsigned long *)(buf+12))));
/* Note: if we wanted to actually use the time tag as a little-endian
64-bit int, we'd have to word-swap the two 32-bit halves of it */
i = 16; /* Skip "#group\0" and time tag */
while(i<n) {
size = ntohl(*((int *) (buf + i)));
if ((size % 4) != 0) {
complain("Bad size count %d in bundle (not a multiple of 4)", size);
return;
}
if ((size + i + 4) > n) {
complain("Bad size count %d in bundle (only %d bytes left in entire bundle)",
size, n-i-4);
return;
}
/* Recursively handle element of bundle */
ParseOSCPacket(buf+i+4, size, returnAddr);
i += 4 + size;
}
if (i != n) {
complain("This can't happen");
}
printf("]\n");
} else {
/* This is not a bundle message */
messageName = buf;
args = DataAfterAlignedString(messageName, buf+n);
if (args == 0) {
complain("Bad message name string: %s\nDropping entire message.\n",
htm_error_string);
return;
}
messageLen = args-messageName;
Smessage(messageName, (void *)args, n-messageLen, returnAddr);
}
}
#define SMALLEST_POSITIVE_FLOAT 0.000001f
static void Smessage(char *address, void *v, int n, ClientAddr returnAddr) {
char *chars = v;
printf("%s ", address);
if (n != 0) {
if (chars[0] == ',') {
if (chars[1] != ',') {
/* This message begins with a type-tag string */
PrintTypeTaggedArgs(v, n);
} else {
/* Double comma means an escaped real comma, not a type string */
PrintHeuristicallyTypeGuessedArgs(v, n, 1);
}
} else {
PrintHeuristicallyTypeGuessedArgs(v, n, 0);
}
}
printf("\n");
fflush(stdout); /* Added for Sami 5/21/98 */
}
static void PrintTypeTaggedArgs(void *v, int n) {
char *typeTags, *thisType;
char *p;
typeTags = v;
if (!IsNiceString(typeTags, typeTags+n)) {
/* No null-termination, so maybe it wasn't a type tag
string after all */
PrintHeuristicallyTypeGuessedArgs(v, n, 0);
return;
}
p = DataAfterAlignedString(typeTags, typeTags+n);
for (thisType = typeTags + 1; *thisType != 0; ++thisType) {
switch (*thisType) {
case 'i': case 'r': case 'm': case 'c':
printf("%d ", ntohl(*((int *) p)));
p += 4;
break;
case 'f': {
int i = ntohl(*((int *) p));
float *floatp = ((float *) (&i));
printf("%f ", *floatp);
p += 4;
}
break;
case 'h': case 't':
printf("[A 64-bit int] ");
p += 8;
break;
case 'd':
printf("[A 64-bit float] ");
p += 8;
break;
case 's': case 'S':
if (!IsNiceString(p, typeTags+n)) {
printf("Type tag said this arg is a string but it's not!\n");
return;
} else {
printf("\"%s\" ", p);
p = DataAfterAlignedString(p, typeTags+n);
}
break;
case 'T': printf("[True] "); break;
case 'F': printf("[False] "); break;
case 'N': printf("[Nil]"); break;
case 'I': printf("[Infinitum]"); break;
default:
printf("[Unrecognized type tag %c]", *thisType);
return;
}
}
}
static void PrintHeuristicallyTypeGuessedArgs(void *v, int n, int skipComma) {
int i, thisi;
float thisf;
int *ints;
char *chars;
char *string, *nextString;
/* Go through the arguments 32 bits at a time */
ints = v;
chars = v;
for (i = 0; i<n/4; ) {
string = &chars[i*4];
thisi = ntohl(ints[i]);
/* Reinterpret the (potentially byte-reversed) thisi as a float */
thisf = *(((float *) (&thisi)));
if (thisi >= -1000 && thisi <= 1000000) {
printf("%d ", thisi);
i++;
} else if (thisf >= -1000.f && thisf <= 1000000.f &&
(thisf <=0.0f || thisf >= SMALLEST_POSITIVE_FLOAT)) {
printf("%f ", thisf);
i++;
} else if (IsNiceString(string, chars+n)) {
nextString = DataAfterAlignedString(string, chars+n);
printf("\"%s\" ", (i == 0 && skipComma) ? string +1 : string);
i += (nextString-string) / 4;
} else {
printf("0x%x ", ints[i]);
i++;
}
}
}
#define STRING_ALIGN_PAD 4
char *DataAfterAlignedString(char *string, char *boundary)
{
/* The argument is a block of data beginning with a string. The
string has (presumably) been padded with extra null characters
so that the overall length is a multiple of STRING_ALIGN_PAD
bytes. Return a pointer to the next byte after the null
byte(s). The boundary argument points to the character after
the last valid character in the buffer---if the string hasn't
ended by there, something's wrong.
If the data looks wrong, return 0, and set htm_error_string */
int i;
if ((boundary - string) %4 != 0) {
fprintf(stderr, "Internal error: DataAfterAlignedString: bad boundary\n");
return 0;
}
for (i = 0; string[i] != '\0'; i++) {
if (string + i >= boundary) {
htm_error_string = "DataAfterAlignedString: Unreasonably long string";
return 0;
}
}
/* Now string[i] is the first null character */
i++;
for (; (i % STRING_ALIGN_PAD) != 0; i++) {
if (string + i >= boundary) {
htm_error_string = "DataAfterAlignedString: Unreasonably long string";
return 0;
}
if (string[i] != '\0') {
htm_error_string = "DataAfterAlignedString: Incorrectly padded string.";
return 0;
}
}
return string+i;
}
Boolean IsNiceString(char *string, char *boundary)
{
/* Arguments same as DataAfterAlignedString(). Is the given "string"
really a string? I.e., is it a sequence of isprint() characters
terminated with 1-4 null characters to align on a 4-byte boundary? */
int i;
if ((boundary - string) %4 != 0) {
fprintf(stderr, "Internal error: IsNiceString: bad boundary\n");
return 0;
}
for (i = 0; string[i] != '\0'; i++) {
if (!isprint(string[i])) return FALSE;
if (string + i >= boundary) return FALSE;
}
/* If we made it this far, it's a null-terminated sequence of printing characters
in the given boundary. Now we just make sure it's null padded... */
/* Now string[i] is the first null character */
i++;
for (; (i % STRING_ALIGN_PAD) != 0; i++) {
if (string[i] != '\0') return FALSE;
}
return TRUE;
}
#define MAXMESG 32768
static char mbuf[MAXMESG];
int main(int argc, char **argv) {
int udp_port; /* port to receive parameter updates from */
struct sockaddr_in cl_addr;
int clilen,maxclilen=sizeof(cl_addr);
struct sockaddr_un ucl_addr;
int uclilen,umaxclilen=sizeof(ucl_addr);
int i,n;
clilen = maxclilen;
uclilen = umaxclilen;
udp_port = -1;
for (i=1; i < argc; ++i) {
if (strcmp(argv[i], "-showbytes") == 0) {
ShowBytes = TRUE;
} else if (strcmp(argv[i], "-silent") == 0 ||
strcmp(argv[i], "-quiet") == 0) {
Silent = TRUE;
} else if (udp_port != -1) {
goto usageError;
} else {
udp_port = atoi(argv[i]);
if (udp_port == 0) {
goto usageError;
}
}
}
if (udp_port == -1) {
usageError:
fprintf(stderr, "Usage\n\tdumpOSC portno [-showbytes] [-quiet]\n\t(responds to udp and UNIX packets on that port no)\n");
exit(1);
}
n = recvfrom(0, mbuf, MAXMESG, 0, &cl_addr, &clilen);
if(n>0)
{
sockfd = 0;
udp_port = -1;
Synthmessage(mbuf, n, &cl_addr, clilen,sockfd) ;
}
else
{ sockfd=initudp(udp_port);
usockfd=unixinitudp(udp_port);
}
if (!Silent) {
printf("dumpOSC version 0.2 (6/18/97 Matt Wright). Unix/UDP Port %d \n", udp_port);
printf("Copyright (c) 1992,1996,1997 Regents of the University of California.\n");
}
if(sockfd>=0 && usockfd>=0)
{
fd_set read_fds, write_fds;
int nfds;
#define max(a,b) (((a) > (b)) ? (a) : (b))
nfds = max(sockfd, usockfd)+ 1;
{
int j;
for(j=0;j<npolldevs;++j)
if(polldevs[j].fd>=nfds)
{
nfds = polldevs[j].fd+1;
/*
printf("polldev %d\n", polldevs[j].fd);
*/
}
}
/*
printf("nfds %d\n", nfds);
*/
caught_sigint = 0;
sigset(SIGINT, catch_sigint); /* set sig handler */
while(!caught_sigint)
{
int r;
back:
FD_ZERO(&read_fds); /* clear read_fds */
FD_ZERO(&write_fds); /* clear write_fds */
FD_SET(sockfd, &read_fds);
FD_SET(usockfd, &read_fds);
{
int j;
for(j=0;j<npolldevs;++j)
FD_SET(polldevs[j].fd, &read_fds);
}
r = select(nfds, &read_fds, &write_fds, (fd_set *)0,
(struct timeval *)0);
if (r < 0) /* select reported an error */
goto out;
{
int j;
for(j=0;j<npolldevs;++j)
if(FD_ISSET(polldevs[j].fd, &read_fds))
(*(polldevs[j].callbackfunction))(polldevs[j].fd,polldevs[j].dummy );
}
if(FD_ISSET(sockfd, &read_fds))
{
clilen = maxclilen;
while( (n = recvfrom(sockfd, mbuf, MAXMESG, 0, &cl_addr, &clilen)) >0)
{
int r;
/* printf("received UDP packet of length %d\n", n); */
r = Synthmessage(mbuf, n, &cl_addr, clilen, sockfd) ;
if( sgi_HaveToQuit()) goto out;
if(r>0) goto back;
clilen = maxclilen;
}
}
if(FD_ISSET(usockfd, &read_fds))
{
uclilen = umaxclilen;
while( (n = recvfrom(usockfd, mbuf, MAXMESG, 0, &ucl_addr, &uclilen)) >0)
{
int r;
/* printf("received UNIX packet of length %d\n", n); */
r=Synthmessage(mbuf, n, &ucl_addr, uclilen,usockfd) ;
if( sgi_HaveToQuit()) goto out;
if(r>0) goto back;
uclilen = umaxclilen;
}
}
} /* End of while(!caught_sigint) */
closeudp(sockfd);
out: ;
}
else
perror("initudp");
return 0;
}
#include <stdarg.h>
void complain(char *s, ...) {
va_list ap;
va_start(ap, s);
fprintf(stderr, "*** ERROR: ");
vfprintf(stderr, s, ap);
fprintf(stderr, "\n");
va_end(ap);
}
#endif /* __sgi or LINUX */

View File

@@ -0,0 +1,191 @@
/*
Copyright (c) 1998. The Regents of the University of California (Regents).
All Rights Reserved.
Permission to use, copy, modify, and distribute this software and its
documentation for educational, research, and not-for-profit purposes, 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. Contact The Office of
Technology Licensing, UC Berkeley, 2150 Shattuck Avenue, Suite 510, Berkeley,
CA 94720-1620, (510) 643-7201, for commercial licensing opportunities.
Written by Matt Wright, The Center for New Music and Audio Technologies,
University of California, Berkeley.
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.
dumpUDP.c: smallest UDP receiving application
by Matt Wright, 9/9/98
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <netinet/in.h>
#include <rpc/rpc.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <sys/times.h>
#include <sys/param.h>
#include <sys/time.h>
#include <sys/ioctl.h>
#include <ctype.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <pwd.h>
#include <signal.h>
#include <grp.h>
#include <sys/file.h>
#include <bstring.h>
#include <sys/prctl.h>
#include <sys/schedctl.h>
#include <sys/lock.h>
typedef struct ClientAddressStruct {
struct sockaddr_in cl_addr;
int clilen;
int sockfd;
} *ClientAddr;
void PrintClientAddr(ClientAddr CA) {
unsigned long addr = CA->cl_addr.sin_addr.s_addr;
printf("Client address %p:\n", CA);
printf(" clilen %d, sockfd %d\n", CA->clilen, CA->sockfd);
printf(" sin_family %d, sin_port %d\n", CA->cl_addr.sin_family,
CA->cl_addr.sin_port);
printf(" address: (%x) %s\n", addr, inet_ntoa(CA->cl_addr.sin_addr));
printf(" sin_zero = \"%c%c%c%c%c%c%c%c\"\n",
CA->cl_addr.sin_zero[0],
CA->cl_addr.sin_zero[1],
CA->cl_addr.sin_zero[2],
CA->cl_addr.sin_zero[3],
CA->cl_addr.sin_zero[4],
CA->cl_addr.sin_zero[5],
CA->cl_addr.sin_zero[6],
CA->cl_addr.sin_zero[7]);
printf("\n");
}
static int initudp(int port) {
struct sockaddr_in serv_addr;
int n, sockfd;
if((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
return sockfd;
bzero((char *)&serv_addr, sizeof(serv_addr));
serv_addr.sin_family = AF_INET;
serv_addr.sin_addr.s_addr = htonl(INADDR_ANY);
serv_addr.sin_port = htons(port);
if(bind(sockfd, (struct sockaddr *) &serv_addr, sizeof(serv_addr)) < 0)
{
perror("unable to bind\n");
return -1;
}
fcntl(sockfd, F_SETFL, FNDELAY);
return sockfd;
}
static void closeudp(int sockfd) {
close(sockfd);
}
static int time_to_quit;
static void catch_sigint() {
time_to_quit = 1;
}
void GotAPacket(char *buf, int n, ClientAddr returnAddr) {
printf("received UDP packet of length %d\n", n);
PrintClientAddr(returnAddr);
}
#define MAXMESG 32768
static char mbuf[MAXMESG];
void ReceivePacket(int sockfd) {
struct ClientAddressStruct returnAddress;
int maxclilen=sizeof(returnAddress.cl_addr);
int n;
returnAddress.clilen = maxclilen;
while( (n = recvfrom(sockfd, mbuf, MAXMESG, 0, &(returnAddress.cl_addr),
&(returnAddress.clilen))) >0) {
GotAPacket(mbuf, n, &returnAddress);
if (time_to_quit) return;
returnAddress.clilen = maxclilen;
}
}
void main(int argc, char **argv) {
int udp_port; /* port to receive parameter updates from */
int sockfd;
int i;
fd_set read_fds, write_fds;
int nfds;
udp_port = 7000;
sockfd=initudp(udp_port);
if(sockfd<0) {
perror("initudp");
return;
}
nfds = sockfd + 1;
time_to_quit = 0;
sigset(SIGINT, catch_sigint); /* set sig handler */
while(!time_to_quit)
{
int c,r;
back:
FD_ZERO(&read_fds); /* clear read_fds */
FD_ZERO(&write_fds); /* clear write_fds */
FD_SET(sockfd, &read_fds);
r = select(nfds, &read_fds, &write_fds, (fd_set *)0,
(struct timeval *)0);
if (r < 0) /* select reported an error */
goto out;
if(FD_ISSET(sockfd, &read_fds)) {
ReceivePacket(sockfd);
}
} /* End of while(!time_to_quit) */
out: ;
}

View File

@@ -0,0 +1,235 @@
/*
Copyright (c) 1992,1996,1998.
The Regents of the University of California (Regents).
All Rights Reserved.
Permission to use, copy, modify, and distribute this software and its
documentation for educational, research, and not-for-profit purposes, 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. Contact The Office of
Technology Licensing, UC Berkeley, 2150 Shattuck Avenue, Suite 510, Berkeley,
CA 94720-1620, (510) 643-7201, for commercial licensing opportunities.
Written by Adrian Freed, The Center for New Music and Audio Technologies,
University of California, Berkeley.
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.
*/
/* htmsocket.c
Adrian Freed
send parameters to htm servers by udp or UNIX protocol
Modified 6/6/96 by Matt Wright to understand symbolic host names
in addition to X.X.X.X addresses.
*/
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <netinet/in.h>
#include <rpc/rpc.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <sys/times.h>
#include <sys/param.h>
#include <sys/time.h>
#include <sys/ioctl.h>
#include <ctype.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <pwd.h>
#include <signal.h>
#include <grp.h>
#include <sys/fcntl.h>
#include <sys/file.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/prctl.h>
#include <stdlib.h>
#define UNIXDG_PATH "/tmp/htm"
#define UNIXDG_TMP "/tmp/htm.XXXXXX"
#include "htmsocket.h"
typedef struct
{
float srate;
struct sockaddr_in serv_addr; /* udp socket */
struct sockaddr_un userv_addr; /* UNIX socket */
int sockfd; /* socket file descriptor */
int index, len,uservlen;
void *addr;
int id;
} desc;
/* open a socket for HTM communication to given host on given portnumber */
/* if host is 0 then UNIX protocol is used (i.e. local communication */
void *OpenHTMSocket(char *host, int portnumber)
{
int sockfd;
int oval = 1;
struct sockaddr_in cl_addr;
struct sockaddr_un ucl_addr;
desc *o;
o = malloc(sizeof(*o));
if(!o)
return 0;
if(!host)
{
// char *mkstemp(char *);
int clilen;
o->len = sizeof(ucl_addr);
/*
* Fill in the structure "userv_addr" with the address of the
* server that we want to send to.
*/
bzero((char *) &o->userv_addr, sizeof(o->userv_addr));
o->userv_addr.sun_family = AF_UNIX;
strcpy(o->userv_addr.sun_path, UNIXDG_PATH);
sprintf(o->userv_addr.sun_path+strlen(o->userv_addr.sun_path), "%d", portnumber);
o->uservlen = sizeof(o->userv_addr.sun_family) + strlen(o->userv_addr.sun_path);
o->addr = &(o->userv_addr);
/*
* Open a socket (a UNIX domain datagram socket).
*/
if ( (sockfd = socket(AF_UNIX, SOCK_DGRAM, 0)) >= 0)
{
/*
* Bind a local address for us.
* In the UNIX domain we have to choose our own name (that
* should be unique). We'll use mktemp() to create a unique
* pathname, based on our process id.
*/
bzero((char *) &ucl_addr, sizeof(ucl_addr)); /* zero out */
ucl_addr.sun_family = AF_UNIX;
strcpy(ucl_addr.sun_path, UNIXDG_TMP);
mkstemp(ucl_addr.sun_path);
clilen = sizeof(ucl_addr.sun_family) + strlen(ucl_addr.sun_path);
if (bind(sockfd, (struct sockaddr *) &ucl_addr, clilen) < 0)
{
perror("client: can't bind local address");
close(sockfd);
sockfd = -1;
}
}
else
perror("unable to make socket\n");
}else
{
/*
* Fill in the structure "serv_addr" with the address of the
* server that we want to send to.
*/
o->len = sizeof(cl_addr);
bzero((char *)&o->serv_addr, sizeof(o->serv_addr));
o->serv_addr.sin_family = AF_INET;
/* MW 6/6/96: Call gethostbyname() instead of inet_addr(),
so that host can be either an Internet host name (e.g.,
"les") or an Internet address in standard dot notation
(e.g., "128.32.122.13") */
{
struct hostent *hostsEntry;
unsigned long address;
hostsEntry = gethostbyname(host);
if (hostsEntry == NULL) {
fprintf(stderr, "Couldn't decipher host name \"%s\"\n",
host);
herror(NULL);
return 0;
}
address = *((unsigned long *) hostsEntry->h_addr_list[0]);
o->serv_addr.sin_addr.s_addr = address;
}
/* was: o->serv_addr.sin_addr.s_addr = inet_addr(host); */
/* End MW changes */
o->serv_addr.sin_port = htons(portnumber);
o->addr = &(o->serv_addr);
/*
* Open a socket (a UDP domain datagram socket).
*/
if((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) >= 0)
{
bzero((char *)&cl_addr, sizeof(cl_addr));
cl_addr.sin_family = AF_INET;
cl_addr.sin_addr.s_addr = htonl(INADDR_ANY);
cl_addr.sin_port = htons(0);
if(setsockopt(sockfd, SOL_SOCKET, SO_BROADCAST, &oval, sizeof(int)) == -1) {
perror("setsockopt");
}
if(bind(sockfd, (struct sockaddr *) &cl_addr, sizeof(cl_addr)) < 0)
{
perror("could not bind\n");
close(sockfd);
sockfd = -1;
}
}
else
{
perror("unable to make socket\n");
}
}
if(sockfd<0)
{
free(o); o = 0;
}
else
o->sockfd = sockfd;
return o;
}
#include <errno.h>
static bool sendudp(const struct sockaddr *sp, int sockfd,int length, int count, void *b)
{
int rcount;
if((rcount=sendto(sockfd, b, count, 0, sp, length)) != count)
{
/* printf("sockfd %d count %d rcount %dlength %d errno %d\n", sockfd,count,rcount,length,
errno); */
return FALSE;
}
return TRUE;
}
bool SendHTMSocket(void *htmsendhandle, int length_in_bytes, void *buffer)
{
desc *o = (desc *)htmsendhandle;
return sendudp(o->addr, o->sockfd, o->len, length_in_bytes, buffer);
}
void CloseHTMSocket(void *htmsendhandle)
{
desc *o = (desc *)htmsendhandle;
close(o->sockfd);
free(o);
}

View File

@@ -0,0 +1,49 @@
/*
Copyright (c) 1992,1996. The Regents of the University of California (Regents).
All Rights Reserved.
Permission to use, copy, modify, and distribute this software and its
documentation for educational, research, and not-for-profit purposes, 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. Contact The Office of
Technology Licensing, UC Berkeley, 2150 Shattuck Avenue, Suite 510, Berkeley,
CA 94720-1620, (510) 643-7201, for commercial licensing opportunities.
Written by Adrian Freed, The Center for New Music and Audio Technologies,
University of California, Berkeley.
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.
*/
/* htmparam.h
Adrian Freed
send parameters to htm servers by udp or UNIX protocol
*/
#ifndef TRUE
#define TRUE 1
#define FALSE 0
#endif
typedef int bool;
/* open a socket for HTM communication to given host on given portnumber */
/* if host is 0 then UNIX protocol is used (i.e. local communication) */
void *OpenHTMSocket(char *host, int portnumber);
/* send a buffer of data over htm socket, returns TRUE on success.
Note that udp sends rarely fail. UNIX sends fail if a kernal buffer overflows */
bool SendHTMSocket(void *htmsendhandle, int length_in_bytes, void *buffer);
/* close the socket(2) and release memory associated with it */
void CloseHTMSocket(void *htmsendhandle);

View File

@@ -0,0 +1,604 @@
/*
Copyright (c) 1996,1997. The Regents of the University of California (Regents).
All Rights Reserved.
Permission to use, copy, modify, and distribute this software and its
documentation for educational, research, and not-for-profit purposes, 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. Contact The Office of
Technology Licensing, UC Berkeley, 2150 Shattuck Avenue, Suite 510, Berkeley,
CA 94720-1620, (510) 643-7201, for commercial licensing opportunities.
Written by Matt Wright, The Center for New Music and Audio Technologies,
University of California, Berkeley.
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.
*/
/* sendOSC.c
Matt Wright, 6/3/97
based on sendSC.c, which was based on a version by Adrian Freed
Text-based OpenSoundControl client. User can enter messages via command
line arguments or standard input.
Version 0.1: "play" feature
Version 0.2: Message type tags.
*/
#define VERSION "http://cnmat.berkeley.edu/OpenSoundControl/sendOSC-0.1.html"
/*
compiling:
cc -o sendOSC sendOSC.c htmsocket.c OpenSoundControl.c OSC_timeTag.c
*/
#include "OSC-client.h"
#include "htmsocket.h"
#include <stdio.h>
#include <stdlib.h>
/* #include <bstring.h> */
#include <string.h>
#ifdef unix
#include <ctype.h>
#include <netinet/in.h>
#endif
typedef struct {
enum {INT, FLOAT, STRING} type;
union {
int i;
float f;
char *s;
} datum;
} typedArg;
void CommandLineMode(int argc, char *argv[], void *htmsocket);
void InteractiveMode(void *htmsocket);
OSCTimeTag ParseTimeTag(char *s);
void ParseInteractiveLine(OSCbuf *buf, char *mesg);
typedArg ParseToken(char *token);
int WriteMessage(OSCbuf *buf, char *messageName, int numArgs, typedArg *args);
void SendBuffer(void *htmsocket, OSCbuf *buf);
void SendData(void *htmsocket, int size, char *data);
void fatal_error(char *s);
void complain(char *s, ...);
/* Exit status codes:
0: successful
2: Message(s) dropped because of buffer overflow
3: Socket error
4: Usage error
5: Internal error
*/
static int exitStatus = 0;
static int useTypeTags = 1;
int main(int argc, char *argv[]) {
int portnumber;
char *hostname = 0;
void *htmsocket;
argc--;
argv++;
if (argc == 0) {
goto usageerror;
}
if (argc >= 1 && (strncmp(*argv, "-notypetags", 2) == 0)) {
useTypeTags = 0;
argv++;
argc--;
}
if (argc >= 2 && (strncmp(*argv, "-r", 2) == 0)) {
hostname = getenv("REMOTE_ADDR");
if (hostname == NULL) {
complain("sendSC -r: REMOTE_ADDR not in environment\n");
exit(4);
}
argv++;
argc--;
}
if (argc >= 3 && (strncmp(*argv, "-h", 2) == 0)) {
hostname = argv[1];
argv += 2;
argc -= 2;
}
portnumber = atoi(*argv);
argv++;
argc--;
htmsocket = OpenHTMSocket(hostname, portnumber);
if (!htmsocket) {
perror("Couldn't open socket: ");
exit(3);
}
if (argc > 0) {
printf("host %s, port %d, %s\n", hostname, portnumber,
useTypeTags ? "use type tags" : "don't use type tags");
CommandLineMode(argc, argv, htmsocket);
} else {
printf("sendOSC version " VERSION "\n");
printf("by Matt Wright. Copyright (c) 1996, 1997 Regents of the University of California.\n");
printf("host %s, port %d, %s\n", hostname, portnumber,
useTypeTags ? "use type tags" : "don't use type tags");
InteractiveMode(htmsocket);
}
CloseHTMSocket(htmsocket);
exit(exitStatus);
usageerror:
complain("usage: %s [-notypetags] [-r] [-h target_host_name] port_number [message...]\n",
argv[-1]);
exit(4);
}
#define MAX_ARGS 2000
#define SC_BUFFER_SIZE 32000
static char bufferForOSCbuf[SC_BUFFER_SIZE];
void CommandLineMode(int argc, char *argv[], void *htmsocket) {
char *messageName;
char *token;
typedArg args[MAX_ARGS];
int i,j, numArgs;
OSCbuf buf[1];
OSC_initBuffer(buf, SC_BUFFER_SIZE, bufferForOSCbuf);
if (argc > 1) {
if (OSC_openBundle(buf, OSCTT_Immediately())) {
complain("Problem opening bundle: %s\n", OSC_errorMessage);
return;
}
}
for (i = 0; i < argc; i++) {
messageName = strtok(argv[i], ",");
if (messageName == NULL) {
break;
}
j = 0;
while ((token = strtok(NULL, ",")) != NULL) {
args[j] = ParseToken(token);
j++;
if (j >= MAX_ARGS) {
complain("Sorry; your message has more than MAX_ARGS (%d) arguments; ignoring the rest.\n",
MAX_ARGS);
break;
}
}
numArgs = j;
WriteMessage(buf, messageName, numArgs, args);
}
if (argc > 1) {
if (OSC_closeBundle(buf)) {
complain("Problem closing bundle: %s\n", OSC_errorMessage);
return;
}
}
SendBuffer(htmsocket, buf);
}
#define MAXMESG 2048
void InteractiveMode(void *htmsocket) {
char mesg[MAXMESG];
OSCbuf buf[1];
int bundleDepth = 0; /* At first, we haven't seen "[". */
OSC_initBuffer(buf, SC_BUFFER_SIZE, bufferForOSCbuf);
while (fgets(mesg, MAXMESG, stdin) != NULL) {
if (mesg[0] == '\n') {
if (bundleDepth > 0) {
/* Ignore blank lines inside a group. */
} else {
/* blank line => repeat previous send */
SendBuffer(htmsocket, buf);
}
continue;
}
if (bundleDepth == 0) {
OSC_resetBuffer(buf);
}
if (mesg[0] == '[') {
OSCTimeTag tt = ParseTimeTag(mesg+1);
if (OSC_openBundle(buf, tt)) {
complain("Problem opening bundle: %s\n", OSC_errorMessage);
OSC_resetBuffer(buf);
bundleDepth = 0;
continue;
}
bundleDepth++;
} else if (mesg[0] == ']' && mesg[1] == '\n' && mesg[2] == '\0') {
if (bundleDepth == 0) {
complain("Unexpected ']': not currently in a bundle.\n");
} else {
if (OSC_closeBundle(buf)) {
complain("Problem closing bundle: %s\n", OSC_errorMessage);
OSC_resetBuffer(buf);
bundleDepth = 0;
continue;
}
bundleDepth--;
if (bundleDepth == 0) {
SendBuffer(htmsocket, buf);
}
}
} else {
ParseInteractiveLine(buf, mesg);
if (bundleDepth != 0) {
/* Don't send anything until we close all bundles */
} else {
SendBuffer(htmsocket, buf);
}
}
}
}
OSCTimeTag ParseTimeTag(char *s) {
char *p, *newline;
typedArg arg;
p = s;
while (isspace(*p)) p++;
if (*p == '\0') return OSCTT_Immediately();
if (*p == '+') {
/* Time tag is for some time in the future. It should be a
number of seconds as an int or float */
newline = strchr(s, '\n');
if (newline != NULL) *newline = '\0';
p++; /* Skip '+' */
while (isspace(*p)) p++;
arg = ParseToken(p);
if (arg.type == STRING) {
complain("warning: inscrutable time tag request: %s\n", s);
return OSCTT_Immediately();
} else if (arg.type == INT) {
return OSCTT_PlusSeconds(OSCTT_CurrentTime(),
(float) arg.datum.i);
} else if (arg.type == FLOAT) {
return OSCTT_PlusSeconds(OSCTT_CurrentTime(), arg.datum.f);
} else {
fatal_error("This can't happen!");
}
}
if (isdigit(*p) || (*p >= 'a' && *p <='f') || (*p >= 'A' && *p <='F')) {
/* They specified the 8-byte tag in hex */
OSCTimeTag tt;
if (sscanf(p, "%llx", &tt) != 1) {
complain("warning: couldn't parse time tag %s\n", s);
return OSCTT_Immediately();
}
#ifndef HAS8BYTEINT
if (ntohl(1) != 1) {
/* tt is a struct of seconds and fractional part,
and this machine is little-endian, so sscanf
wrote each half of the time tag in the wrong half
of the struct. */
uint32 temp;
temp = tt.seconds;
tt.seconds = tt.fraction ;
tt.fraction = temp;
}
#endif
return tt;
}
complain("warning: invalid time tag: %s\n", s);
return OSCTT_Immediately();
}
void ParseInteractiveLine(OSCbuf *buf, char *mesg) {
char *messageName, *token, *p;
typedArg args[MAX_ARGS];
int thisArg;
p = mesg;
while (isspace(*p)) p++;
if (*p == '\0') return;
messageName = p;
if (strcmp(messageName, "play\n") == 0) {
/* Special kludge feature to save typing */
typedArg arg;
if (OSC_openBundle(buf, OSCTT_Immediately())) {
complain("Problem opening bundle: %s\n", OSC_errorMessage);
return;
}
arg.type = INT;
arg.datum.i = 0;
WriteMessage(buf, "/voices/0/tp/timbre_index", 1, &arg);
arg.type = FLOAT;
arg.datum.i = 0.0f;
WriteMessage(buf, "/voices/0/tm/goto", 1, &arg);
if (OSC_closeBundle(buf)) {
complain("Problem closing bundle: %s\n", OSC_errorMessage);
}
return;
}
while (!isspace(*p) && *p != '\0') p++;
if (isspace(*p)) {
*p = '\0';
p++;
}
thisArg = 0;
while (*p != '\0') {
/* flush leading whitespace */
while (isspace(*p)) p++;
if (*p == '\0') break;
if (*p == '"') {
/* A string argument: scan for close quotes */
p++;
args[thisArg].type = STRING;
args[thisArg].datum.s = p;
while (*p != '"') {
if (*p == '\0') {
complain("Unterminated quote mark: ignoring line\n");
return;
}
p++;
}
*p = '\0';
p++;
} else {
token = p;
while (!isspace(*p) && (*p != '\0')) p++;
if (isspace(*p)) {
*p = '\0';
p++;
}
args[thisArg] = ParseToken(token);
}
thisArg++;
if (thisArg >= MAX_ARGS) {
complain("Sorry, your message has more than MAX_ARGS (%d) arguments; ignoring the rest.\n",
MAX_ARGS);
break;
}
}
if (WriteMessage(buf, messageName, thisArg, args) != 0) {
complain("Problem sending message: %s\n", OSC_errorMessage);
}
}
typedArg ParseToken(char *token) {
char *p = token;
typedArg returnVal;
/* It might be an int, a float, or a string */
if (*p == '-') p++;
if (isdigit(*p) || *p == '.') {
while (isdigit(*p)) p++;
if (*p == '\0') {
returnVal.type = INT;
returnVal.datum.i = atoi(token);
return returnVal;
}
if (*p == '.') {
p++;
while (isdigit(*p)) p++;
if (*p == '\0') {
returnVal.type = FLOAT;
returnVal.datum.f = atof(token);
return returnVal;
}
}
}
returnVal.type = STRING;
returnVal.datum.s = token;
return returnVal;
}
int WriteMessage(OSCbuf *buf, char *messageName, int numArgs, typedArg *args) {
int j, returnVal;
returnVal = 0;
#ifdef DEBUG
printf("WriteMessage: %s ", messageName);
for (j = 0; j < numArgs; j++) {
switch (args[j].type) {
case INT:
printf("%d ", args[j].datum.i);
break;
case FLOAT:
printf("%f ", args[j].datum.f);
break;
case STRING:
printf("%s ", args[j].datum.s);
break;
default:
fatal_error("Unrecognized arg type");
exit(5);
}
}
printf("\n");
#endif
if (!useTypeTags) {
returnVal = OSC_writeAddress(buf, messageName);
if (returnVal) {
complain("Problem writing address: %s\n", OSC_errorMessage);
}
} else {
/* First figure out the type tags */
char typeTags[MAX_ARGS+2];
int i;
typeTags[0] = ',';
for (i = 0; i < numArgs; ++i) {
switch (args[i].type) {
case INT:
typeTags[i+1] = 'i';
break;
case FLOAT:
typeTags[i+1] = 'f';
break;
case STRING:
typeTags[i+1] = 's';
break;
default:
fatal_error("Unrecognized arg type");
exit(5);
}
}
typeTags[i+1] = '\0';
returnVal = OSC_writeAddressAndTypes(buf, messageName, typeTags);
if (returnVal) {
complain("Problem writing address: %s\n", OSC_errorMessage);
}
}
for (j = 0; j < numArgs; j++) {
switch (args[j].type) {
case INT:
if ((returnVal = OSC_writeIntArg(buf, args[j].datum.i)) != 0) {
return returnVal;
}
break;
case FLOAT:
if ((returnVal = OSC_writeFloatArg(buf, args[j].datum.f)) != 0) {
return returnVal;
}
break;
case STRING:
if ((returnVal = OSC_writeStringArg(buf, args[j].datum.s)) != 0) {
return returnVal;
}
break;
default:
fatal_error("Unrecognized arg type");
exit(5);
}
}
return returnVal;
}
void SendBuffer(void *htmsocket, OSCbuf *buf) {
#ifdef DEBUG
printf("Sending buffer...\n");
#endif
if (OSC_isBufferEmpty(buf)) return;
if (!OSC_isBufferDone(buf)) {
fatal_error("SendBuffer() called but buffer not ready!");
exit(5);
}
SendData(htmsocket, OSC_packetSize(buf), OSC_getPacket(buf));
}
void SendData(void *htmsocket, int size, char *data) {
if (!SendHTMSocket(htmsocket, size, data)) {
perror("Couldn't send out socket: ");
CloseHTMSocket(htmsocket);
exit(3);
}
}
void fatal_error(char *s) {
fprintf(stderr, "%s\n", s);
exit(4);
}
#include <stdarg.h>
void complain(char *s, ...) {
va_list ap;
va_start(ap, s);
vfprintf(stderr, s, ap);
va_end(ap);
}
#ifdef COMPUTE_MESSAGE_SIZE
/* Unused code to find the size of a message */
/* Compute size */
size = SynthControl_effectiveStringLength(messageName);
for (j = 0; j < numArgs; j++) {
switch (args[j].type) {
case INT: case FLOAT:
size += 4;
break;
case STRING:
size += SynthControl_effectiveStringLength(args[j].datum.s);
break;
default:
fatal_error("Unrecognized token type");
exit(4);
}
}
if (!SynthControl_willMessageFit(buf, size)) {
complain("Message \"%s\" won't fit in buffer: dropping.", messageName);
return;
}
#endif

View File

@@ -0,0 +1,26 @@
In this directory:
OSC/
Open Sound Control 'sendOSC' utility
Use 'veejay -u |less' to find out what to send.
examples/
perl scripts that generate the files in vims/ are found here
livecinema/
action-file.xml ;example action file for veejay , run with -l or --action-file
vims/
the files in this directory can be send to veejay, it demonstrates series of effect chains.
sendVIMS -f montevideo-auto.txt
Example to produce a vims file and to send it to veejay:
$ perl examples/swirl.nl > vims/swirl.vims
$ sendVIMS -f vims/swirl.vims

View File

@@ -0,0 +1,30 @@
# show multi mirrors,
# type 0,1 = vertical, 1,2 = horizontal
# count is meaningfull below ~30
for(my $k =0; $k < 3; $k++)
{
for(my $j = 0; $j < 25; $j ++)
{
# 1 frame delay before sending message
print "+1\n";
# preset effect 102 (multi mirrors)
# somewhere on the current playing clip/stream
# with sequenced parameters 0..3 0..25
print "182:0 -1 102 $k $j;\n";
}
}
for(my $i = 0 ; $i < 100; $i ++)
{
$max = int(rand(75));
$delay = int(rand(25 + max));
print "+$delay\n";
$type = int(rand( 3 ));
$count =int(rand( 10 ));
print "182:0 -1 102 $type $count;\n"
}

View File

@@ -0,0 +1,27 @@
# show multi mirrors,
# type 0,1 = vertical, 1,2 = horizontal
# count is meaningfull below ~30
print "177:;\n";
for ($k=60; $k < 255; $k+=4)
{
print "182:0 4 146 $k 60 60;\n";
print "+1\n";
}
for ($k=60; $k < 255; $k+=4)
{
print "182:0 4 146 60 $k 60;\n";
print "+1\n";
}
for ($k=60; $k < 255; $k+=4)
{
print "182:0 4 146 60 60 $k;\n";
print "+1\n";
}

View File

@@ -0,0 +1,112 @@
# show multi mirrors,
# type 0,1 = vertical, 1,2 = horizontal
# count is meaningfull below ~30
my $p1_end = 90;
my $p1_start = 0;
my $p2_start = 0;
my $p2_end = 20;
my $p3_start = 0;
my $p3_end = 200;
my $p4_start = 0;
my $p4_end = 40;
my $j=0;
my $k=0;
my $l=0;
print "177:;\n";
for (my $i = 2; $i < 25; $i+=2)
{
print "182:0 3 154 $i;\n";
print "+10;\n";
}
for (my $i = 2; $i < 25; $i+=2)
{
print "182:0 3 154 -$i;\n";
print "+10;\n";
}
print "+200;\n";
print "182:0 3 154 -100;\n";
print "+200;\n";
print "182:0 3 154 40;\n";
print "+200;\n";
for(my $r=0; $r < 5; $r++)
{
for(my $i=$p1_start; $i < $p1_end; $i+=2)
{
$l++;
$k++;
# 1 frame delay before sending message
print "+1\n";
# preset effect 102 (multi mirrors)
# somewhere on the current playing clip/stream
# with sequenced parameters 0..3 0..25
print "182:0 1 151 $i $j $k $l;\n";
}
for(my $i=$p1_end; $i != $p1_start; $i-=2)
{
$l--;
$k--;
# 1 frame delay before sending message
print "+1\n";
# preset effect 102 (multi mirrors)
# somewhere on the current playing clip/stream
# with sequenced parameters 0..3 0..25
print "182:0 1 151 $i $j $k $l;\n";
}
}
# smear:
print "182:0 5 152 0 31;\n";
print "+100;\n";
for(my $r=0; $r < 5; $r++)
{
for(my $i=$p1_start; $i < $p1_end; $i+=2)
{
$l++;
$k++;
# 1 frame delay before sending message
print "+1\n";
# preset effect 102 (multi mirrors)
# somewhere on the current playing clip/stream
# with sequenced parameters 0..3 0..25
print "182:0 1 151 $i $j $k $l;\n";
}
for(my $i=$p1_end; $i != $p1_start; $i-=2)
{
$l--;
$k--;
# 1 frame delay before sending message
print "+1\n";
# preset effect 102 (multi mirrors)
# somewhere on the current playing clip/stream
# with sequenced parameters 0..3 0..25
print "182:0 1 151 $i $j $k $l;\n";
}
}

View File

@@ -0,0 +1,34 @@
# show multi mirrors,
# type 0,1 = vertical, 1,2 = horizontal
# count is meaningfull below ~30
for(my $k =0; $k < 2; $k++)
{
for(my $j = 0; $j < 20; $j ++)
{
# 1 frame delay before sending message
print "+1\n";
# preset effect 102 (multi mirrors)
# somewhere on the current playing clip/stream
# with sequenced parameters 0..3 0..25
print "182:0 -1 102 $k $j;\n";
}
}
for(my $k =1; $k != 0; $k--)
{
for(my $j = 20; $j != 0; $j --)
{
# 1 frame delay before sending message
print "+1\n";
# preset effect 102 (multi mirrors)
# somewhere on the current playing clip/stream
# with sequenced parameters 0..3 0..25
print "182:0 -1 102 $k $j;\n";
}
}
print "177:;\n";

View File

@@ -0,0 +1,17 @@
my $i;
for(my $j = 0; $j < 40; $j++)
{
for($i = 0; $i < 100; $i ++ )
{
print("182:0 9 233 $i $i;\n");
print("+25\n");
}
for($i = 100; $i > 1 ; $i -- )
{
print("182:0 9 233 $i $i;\n");
print("+25\n");
}
}

View File

@@ -0,0 +1,22 @@
print "249:/usr/local/lib/libvj_drawtext_plugin.so;\n";
print "+10\n";
for ( my $m = 0; $m < 200 ; $m ++ )
{
my @text = `/usr/games/fortune|tr -d [:cntrl:]`;
my $lines = join "\n", @text;
my $size = 12 + int(rand(15));
my $y = 10 + int(rand(400));
$lines =~ s/\n/\" \"/g;
$lines =~ s/":"//;
$lines =~ s/"="//;
$lines =~ s/";"//;
print "245:DrawText::text=$lines:size=$size:x=2:y=$y:rand=41;\n";
print "+200\n";
}

View File

@@ -0,0 +1,22 @@
# show multi mirrors,
# type 0,1 = vertical, 1,2 = horizontal
# count is meaningfull below ~30
my $len = 100;
print "177:;\n";
#clip a = blue, clip b = green
print "182:0 1 242 44 255;\n";
print "+$len\n";
print "182:0 1 223 2990 255 0 0;\n";
print "+$len\n";

View File

@@ -0,0 +1,46 @@
# show multi mirrors,
# type 0,1 = vertical, 1,2 = horizontal
# count is meaningfull below ~30
my $p1_end = 80;
my $p1_start = 0;
my $p2_start = 0;
my $p2_end = 40;
my $p3_start = 0;
my $p3_end = 200;
my $p4_start = 0;
my $p4_end = 40;
my $j=0;
my $k=0;
my $l=0;
for(my $bla = 0; $bla < 50; $bla ++ )
{
for(my $i=$p1_start; $i < $p1_end; $i++)
{
#$$l++;
# $j++;
# $k++;
# 1 frame delay before sending message
print "+1\n";
# preset effect 102 (multi mirrors)
# somewhere on the current playing clip/stream
# with sequenced parameters 0..3 0..25
print "182:0 -1 151 $i $j $i $l;\n";
}
for(my $i=$p1_end; $i != $p1_start; $i--)
{
# $l--;
# $j--;
# $k--;
# 1 frame delay before sending message
print "+1\n";
# preset effect 102 (multi mirrors)
# somewhere on the current playing clip/stream
# with sequenced parameters 0..3 0..25
print "182:0 -1 151 $i $j $i $l;\n";
}
}

View File

@@ -0,0 +1,36 @@
# show multi mirrors,
# type 0,1 = vertical, 1,2 = horizontal
# count is meaningfull below ~30
my $len = 50;
print "177:;\n";
print "182:0 1 207 9 60;\n";
print "+$len\n";
print "182:0 2 106 255;\n";
print "+$len\n";
print "182:0 3 205 255 0 100 352 0;\n";
print "+$len\n";
print "182:0 4 134 0 1568;\n";
print "+$len\n";
print "193:0 3;\n";
print "193:0 4;\n";
for(my $i=1; $i < 50; $i++)
{
print "+2\n";
print "182:0 3 141 $len 1 0;\n";
}
print "+1\n";

View File

@@ -0,0 +1,43 @@
# show multi mirrors,
# type 0,1 = vertical, 1,2 = horizontal
# count is meaningfull below ~30
my $len = 50;
print "177:;\n";
for(my $mode =0; $mode < 31; $mode++)
{
print "182:0 1 201 $mode;\n";
print "+$len\n";
}
for(my $mode=0; $mode < 23; $mode++)
{
for(my $val = 0; $val < 255; $val+=8)
{
print "182:0 1 207 $mode $val;\n";
}
for(my $val = 255; $val > 1; $val-=8)
{
print "182:0 1 207 $mode $val;\n";
}
}
for(my $mode=0; $mode < 31; $mode++)
{
for(my $val = 0; $val < 100; $val+=4)
{
print "182:0 1 202 $mode $val;\n";
}
for(my $val = 100; $val > 1; $val-=4)
{
print "182:0 1 202 $mode $val;\n";
}
}

View File

@@ -0,0 +1,25 @@
# show multi mirrors,
# type 0,1 = vertical, 1,2 = horizontal
# count is meaningfull below ~30
for(my $j = 0; $j < 25; $j ++)
{
# 1 frame delay before sending message
print "+1\n";
# preset effect 102 (multi mirrors)
# somewhere on the current playing clip/stream
# with sequenced parameters 0..3 0..25
print "182:0 -1 150 $j;\n";
}
for(my $j = 25; $j != 0 ; $j --)
{
# 1 frame delay before sending message
print "+1\n";
# preset effect 102 (multi mirrors)
# somewhere on the current playing clip/stream
# with sequenced parameters 0..3 0..25
print "182:0 -1 150 $j;\n";
}

View File

@@ -0,0 +1,12 @@
printf("182:0 0 209 10 1;\n");
for (my $j = 1; $j < 100; $j ++ )
{
for ( my $r = 1; $r < 10; $r ++ )
{
printf("190:0 0 $r;\n");
printf("+100\n");
}
}

View File

@@ -0,0 +1,25 @@
my $w = 0;
my $h = 0;
for(my $j = 0; $j != 360 ; $j ++)
{
# 1 frame delay before sending message
print "+1\n";
# preset effect 102 (multi mirrors)
# 0 on the current playing clip/stream
# with sequenced parameters 0..3 0..25
print "182:0 2 155 $j;\n";
print "+1\n";
print "182:0 4 142 $w $h 1;\n";
print "+1\n";
for(my $k = 2; $k < 8; $k++) {
print "182:0 6 141 $k 1;\n";
print "+1\n";
}
for(my $k = 8; $k > 2 ; $k--) {
print "182:0 6 141 $k 1;\n";
print "+1\n";
}
}

View File

@@ -0,0 +1,157 @@
#!/usr/bin/perl
use strict;
use warnings;
my $sample=0;
my $recorded_samples=0;
my $current_sample = 0;
sub init_capture()
{
# print "054:video0;\n";
print "145:video3;\n";
print "140:7;\n";
}
sub record_sample()
{
my $auto_play = shift or die ("no autoswitch given");
my $record_duration = shift or die ("no duration give");
# record 75 frames
print "152:$record_duration $auto_play;\n";
# wacht 75 frames
print "+$record_duration\n";
# stop recording
$recorded_samples ++;
}
sub offline_record_sample()
{
my $record_duration = shift or die ("no duration give");
# record 75 frames
print "150:7 $record_duration 0;\n";
}
sub set_sample()
{
print "100:$current_sample;\n";
print "+1\n";
}
sub play_sample_and_loop_effect()
{
my $length = shift or die ("no lentgh given");
my $speed = shift;
my $bug = $length;
my $channel = $current_sample - 1;
print "104:$current_sample $speed;\n";
print "182:$current_sample 0 4 110;\n";
print "192:$current_sample 0 0 $channel;\n";
print "175:$current_sample;\n";
print "+$length\n";
}
sub play_sample_and_loop_trippler_effect()
{
my $length = shift or die ("no lentgh given");
my $speed = shift;
my $channel = $current_sample - 1;
my $other_channel = $channel - 1;
print "104:$current_sample $speed;\n";
print "182:$current_sample 0 4 90;\n";
print "192:$current_sample 0 0 $channel;\n";
print "182:$current_sample 1 4 120;\n";
print "192:$current_sample 1 0 $other_channel;\n";
print "182:$current_sample 1 56 190 80 0;\n";
print "175:$current_sample;\n";
print "+$length\n";
}
sub play_sample_and_loop()
{
my $length = shift or die ("no lentgh given");
my $speed = shift;
print "104:$current_sample $speed;\n";
print "+$length\n";
}
my $speed = 3;
my $dur = 4 * 25;
my $no_loops = 1;
#start capture
&init_capture();
print "# CAPTURE STARTED\n";
# record sample for 100 frames
&record_sample(1, $dur);
# one sample ready = 1 now
$current_sample++;
print "# first sample is $current_sample\n";
&set_sample( $current_sample );
# first sample plays now
&offline_record_sample( $dur );
# offline recorder started for dur frames
# loop sample 1 for dur frames
&play_sample_and_loop( $dur , $speed );
# after dur frames there is one sample extra ready
$recorded_samples++;
print "# Recorded $recorded_samples playing $current_sample\n";
# for 10 times do
for (my $i = 0; $i < 40 ; $i ++ )
{
# play sample
# start recording immediatly
&set_sample( $current_sample );
&offline_record_sample ( $dur );
if($current_sample < 4)
{
print "# normal PLAY\n";
&play_sample_and_loop($dur,$speed );
}
else
{
if($current_sample < 3)
{
print "# WITH ONE OVERLAY\n";
&play_sample_and_loop_effect( $dur , $speed );
}
else
{
print "# WITH TWO OVERLAY ONE LIVE FEED\n";
&play_sample_and_loop_trippler_effect($dur,$speed);
#&play_sample_and_loop_zoom_effect($dur,$speed);
}
}
#print "+15\n";
$recorded_samples++;
$speed ++;
if($speed == 12)
{
$speed = 2;
}
$current_sample++;
}
#end for loop

View File

@@ -0,0 +1 @@

View File

@@ -0,0 +1,24 @@
# show multi mirrors,
# type 0,1 = vertical, 1,2 = horizontal
# count is meaningfull below ~30
my $len = 100;
print "177:0;\n";
print "176:0;\n";
print "182:0 1 142 0 62 1;\n";
print "178:0 100;\n";
print "175:0;\n";
print "179:0 100;\n";
print "+200\n";
print "177:0;\n";
print "175:0;\n";
for(my $i=0; $i < 255; $i++)
{
print "182:0 1 204 $i;\n";
print "+1\n";
}

View File

@@ -0,0 +1,308 @@
<?xml version="1.0"?>
<ACTIONFILE>
<BUNDLE>
<bundle_id>5001</bundle_id>
<bundle_msg>BUN:007{175:;096:4 7;182:0 3 129 68 152;182:0 4 134 1 175;182:0 5 126 3 255 24 1;193:0 6;193:0 5;}</bundle_msg>
<key>110</key>
<key_mod>3</key_mod>
</BUNDLE>
<BUNDLE>
<bundle_id>5002</bundle_id>
<bundle_msg>BUN:007{175:;096:4 7;182:0 3 129 68 152;182:0 4 134 1 175;182:0 5 126 3 255 24 1;182:0 6 124 165 5 0;193:0 5;}</bundle_msg>
<key>122</key>
<key_mod>3</key_mod>
</BUNDLE>
<BUNDLE>
<bundle_id>5003</bundle_id>
<bundle_msg>BUN:007{175:;096:4 7;182:0 3 129 68 152;182:0 4 134 1 175;182:0 5 126 3 255 24 1;182:0 6 205 255 0 0 1 0;193:0 5;}</bundle_msg>
<key>109</key>
<key_mod>3</key_mod>
</BUNDLE>
<BUNDLE>
<bundle_id>5004</bundle_id>
<bundle_msg>BUN:007{175:;096:4 7;182:0 3 101 5;182:0 4 101 4;182:0 5 102 1 1 0;182:0 5 212 1 18 1;182:0 6 106 45;}</bundle_msg>
<key>120</key>
<key_mod>3</key_mod>
</BUNDLE>
<BUNDLE>
<bundle_id>5005</bundle_id>
<bundle_msg>BUN:004{175:;193:0 3;182:0 4 106 255;182:0 5 129 68 152;182:0 6 136 15;}</bundle_msg>
<key>112</key>
<key_mod>3</key_mod>
</BUNDLE>
<BUNDLE>
<bundle_id>5006</bundle_id>
<bundle_msg>BUN:004{175:;193:0 3;182:0 4 106 255;182:0 5 134 2 958 ;182:0 6 126 23 92 20 0;}</bundle_msg>
<key>103</key>
<key_mod>3</key_mod>
</BUNDLE>
<BUNDLE>
<bundle_id>5007</bundle_id>
<bundle_msg>BUN:004{175:;193:0 3;182:0 4 106 255;182:0 5 129 16 62 205;182:0 6 124 170 20 0;}</bundle_msg>
<key>104</key>
<key_mod>3</key_mod>
</BUNDLE>
<BUNDLE>
<bundle_id>5008</bundle_id>
<bundle_msg>BUN:005{176:;193:0 3;182:0 4 146 196 150 150;182:0 5 142 50 20;193:0 6;178:0 200;175:;}</bundle_msg>
<key>106</key>
<key_mod>3</key_mod>
</BUNDLE>
<BUNDLE>
<bundle_id>5009</bundle_id>
<bundle_msg>BUN:006{176:;193:0 3;182:0 4 106 255;182:0 5 134 2 958 ;182:0 6 207 23 40 190;178:0 200;175:;}</bundle_msg>
<key>102</key>
<key_mod>3</key_mod>
</BUNDLE>
<BUNDLE>
<bundle_id>5010</bundle_id>
<bundle_msg>BUN:003{176:;193:0 3;182:0 4 113 2;193:0 5;193:0 6;F1178:0 200;175:;}</bundle_msg>
<key>108</key>
<key_mod>3</key_mod>
</BUNDLE>
<BUNDLE>
<bundle_id>5011</bundle_id>
<bundle_msg>BUN:003{176:;193:0 3;182:0 4 141 34 0 4;182:0 5 227 5;175:;193:0 6;178:0 200;}</bundle_msg>
<key>121</key>
<key_mod>3</key_mod>
</BUNDLE>
<BUNDLE>
<bundle_id>5012</bundle_id>
<bundle_msg>BUN:001{179:0 200;</bundle_msg>
<key>105</key>
<key_mod>3</key_mod>
</BUNDLE>
<BUNDLE>
<bundle_id>5013</bundle_id>
<bundle_msg>BUN:006{176:;193:0 3;182:0 4 134 1 1000;182:0 5 207 17 150;182:0 6 227 5;178:0 100;175:;}</bundle_msg>
<key>60</key>
<key_mod>3</key_mod>
</BUNDLE>
<BUNDLE>
<bundle_id>5014</bundle_id>
<bundle_msg>BUN:001{179:0 100;}</bundle_msg>
<key>50</key>
<key_mod>3</key_mod>
</BUNDLE>
<BUNDLE>
<bundle_id>5015</bundle_id>
<bundle_msg>BUN:001{179:0 50;}</bundle_msg>
<key>51</key>
<key_mod>3</key_mod>
</BUNDLE>
<BUNDLE>
<bundle_id>5016</bundle_id>
<bundle_msg>BUN:002{175:;178:0 100;}</bundle_msg>
<key>57</key>
<key_mod>3</key_mod>
</BUNDLE>
<BUNDLE>
<bundle_id>5017</bundle_id>
<bundle_msg>BUN:002{175:;178:0 50;}</bundle_msg>
<key>59</key>
<key_mod>3</key_mod>
</BUNDLE>
<BUNDLE>
<bundle_id>5018</bundle_id>
<bundle_msg>BUN:002{175:;178:0 200;}</bundle_msg>
<key>55</key>
<key_mod>3</key_mod>
</BUNDLE>
<BUNDLE>
<bundle_id>5019</bundle_id>
<bundle_msg>BUN:005{175:;182:0 3 106 54 1;182:0 4 205 255 0 80 2;182:0 5 201 2;182:0 6 134 2 1568;}</bundle_msg>
<key>99</key>
<key_mod>3</key_mod>
</BUNDLE>
<BUNDLE>
<bundle_id>5020</bundle_id>
<bundle_msg>BUN:006{175:;182:0 3 105 54 1;182:0 4 205 255 0 80 2;182:0 5 201 2;182:0 6 134 2 1568;}</bundle_msg>
<key>118</key>
<key_mod>3</key_mod>
</BUNDLE>
<BUNDLE>
<bundle_id>5021</bundle_id>
<bundle_msg>BUN:002{144:video0;050:7;}</bundle_msg>
<key>118</key>
<key_mod>3</key_mod>
</BUNDLE>
<BUNDLE>
<bundle_id>5022</bundle_id>
<bundle_msg>BUN:005{175:;182:0 3 207 9 0;182:0 4 106 255;182:0 5 205 255 0 30 352 0;182:0 6 134 2 1568;}</bundle_msg>
<key>98</key>
<key_mod>3</key_mod>
</BUNDLE>
<BUNDLE>
<bundle_id>5023</bundle_id>
<bundle_msg>BUN:005{175:;182:0 5 105 54 1;182:0 6 205 255 0 80 30 2;078:0 6 1 2;182:0 8 134 2 1568;}</bundle_msg>
<key>115</key>
<key_mod>3</key_mod>
</BUNDLE>
<BUNDLE>
<bundle_id>5024</bundle_id>
<bundle_msg>BUN:006{175:;182:0 5 125 3 3 1;182:0 6 123 5 237;182:0 7 134 0 1089;182:0 8 227 9;182:0 9 114 3 1;}</bundle_msg>
<key>100</key>
<key_mod>3</key_mod>
</BUNDLE>
<BUNDLE>
<bundle_id>5025</bundle_id>
<bundle_msg>BUN:006{175:;182:0 5 105 54 1;182:0 6 205 255 0 80 30 2;078:0 6 1 2;182:0 8 134 2 1568;182:0 9 126 1 150 15 1;}</bundle_msg>
<key>99</key>
<key_mod>3</key_mod>
</BUNDLE>
<BUNDLE>
<bundle_id>5026</bundle_id>
<bundle_msg>BUN:001{177:0;}</bundle_msg>
<key>113</key>
<key_mod>3</key_mod>
</BUNDLE>
<BUNDLE>
<bundle_id>5027</bundle_id>
<bundle_msg>BUN:002{175:0;182:0 3 126 1 150 24 1;}</bundle_msg>
<key>114</key>
<key_mod>3</key_mod>
</BUNDLE>
<BUNDLE>
<bundle_id>5028</bundle_id>
<bundle_msg>BUN:009{084:0;175:;182:0 3 112 5;182:0 4 227 5;182:0 5 112 4;182:0 6 207 22 245;182:0 7 112 4;182:0 8 126 0 150 19 1;182:0 9 148 1 1961 0 0;}</bundle_msg>
<key>119</key>
<key_mod>3</key_mod>
</BUNDLE>
<BUNDLE>
<bundle_id>5029</bundle_id>
<bundle_msg>BUN:006{084:0;175:;182:0 3 230 10 1 1;182:0 4 134 1 197;182:0 5 231 4 1 3 1 1;182:0 6 148 0 1000 25 100;}</bundle_msg>
<key>101</key>
<key_mod>3</key_mod>
</BUNDLE>
<BUNDLE>
<bundle_id>5030</bundle_id>
<bundle_msg>BUN:004{084:0;175:;182:0 3 124 230 93 0;182:0 4 201 7;}</bundle_msg>
<key>117</key>
<key_mod>3</key_mod>
</BUNDLE>
<BUNDLE>
<bundle_id>5031</bundle_id>
<bundle_msg>BUN:005{084:0;175:;182:0 3 124 230 93 0;182:0 4 201 7;182:0 5 201 7;}</bundle_msg>
<key>111</key>
<key_mod>3</key_mod>
</BUNDLE>
<BUNDLE>
<bundle_id>5032</bundle_id>
<bundle_msg>BUN:005{084:0;175:;182:0 3 124 230 93 0;182:0 4 201 7;182:0 5 201 8;}</bundle_msg>
<key>52</key>
<key_mod>3</key_mod>
</BUNDLE>
<BUNDLE>
<bundle_id>5033</bundle_id>
<bundle_msg>BUN:005{084:0;175:;182:0 3 124 230 93 0;182:0 4 201 7;182:0 5 201 25;}</bundle_msg>
<key>53</key>
<key_mod>3</key_mod>
</BUNDLE>
<BUNDLE>
<bundle_id>5034</bundle_id>
<bundle_msg>BUN:006{084:0;175:;182:0 3 124 230 93 0;182:0 4 201 7;182:0 5 201 25;182:0 6 201 8;}</bundle_msg>
<key>54</key>
<key_mod>3</key_mod>
</BUNDLE>
<BUNDLE>
<bundle_id>5035</bundle_id>
<bundle_msg>BUN:005{084:0;175:;182:0 2 145 0 2;182:0 3 124 230 93 0;182:0 4 201 7;}</bundle_msg>
<key>55</key>
<key_mod>3</key_mod>
</BUNDLE>
<BUNDLE>
<bundle_id>5036</bundle_id>
<bundle_msg>BUN:005{084:0;175:;182:0 2 142 0 0 1;182:0 3 124 230 93 0;182:0 4 201 7;}</bundle_msg>
<key>56</key>
<key_mod>3</key_mod>
</BUNDLE>
<BUNDLE>
<bundle_id>5037</bundle_id>
<bundle_msg>BUN:006{084:0;175:;182:0 3 124 209 93 0;182:0 4 201 7;182:0 5 142 0 0 1;182:0 6 201 25;}</bundle_msg>
<key>123</key>
<key_mod>3</key_mod>
</BUNDLE>
<BUNDLE>
<bundle_id>5038</bundle_id>
<bundle_msg>BUN:006{084:0;175:;182:0 3 124 209 93 0;182:0 4 201 7;182:0 5 142 0 0 1;182:0 6 201 25;}</bundle_msg>
<key>124</key>
<key_mod>3</key_mod>
</BUNDLE>
<BUNDLE>
<bundle_id>5039</bundle_id>
<bundle_msg>BUN:005{084:0;175:;182:0 3 149 90;182:0 4 201 8;182:0 5 148 2 1000 68 110;}</bundle_msg>
<key>44</key>
<key_mod>3</key_mod>
</BUNDLE>
<BUNDLE>
<bundle_id>5040</bundle_id>
<bundle_msg>BUN:005{084:0;175:;182:0 3 201 8;182:0 4 148 2 1000 68 110;182:0 5 143 0 16 235;}</bundle_msg>
<key>91</key>
<key_mod>3</key_mod>
</BUNDLE>
<BUNDLE>
<bundle_id>5041</bundle_id>
<bundle_msg>BUN:005{084:0;175:;182:0 3 201 8;182:0 4 148 2 1000 68 110;182:0 5 143 6 16 235;}</bundle_msg>
<key>93</key>
<key_mod>3</key_mod>
</BUNDLE>
<BUNDLE>
<bundle_id>5042</bundle_id>
<bundle_msg>BUN:005{084:0;175:;182:0 3 120 0 1;182:0 4 207 12 152;182:0 5 201 6;}</bundle_msg>
<key>39</key>
<key_mod>3</key_mod>
</BUNDLE>
</ACTIONFILE>

View File

@@ -0,0 +1,157 @@
#!/usr/bin/perl
use strict;
use warnings;
my $sample=0;
my $recorded_samples=0;
my $current_sample = 0;
sub init_capture()
{
# print "054:video0;\n";
print "145:video3;\n";
print "140:7;\n";
}
sub record_sample()
{
my $auto_play = shift or die ("no autoswitch given");
my $record_duration = shift or die ("no duration give");
# record 75 frames
print "152:$record_duration $auto_play;\n";
# wacht 75 frames
print "+$record_duration\n";
# stop recording
$recorded_samples ++;
}
sub offline_record_sample()
{
my $record_duration = shift or die ("no duration give");
# record 75 frames
print "150:7 $record_duration 0;\n";
}
sub set_sample()
{
print "100:$current_sample;\n";
print "+1\n";
}
sub play_sample_and_loop_effect()
{
my $length = shift or die ("no lentgh given");
my $speed = shift;
my $bug = $length;
my $channel = $current_sample - 1;
print "104:$current_sample $speed;\n";
print "182:$current_sample 0 4 110;\n";
print "192:$current_sample 0 0 $channel;\n";
print "175:$current_sample;\n";
print "+$length\n";
}
sub play_sample_and_loop_trippler_effect()
{
my $length = shift or die ("no lentgh given");
my $speed = shift;
my $channel = $current_sample - 1;
my $other_channel = $channel - 1;
print "104:$current_sample $speed;\n";
print "182:$current_sample 0 4 90;\n";
print "192:$current_sample 0 0 $channel;\n";
print "182:$current_sample 1 4 120;\n";
print "192:$current_sample 1 0 $other_channel;\n";
print "182:$current_sample 1 56 190 80 0;\n";
print "175:$current_sample;\n";
print "+$length\n";
}
sub play_sample_and_loop()
{
my $length = shift or die ("no lentgh given");
my $speed = shift;
print "104:$current_sample $speed;\n";
print "+$length\n";
}
my $speed = 3;
my $dur = 4 * 25;
my $no_loops = 1;
#start capture
&init_capture();
print "# CAPTURE STARTED\n";
# record sample for 100 frames
&record_sample(1, $dur);
# one sample ready = 1 now
$current_sample++;
print "# first sample is $current_sample\n";
&set_sample( $current_sample );
# first sample plays now
&offline_record_sample( $dur );
# offline recorder started for dur frames
# loop sample 1 for dur frames
&play_sample_and_loop( $dur , $speed );
# after dur frames there is one sample extra ready
$recorded_samples++;
print "# Recorded $recorded_samples playing $current_sample\n";
# for 10 times do
for (my $i = 0; $i < 40 ; $i ++ )
{
# play sample
# start recording immediatly
&set_sample( $current_sample );
&offline_record_sample ( $dur );
if($current_sample < 4)
{
print "# normal PLAY\n";
&play_sample_and_loop($dur,$speed );
}
else
{
if($current_sample < 3)
{
print "# WITH ONE OVERLAY\n";
&play_sample_and_loop_effect( $dur , $speed );
}
else
{
print "# WITH TWO OVERLAY ONE LIVE FEED\n";
&play_sample_and_loop_trippler_effect($dur,$speed);
#&play_sample_and_loop_zoom_effect($dur,$speed);
}
}
#print "+15\n";
$recorded_samples++;
$speed ++;
if($speed == 12)
{
$speed = 2;
}
$current_sample++;
}
#end for loop

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -0,0 +1,30 @@
249:/usr/local/lib/libvj_drawtext_plugin.so;
+10
245:DrawText::text=Veejay is copying CPU cycles to RAM:size=14:font=1:;
+100
245:DrawText::text=Future loop trademark:size=14:font=1:;
+100
245:DrawText::text=Would a piece of cloth do?:size=14:font=1:;
+100
245:DrawText::text=Mapping lost CPU cycles to memory:size=14:font=1:;
+100
245:DrawText::text=Believe, Desire and Intention parsing system for pre-emptive scheduling:size=14:font=1:;
+100
245:DrawText::text=Write once, debug many times:size=14:font=1:;
+100
245:DrawText::text=Veejay has been designed as a usage based application not user based:size=10:font=1:;
+100
245:DrawText::text=No user , no cry (c)piksel:size=20:font=1:;
+100
245:DrawText::text=How many segfaults do you want today:size=15:font=1:;
+100
245:DrawText::text=This kernel doesn't support CPU's with broken WP:size=10:font=1:;
+100
245:DrawText::text=Cannot alloc pae_pgd SLAB cache:size=20:font=1:;
+100
245:DrawText::text=Huh?:size=40:font=1:;
+100
245:DrawText::text=IO panic! Fix the panic by writing zero-length microcode:size=14:font=1:;
+100
248:DrawText;

View File

@@ -0,0 +1,519 @@
177:0;
176:0;
182:0 1 142 0 62 1;
178:0 100;
175:0;
179:0 100;
+200
177:0;
175:0;
182:0 1 204 0;
+1
182:0 1 204 1;
+1
182:0 1 204 2;
+1
182:0 1 204 3;
+1
182:0 1 204 4;
+1
182:0 1 204 5;
+1
182:0 1 204 6;
+1
182:0 1 204 7;
+1
182:0 1 204 8;
+1
182:0 1 204 9;
+1
182:0 1 204 10;
+1
182:0 1 204 11;
+1
182:0 1 204 12;
+1
182:0 1 204 13;
+1
182:0 1 204 14;
+1
182:0 1 204 15;
+1
182:0 1 204 16;
+1
182:0 1 204 17;
+1
182:0 1 204 18;
+1
182:0 1 204 19;
+1
182:0 1 204 20;
+1
182:0 1 204 21;
+1
182:0 1 204 22;
+1
182:0 1 204 23;
+1
182:0 1 204 24;
+1
182:0 1 204 25;
+1
182:0 1 204 26;
+1
182:0 1 204 27;
+1
182:0 1 204 28;
+1
182:0 1 204 29;
+1
182:0 1 204 30;
+1
182:0 1 204 31;
+1
182:0 1 204 32;
+1
182:0 1 204 33;
+1
182:0 1 204 34;
+1
182:0 1 204 35;
+1
182:0 1 204 36;
+1
182:0 1 204 37;
+1
182:0 1 204 38;
+1
182:0 1 204 39;
+1
182:0 1 204 40;
+1
182:0 1 204 41;
+1
182:0 1 204 42;
+1
182:0 1 204 43;
+1
182:0 1 204 44;
+1
182:0 1 204 45;
+1
182:0 1 204 46;
+1
182:0 1 204 47;
+1
182:0 1 204 48;
+1
182:0 1 204 49;
+1
182:0 1 204 50;
+1
182:0 1 204 51;
+1
182:0 1 204 52;
+1
182:0 1 204 53;
+1
182:0 1 204 54;
+1
182:0 1 204 55;
+1
182:0 1 204 56;
+1
182:0 1 204 57;
+1
182:0 1 204 58;
+1
182:0 1 204 59;
+1
182:0 1 204 60;
+1
182:0 1 204 61;
+1
182:0 1 204 62;
+1
182:0 1 204 63;
+1
182:0 1 204 64;
+1
182:0 1 204 65;
+1
182:0 1 204 66;
+1
182:0 1 204 67;
+1
182:0 1 204 68;
+1
182:0 1 204 69;
+1
182:0 1 204 70;
+1
182:0 1 204 71;
+1
182:0 1 204 72;
+1
182:0 1 204 73;
+1
182:0 1 204 74;
+1
182:0 1 204 75;
+1
182:0 1 204 76;
+1
182:0 1 204 77;
+1
182:0 1 204 78;
+1
182:0 1 204 79;
+1
182:0 1 204 80;
+1
182:0 1 204 81;
+1
182:0 1 204 82;
+1
182:0 1 204 83;
+1
182:0 1 204 84;
+1
182:0 1 204 85;
+1
182:0 1 204 86;
+1
182:0 1 204 87;
+1
182:0 1 204 88;
+1
182:0 1 204 89;
+1
182:0 1 204 90;
+1
182:0 1 204 91;
+1
182:0 1 204 92;
+1
182:0 1 204 93;
+1
182:0 1 204 94;
+1
182:0 1 204 95;
+1
182:0 1 204 96;
+1
182:0 1 204 97;
+1
182:0 1 204 98;
+1
182:0 1 204 99;
+1
182:0 1 204 100;
+1
182:0 1 204 101;
+1
182:0 1 204 102;
+1
182:0 1 204 103;
+1
182:0 1 204 104;
+1
182:0 1 204 105;
+1
182:0 1 204 106;
+1
182:0 1 204 107;
+1
182:0 1 204 108;
+1
182:0 1 204 109;
+1
182:0 1 204 110;
+1
182:0 1 204 111;
+1
182:0 1 204 112;
+1
182:0 1 204 113;
+1
182:0 1 204 114;
+1
182:0 1 204 115;
+1
182:0 1 204 116;
+1
182:0 1 204 117;
+1
182:0 1 204 118;
+1
182:0 1 204 119;
+1
182:0 1 204 120;
+1
182:0 1 204 121;
+1
182:0 1 204 122;
+1
182:0 1 204 123;
+1
182:0 1 204 124;
+1
182:0 1 204 125;
+1
182:0 1 204 126;
+1
182:0 1 204 127;
+1
182:0 1 204 128;
+1
182:0 1 204 129;
+1
182:0 1 204 130;
+1
182:0 1 204 131;
+1
182:0 1 204 132;
+1
182:0 1 204 133;
+1
182:0 1 204 134;
+1
182:0 1 204 135;
+1
182:0 1 204 136;
+1
182:0 1 204 137;
+1
182:0 1 204 138;
+1
182:0 1 204 139;
+1
182:0 1 204 140;
+1
182:0 1 204 141;
+1
182:0 1 204 142;
+1
182:0 1 204 143;
+1
182:0 1 204 144;
+1
182:0 1 204 145;
+1
182:0 1 204 146;
+1
182:0 1 204 147;
+1
182:0 1 204 148;
+1
182:0 1 204 149;
+1
182:0 1 204 150;
+1
182:0 1 204 151;
+1
182:0 1 204 152;
+1
182:0 1 204 153;
+1
182:0 1 204 154;
+1
182:0 1 204 155;
+1
182:0 1 204 156;
+1
182:0 1 204 157;
+1
182:0 1 204 158;
+1
182:0 1 204 159;
+1
182:0 1 204 160;
+1
182:0 1 204 161;
+1
182:0 1 204 162;
+1
182:0 1 204 163;
+1
182:0 1 204 164;
+1
182:0 1 204 165;
+1
182:0 1 204 166;
+1
182:0 1 204 167;
+1
182:0 1 204 168;
+1
182:0 1 204 169;
+1
182:0 1 204 170;
+1
182:0 1 204 171;
+1
182:0 1 204 172;
+1
182:0 1 204 173;
+1
182:0 1 204 174;
+1
182:0 1 204 175;
+1
182:0 1 204 176;
+1
182:0 1 204 177;
+1
182:0 1 204 178;
+1
182:0 1 204 179;
+1
182:0 1 204 180;
+1
182:0 1 204 181;
+1
182:0 1 204 182;
+1
182:0 1 204 183;
+1
182:0 1 204 184;
+1
182:0 1 204 185;
+1
182:0 1 204 186;
+1
182:0 1 204 187;
+1
182:0 1 204 188;
+1
182:0 1 204 189;
+1
182:0 1 204 190;
+1
182:0 1 204 191;
+1
182:0 1 204 192;
+1
182:0 1 204 193;
+1
182:0 1 204 194;
+1
182:0 1 204 195;
+1
182:0 1 204 196;
+1
182:0 1 204 197;
+1
182:0 1 204 198;
+1
182:0 1 204 199;
+1
182:0 1 204 200;
+1
182:0 1 204 201;
+1
182:0 1 204 202;
+1
182:0 1 204 203;
+1
182:0 1 204 204;
+1
182:0 1 204 205;
+1
182:0 1 204 206;
+1
182:0 1 204 207;
+1
182:0 1 204 208;
+1
182:0 1 204 209;
+1
182:0 1 204 210;
+1
182:0 1 204 211;
+1
182:0 1 204 212;
+1
182:0 1 204 213;
+1
182:0 1 204 214;
+1
182:0 1 204 215;
+1
182:0 1 204 216;
+1
182:0 1 204 217;
+1
182:0 1 204 218;
+1
182:0 1 204 219;
+1
182:0 1 204 220;
+1
182:0 1 204 221;
+1
182:0 1 204 222;
+1
182:0 1 204 223;
+1
182:0 1 204 224;
+1
182:0 1 204 225;
+1
182:0 1 204 226;
+1
182:0 1 204 227;
+1
182:0 1 204 228;
+1
182:0 1 204 229;
+1
182:0 1 204 230;
+1
182:0 1 204 231;
+1
182:0 1 204 232;
+1
182:0 1 204 233;
+1
182:0 1 204 234;
+1
182:0 1 204 235;
+1
182:0 1 204 236;
+1
182:0 1 204 237;
+1
182:0 1 204 238;
+1
182:0 1 204 239;
+1
182:0 1 204 240;
+1
182:0 1 204 241;
+1
182:0 1 204 242;
+1
182:0 1 204 243;
+1
182:0 1 204 244;
+1
182:0 1 204 245;
+1
182:0 1 204 246;
+1
182:0 1 204 247;
+1
182:0 1 204 248;
+1
182:0 1 204 249;
+1
182:0 1 204 250;
+1
182:0 1 204 251;
+1
182:0 1 204 252;
+1
182:0 1 204 253;
+1
182:0 1 204 254;
+1

View File

@@ -0,0 +1,320 @@
+1
182:0 -1 151 0 0 0 0;
+1
182:0 -1 151 1 0 1 0;
+1
182:0 -1 151 2 0 2 0;
+1
182:0 -1 151 3 0 3 0;
+1
182:0 -1 151 4 0 4 0;
+1
182:0 -1 151 5 0 5 0;
+1
182:0 -1 151 6 0 6 0;
+1
182:0 -1 151 7 0 7 0;
+1
182:0 -1 151 8 0 8 0;
+1
182:0 -1 151 9 0 9 0;
+1
182:0 -1 151 10 0 10 0;
+1
182:0 -1 151 11 0 11 0;
+1
182:0 -1 151 12 0 12 0;
+1
182:0 -1 151 13 0 13 0;
+1
182:0 -1 151 14 0 14 0;
+1
182:0 -1 151 15 0 15 0;
+1
182:0 -1 151 16 0 16 0;
+1
182:0 -1 151 17 0 17 0;
+1
182:0 -1 151 18 0 18 0;
+1
182:0 -1 151 19 0 19 0;
+1
182:0 -1 151 20 0 20 0;
+1
182:0 -1 151 21 0 21 0;
+1
182:0 -1 151 22 0 22 0;
+1
182:0 -1 151 23 0 23 0;
+1
182:0 -1 151 24 0 24 0;
+1
182:0 -1 151 25 0 25 0;
+1
182:0 -1 151 26 0 26 0;
+1
182:0 -1 151 27 0 27 0;
+1
182:0 -1 151 28 0 28 0;
+1
182:0 -1 151 29 0 29 0;
+1
182:0 -1 151 30 0 30 0;
+1
182:0 -1 151 31 0 31 0;
+1
182:0 -1 151 32 0 32 0;
+1
182:0 -1 151 33 0 33 0;
+1
182:0 -1 151 34 0 34 0;
+1
182:0 -1 151 35 0 35 0;
+1
182:0 -1 151 36 0 36 0;
+1
182:0 -1 151 37 0 37 0;
+1
182:0 -1 151 38 0 38 0;
+1
182:0 -1 151 39 0 39 0;
+1
182:0 -1 151 40 0 40 0;
+1
182:0 -1 151 41 0 41 0;
+1
182:0 -1 151 42 0 42 0;
+1
182:0 -1 151 43 0 43 0;
+1
182:0 -1 151 44 0 44 0;
+1
182:0 -1 151 45 0 45 0;
+1
182:0 -1 151 46 0 46 0;
+1
182:0 -1 151 47 0 47 0;
+1
182:0 -1 151 48 0 48 0;
+1
182:0 -1 151 49 0 49 0;
+1
182:0 -1 151 50 0 50 0;
+1
182:0 -1 151 51 0 51 0;
+1
182:0 -1 151 52 0 52 0;
+1
182:0 -1 151 53 0 53 0;
+1
182:0 -1 151 54 0 54 0;
+1
182:0 -1 151 55 0 55 0;
+1
182:0 -1 151 56 0 56 0;
+1
182:0 -1 151 57 0 57 0;
+1
182:0 -1 151 58 0 58 0;
+1
182:0 -1 151 59 0 59 0;
+1
182:0 -1 151 60 0 60 0;
+1
182:0 -1 151 61 0 61 0;
+1
182:0 -1 151 62 0 62 0;
+1
182:0 -1 151 63 0 63 0;
+1
182:0 -1 151 64 0 64 0;
+1
182:0 -1 151 65 0 65 0;
+1
182:0 -1 151 66 0 66 0;
+1
182:0 -1 151 67 0 67 0;
+1
182:0 -1 151 68 0 68 0;
+1
182:0 -1 151 69 0 69 0;
+1
182:0 -1 151 70 0 70 0;
+1
182:0 -1 151 71 0 71 0;
+1
182:0 -1 151 72 0 72 0;
+1
182:0 -1 151 73 0 73 0;
+1
182:0 -1 151 74 0 74 0;
+1
182:0 -1 151 75 0 75 0;
+1
182:0 -1 151 76 0 76 0;
+1
182:0 -1 151 77 0 77 0;
+1
182:0 -1 151 78 0 78 0;
+1
182:0 -1 151 79 0 79 0;
+1
182:0 -1 151 80 0 80 0;
+1
182:0 -1 151 79 0 79 0;
+1
182:0 -1 151 78 0 78 0;
+1
182:0 -1 151 77 0 77 0;
+1
182:0 -1 151 76 0 76 0;
+1
182:0 -1 151 75 0 75 0;
+1
182:0 -1 151 74 0 74 0;
+1
182:0 -1 151 73 0 73 0;
+1
182:0 -1 151 72 0 72 0;
+1
182:0 -1 151 71 0 71 0;
+1
182:0 -1 151 70 0 70 0;
+1
182:0 -1 151 69 0 69 0;
+1
182:0 -1 151 68 0 68 0;
+1
182:0 -1 151 67 0 67 0;
+1
182:0 -1 151 66 0 66 0;
+1
182:0 -1 151 65 0 65 0;
+1
182:0 -1 151 64 0 64 0;
+1
182:0 -1 151 63 0 63 0;
+1
182:0 -1 151 62 0 62 0;
+1
182:0 -1 151 61 0 61 0;
+1
182:0 -1 151 60 0 60 0;
+1
182:0 -1 151 59 0 59 0;
+1
182:0 -1 151 58 0 58 0;
+1
182:0 -1 151 57 0 57 0;
+1
182:0 -1 151 56 0 56 0;
+1
182:0 -1 151 55 0 55 0;
+1
182:0 -1 151 54 0 54 0;
+1
182:0 -1 151 53 0 53 0;
+1
182:0 -1 151 52 0 52 0;
+1
182:0 -1 151 51 0 51 0;
+1
182:0 -1 151 50 0 50 0;
+1
182:0 -1 151 49 0 49 0;
+1
182:0 -1 151 48 0 48 0;
+1
182:0 -1 151 47 0 47 0;
+1
182:0 -1 151 46 0 46 0;
+1
182:0 -1 151 45 0 45 0;
+1
182:0 -1 151 44 0 44 0;
+1
182:0 -1 151 43 0 43 0;
+1
182:0 -1 151 42 0 42 0;
+1
182:0 -1 151 41 0 41 0;
+1
182:0 -1 151 40 0 40 0;
+1
182:0 -1 151 39 0 39 0;
+1
182:0 -1 151 38 0 38 0;
+1
182:0 -1 151 37 0 37 0;
+1
182:0 -1 151 36 0 36 0;
+1
182:0 -1 151 35 0 35 0;
+1
182:0 -1 151 34 0 34 0;
+1
182:0 -1 151 33 0 33 0;
+1
182:0 -1 151 32 0 32 0;
+1
182:0 -1 151 31 0 31 0;
+1
182:0 -1 151 30 0 30 0;
+1
182:0 -1 151 29 0 29 0;
+1
182:0 -1 151 28 0 28 0;
+1
182:0 -1 151 27 0 27 0;
+1
182:0 -1 151 26 0 26 0;
+1
182:0 -1 151 25 0 25 0;
+1
182:0 -1 151 24 0 24 0;
+1
182:0 -1 151 23 0 23 0;
+1
182:0 -1 151 22 0 22 0;
+1
182:0 -1 151 21 0 21 0;
+1
182:0 -1 151 20 0 20 0;
+1
182:0 -1 151 19 0 19 0;
+1
182:0 -1 151 18 0 18 0;
+1
182:0 -1 151 17 0 17 0;
+1
182:0 -1 151 16 0 16 0;
+1
182:0 -1 151 15 0 15 0;
+1
182:0 -1 151 14 0 14 0;
+1
182:0 -1 151 13 0 13 0;
+1
182:0 -1 151 12 0 12 0;
+1
182:0 -1 151 11 0 11 0;
+1
182:0 -1 151 10 0 10 0;
+1
182:0 -1 151 9 0 9 0;
+1
182:0 -1 151 8 0 8 0;
+1
182:0 -1 151 7 0 7 0;
+1
182:0 -1 151 6 0 6 0;
+1
182:0 -1 151 5 0 5 0;
+1
182:0 -1 151 4 0 4 0;
+1
182:0 -1 151 3 0 3 0;
+1
182:0 -1 151 2 0 2 0;
+1
182:0 -1 151 1 0 1 0;

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,350 @@
+1
182:0 -1 102 0 0;
+1
182:0 -1 102 0 1;
+1
182:0 -1 102 0 2;
+1
182:0 -1 102 0 3;
+1
182:0 -1 102 0 4;
+1
182:0 -1 102 0 5;
+1
182:0 -1 102 0 6;
+1
182:0 -1 102 0 7;
+1
182:0 -1 102 0 8;
+1
182:0 -1 102 0 9;
+1
182:0 -1 102 0 10;
+1
182:0 -1 102 0 11;
+1
182:0 -1 102 0 12;
+1
182:0 -1 102 0 13;
+1
182:0 -1 102 0 14;
+1
182:0 -1 102 0 15;
+1
182:0 -1 102 0 16;
+1
182:0 -1 102 0 17;
+1
182:0 -1 102 0 18;
+1
182:0 -1 102 0 19;
+1
182:0 -1 102 0 20;
+1
182:0 -1 102 0 21;
+1
182:0 -1 102 0 22;
+1
182:0 -1 102 0 23;
+1
182:0 -1 102 0 24;
+1
182:0 -1 102 1 0;
+1
182:0 -1 102 1 1;
+1
182:0 -1 102 1 2;
+1
182:0 -1 102 1 3;
+1
182:0 -1 102 1 4;
+1
182:0 -1 102 1 5;
+1
182:0 -1 102 1 6;
+1
182:0 -1 102 1 7;
+1
182:0 -1 102 1 8;
+1
182:0 -1 102 1 9;
+1
182:0 -1 102 1 10;
+1
182:0 -1 102 1 11;
+1
182:0 -1 102 1 12;
+1
182:0 -1 102 1 13;
+1
182:0 -1 102 1 14;
+1
182:0 -1 102 1 15;
+1
182:0 -1 102 1 16;
+1
182:0 -1 102 1 17;
+1
182:0 -1 102 1 18;
+1
182:0 -1 102 1 19;
+1
182:0 -1 102 1 20;
+1
182:0 -1 102 1 21;
+1
182:0 -1 102 1 22;
+1
182:0 -1 102 1 23;
+1
182:0 -1 102 1 24;
+1
182:0 -1 102 2 0;
+1
182:0 -1 102 2 1;
+1
182:0 -1 102 2 2;
+1
182:0 -1 102 2 3;
+1
182:0 -1 102 2 4;
+1
182:0 -1 102 2 5;
+1
182:0 -1 102 2 6;
+1
182:0 -1 102 2 7;
+1
182:0 -1 102 2 8;
+1
182:0 -1 102 2 9;
+1
182:0 -1 102 2 10;
+1
182:0 -1 102 2 11;
+1
182:0 -1 102 2 12;
+1
182:0 -1 102 2 13;
+1
182:0 -1 102 2 14;
+1
182:0 -1 102 2 15;
+1
182:0 -1 102 2 16;
+1
182:0 -1 102 2 17;
+1
182:0 -1 102 2 18;
+1
182:0 -1 102 2 19;
+1
182:0 -1 102 2 20;
+1
182:0 -1 102 2 21;
+1
182:0 -1 102 2 22;
+1
182:0 -1 102 2 23;
+1
182:0 -1 102 2 24;
+13
182:0 -1 102 2 2;
+16
182:0 -1 102 2 6;
+24
182:0 -1 102 0 0;
+6
182:0 -1 102 2 8;
+5
182:0 -1 102 0 4;
+17
182:0 -1 102 0 7;
+3
182:0 -1 102 2 5;
+1
182:0 -1 102 1 5;
+18
182:0 -1 102 1 4;
+13
182:0 -1 102 2 3;
+4
182:0 -1 102 1 9;
+4
182:0 -1 102 0 1;
+9
182:0 -1 102 1 3;
+8
182:0 -1 102 1 0;
+23
182:0 -1 102 0 6;
+4
182:0 -1 102 0 6;
+22
182:0 -1 102 0 2;
+15
182:0 -1 102 0 6;
+15
182:0 -1 102 0 5;
+9
182:0 -1 102 2 6;
+21
182:0 -1 102 2 3;
+10
182:0 -1 102 2 6;
+21
182:0 -1 102 1 0;
+13
182:0 -1 102 0 9;
+18
182:0 -1 102 2 1;
+18
182:0 -1 102 1 7;
+12
182:0 -1 102 1 9;
+14
182:0 -1 102 1 4;
+11
182:0 -1 102 2 7;
+21
182:0 -1 102 1 0;
+20
182:0 -1 102 2 1;
+4
182:0 -1 102 0 6;
+24
182:0 -1 102 0 7;
+9
182:0 -1 102 2 1;
+0
182:0 -1 102 0 3;
+6
182:0 -1 102 0 9;
+2
182:0 -1 102 1 7;
+11
182:0 -1 102 2 1;
+1
182:0 -1 102 0 1;
+21
182:0 -1 102 0 1;
+15
182:0 -1 102 1 4;
+18
182:0 -1 102 0 5;
+6
182:0 -1 102 2 4;
+16
182:0 -1 102 2 0;
+3
182:0 -1 102 2 2;
+1
182:0 -1 102 2 7;
+9
182:0 -1 102 0 2;
+12
182:0 -1 102 1 2;
+24
182:0 -1 102 0 1;
+3
182:0 -1 102 2 2;
+17
182:0 -1 102 0 7;
+13
182:0 -1 102 1 1;
+2
182:0 -1 102 0 5;
+24
182:0 -1 102 1 5;
+14
182:0 -1 102 2 9;
+17
182:0 -1 102 0 7;
+3
182:0 -1 102 1 1;
+19
182:0 -1 102 1 6;
+21
182:0 -1 102 1 8;
+19
182:0 -1 102 2 7;
+0
182:0 -1 102 1 7;
+3
182:0 -1 102 1 5;
+8
182:0 -1 102 1 9;
+9
182:0 -1 102 2 0;
+1
182:0 -1 102 1 4;
+5
182:0 -1 102 2 3;
+19
182:0 -1 102 0 5;
+3
182:0 -1 102 0 7;
+17
182:0 -1 102 1 5;
+10
182:0 -1 102 1 1;
+24
182:0 -1 102 1 1;
+13
182:0 -1 102 1 1;
+9
182:0 -1 102 0 1;
+15
182:0 -1 102 1 0;
+13
182:0 -1 102 2 9;
+2
182:0 -1 102 1 0;
+24
182:0 -1 102 0 8;
+13
182:0 -1 102 2 3;
+5
182:0 -1 102 1 5;
+23
182:0 -1 102 1 5;
+24
182:0 -1 102 0 6;
+18
182:0 -1 102 0 7;
+7
182:0 -1 102 2 1;
+7
182:0 -1 102 1 5;
+15
182:0 -1 102 1 8;
+8
182:0 -1 102 0 8;
+0
182:0 -1 102 0 2;
+20
182:0 -1 102 0 1;
+21
182:0 -1 102 0 9;
+6
182:0 -1 102 1 0;
+1
182:0 -1 102 1 8;
+7
182:0 -1 102 0 5;
+10
182:0 -1 102 2 8;
+17
182:0 -1 102 0 1;
+7
182:0 -1 102 0 2;
+0
182:0 -1 102 1 8;
+20
182:0 -1 102 1 1;
+11
182:0 -1 102 1 3;
+8
182:0 -1 102 2 8;
+9
182:0 -1 102 1 6;

View File

@@ -0,0 +1,50 @@
+1
182:0 -1 150 0;
+1
182:0 -1 150 1;
+1
182:0 -1 150 2;
+1
182:0 -1 150 3;
+1
182:0 -1 150 4;
+1
182:0 -1 150 5;
+1
182:0 -1 150 6;
+1
182:0 -1 150 7;
+1
182:0 -1 150 8;
+1
182:0 -1 150 9;
+1
182:0 -1 150 10;
+1
182:0 -1 150 11;
+1
182:0 -1 150 12;
+1
182:0 -1 150 13;
+1
182:0 -1 150 14;
+1
182:0 -1 150 15;
+1
182:0 -1 150 16;
+1
182:0 -1 150 17;
+1
182:0 -1 150 18;
+1
182:0 -1 150 19;
+1
182:0 -1 150 20;
+1
182:0 -1 150 21;
+1
182:0 -1 150 22;
+1
182:0 -1 150 23;
+1
182:0 -1 150 24;

View File

@@ -0,0 +1,18 @@
249:/usr/local/lib/libvj_dummy_plugin.so;
+10
248:ExamplePlugin;
+10
249:/usr/local/lib/libvj_drawtext_plugin.so;
+100
245:DrawText:text="Veejay 0.6.3":x=10:y=10;
+50
245:DrawText:text="With font rendering":x=10:y=80;
+50
245:DrawText:text="Change fgcolor":fgcolor=#40ff20:x=10:y=80;
+50
245:DrawText:text="Change bgcolor":bgcolor=#ff10ff:x=10:y=80;
+50
245:DrawText:text="Bordering":border:x=10:y=80;
+50
248:DrawText;

View File

@@ -0,0 +1,51 @@
#
# $ perl rand-overlay.txt > vims-script.vims
#
# $ ./client localhost 3490 vims-script.vims
#
#
#
#
#
#
my $rand_clip = 0;
my $min_frames = 10; # minimum frames tussen switchen channels
my $max_frames = 40; # max frames
my $rand_frames = 0;
my $maxfr = 31;
for(my $i=0 ; $i < 99; $i++) # 99 opdrachten
{
# 190 = set mixing channel
# randclip is minimaal 1 + random getal tussen 0 en 32
$rand_clip = 1 + int( rand($maxfr));
printf("190:0 0 $rand_clip;\n");
$rand_frames = $min_frames + int( rand( $max_frames-$min_frames));
printf("+$rand_frames\n");
$rand_clip = 1 + int( rand($maxfr));
printf("190:0 1 $rand_clip;\n");
$rand_frames = $min_frames + int( rand( $max_frames-$min_frames));
printf("+$rand_frames\n");
$rand_clip = 1 + int( rand($maxfr));
printf("190:0 2 $rand_clip;\n");
$rand_frames = $min_frames + int( rand( $max_frames-$min_frames));
printf("+$rand_frames\n");
$rand_clip = 1 + int( rand($maxfr));
printf("190:0 3 $rand_clip;\n");
$rand_frames = $min_frames + int( rand( $max_frames-$min_frames));
printf("+$rand_frames\n");
$rand_clip = 1 + int( rand($maxfr));
printf("190:0 4 $rand_clip;\n");
$rand_frames = $min_frames + int( rand( $max_frames-$min_frames));
printf("+$rand_frames\n");
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,720 @@
+1
182:0 0 155 0;
+1
182:0 0 155 1;
+1
182:0 0 155 2;
+1
182:0 0 155 3;
+1
182:0 0 155 4;
+1
182:0 0 155 5;
+1
182:0 0 155 6;
+1
182:0 0 155 7;
+1
182:0 0 155 8;
+1
182:0 0 155 9;
+1
182:0 0 155 10;
+1
182:0 0 155 11;
+1
182:0 0 155 12;
+1
182:0 0 155 13;
+1
182:0 0 155 14;
+1
182:0 0 155 15;
+1
182:0 0 155 16;
+1
182:0 0 155 17;
+1
182:0 0 155 18;
+1
182:0 0 155 19;
+1
182:0 0 155 20;
+1
182:0 0 155 21;
+1
182:0 0 155 22;
+1
182:0 0 155 23;
+1
182:0 0 155 24;
+1
182:0 0 155 25;
+1
182:0 0 155 26;
+1
182:0 0 155 27;
+1
182:0 0 155 28;
+1
182:0 0 155 29;
+1
182:0 0 155 30;
+1
182:0 0 155 31;
+1
182:0 0 155 32;
+1
182:0 0 155 33;
+1
182:0 0 155 34;
+1
182:0 0 155 35;
+1
182:0 0 155 36;
+1
182:0 0 155 37;
+1
182:0 0 155 38;
+1
182:0 0 155 39;
+1
182:0 0 155 40;
+1
182:0 0 155 41;
+1
182:0 0 155 42;
+1
182:0 0 155 43;
+1
182:0 0 155 44;
+1
182:0 0 155 45;
+1
182:0 0 155 46;
+1
182:0 0 155 47;
+1
182:0 0 155 48;
+1
182:0 0 155 49;
+1
182:0 0 155 50;
+1
182:0 0 155 51;
+1
182:0 0 155 52;
+1
182:0 0 155 53;
+1
182:0 0 155 54;
+1
182:0 0 155 55;
+1
182:0 0 155 56;
+1
182:0 0 155 57;
+1
182:0 0 155 58;
+1
182:0 0 155 59;
+1
182:0 0 155 60;
+1
182:0 0 155 61;
+1
182:0 0 155 62;
+1
182:0 0 155 63;
+1
182:0 0 155 64;
+1
182:0 0 155 65;
+1
182:0 0 155 66;
+1
182:0 0 155 67;
+1
182:0 0 155 68;
+1
182:0 0 155 69;
+1
182:0 0 155 70;
+1
182:0 0 155 71;
+1
182:0 0 155 72;
+1
182:0 0 155 73;
+1
182:0 0 155 74;
+1
182:0 0 155 75;
+1
182:0 0 155 76;
+1
182:0 0 155 77;
+1
182:0 0 155 78;
+1
182:0 0 155 79;
+1
182:0 0 155 80;
+1
182:0 0 155 81;
+1
182:0 0 155 82;
+1
182:0 0 155 83;
+1
182:0 0 155 84;
+1
182:0 0 155 85;
+1
182:0 0 155 86;
+1
182:0 0 155 87;
+1
182:0 0 155 88;
+1
182:0 0 155 89;
+1
182:0 0 155 90;
+1
182:0 0 155 91;
+1
182:0 0 155 92;
+1
182:0 0 155 93;
+1
182:0 0 155 94;
+1
182:0 0 155 95;
+1
182:0 0 155 96;
+1
182:0 0 155 97;
+1
182:0 0 155 98;
+1
182:0 0 155 99;
+1
182:0 0 155 100;
+1
182:0 0 155 101;
+1
182:0 0 155 102;
+1
182:0 0 155 103;
+1
182:0 0 155 104;
+1
182:0 0 155 105;
+1
182:0 0 155 106;
+1
182:0 0 155 107;
+1
182:0 0 155 108;
+1
182:0 0 155 109;
+1
182:0 0 155 110;
+1
182:0 0 155 111;
+1
182:0 0 155 112;
+1
182:0 0 155 113;
+1
182:0 0 155 114;
+1
182:0 0 155 115;
+1
182:0 0 155 116;
+1
182:0 0 155 117;
+1
182:0 0 155 118;
+1
182:0 0 155 119;
+1
182:0 0 155 120;
+1
182:0 0 155 121;
+1
182:0 0 155 122;
+1
182:0 0 155 123;
+1
182:0 0 155 124;
+1
182:0 0 155 125;
+1
182:0 0 155 126;
+1
182:0 0 155 127;
+1
182:0 0 155 128;
+1
182:0 0 155 129;
+1
182:0 0 155 130;
+1
182:0 0 155 131;
+1
182:0 0 155 132;
+1
182:0 0 155 133;
+1
182:0 0 155 134;
+1
182:0 0 155 135;
+1
182:0 0 155 136;
+1
182:0 0 155 137;
+1
182:0 0 155 138;
+1
182:0 0 155 139;
+1
182:0 0 155 140;
+1
182:0 0 155 141;
+1
182:0 0 155 142;
+1
182:0 0 155 143;
+1
182:0 0 155 144;
+1
182:0 0 155 145;
+1
182:0 0 155 146;
+1
182:0 0 155 147;
+1
182:0 0 155 148;
+1
182:0 0 155 149;
+1
182:0 0 155 150;
+1
182:0 0 155 151;
+1
182:0 0 155 152;
+1
182:0 0 155 153;
+1
182:0 0 155 154;
+1
182:0 0 155 155;
+1
182:0 0 155 156;
+1
182:0 0 155 157;
+1
182:0 0 155 158;
+1
182:0 0 155 159;
+1
182:0 0 155 160;
+1
182:0 0 155 161;
+1
182:0 0 155 162;
+1
182:0 0 155 163;
+1
182:0 0 155 164;
+1
182:0 0 155 165;
+1
182:0 0 155 166;
+1
182:0 0 155 167;
+1
182:0 0 155 168;
+1
182:0 0 155 169;
+1
182:0 0 155 170;
+1
182:0 0 155 171;
+1
182:0 0 155 172;
+1
182:0 0 155 173;
+1
182:0 0 155 174;
+1
182:0 0 155 175;
+1
182:0 0 155 176;
+1
182:0 0 155 177;
+1
182:0 0 155 178;
+1
182:0 0 155 179;
+1
182:0 0 155 180;
+1
182:0 0 155 181;
+1
182:0 0 155 182;
+1
182:0 0 155 183;
+1
182:0 0 155 184;
+1
182:0 0 155 185;
+1
182:0 0 155 186;
+1
182:0 0 155 187;
+1
182:0 0 155 188;
+1
182:0 0 155 189;
+1
182:0 0 155 190;
+1
182:0 0 155 191;
+1
182:0 0 155 192;
+1
182:0 0 155 193;
+1
182:0 0 155 194;
+1
182:0 0 155 195;
+1
182:0 0 155 196;
+1
182:0 0 155 197;
+1
182:0 0 155 198;
+1
182:0 0 155 199;
+1
182:0 0 155 200;
+1
182:0 0 155 201;
+1
182:0 0 155 202;
+1
182:0 0 155 203;
+1
182:0 0 155 204;
+1
182:0 0 155 205;
+1
182:0 0 155 206;
+1
182:0 0 155 207;
+1
182:0 0 155 208;
+1
182:0 0 155 209;
+1
182:0 0 155 210;
+1
182:0 0 155 211;
+1
182:0 0 155 212;
+1
182:0 0 155 213;
+1
182:0 0 155 214;
+1
182:0 0 155 215;
+1
182:0 0 155 216;
+1
182:0 0 155 217;
+1
182:0 0 155 218;
+1
182:0 0 155 219;
+1
182:0 0 155 220;
+1
182:0 0 155 221;
+1
182:0 0 155 222;
+1
182:0 0 155 223;
+1
182:0 0 155 224;
+1
182:0 0 155 225;
+1
182:0 0 155 226;
+1
182:0 0 155 227;
+1
182:0 0 155 228;
+1
182:0 0 155 229;
+1
182:0 0 155 230;
+1
182:0 0 155 231;
+1
182:0 0 155 232;
+1
182:0 0 155 233;
+1
182:0 0 155 234;
+1
182:0 0 155 235;
+1
182:0 0 155 236;
+1
182:0 0 155 237;
+1
182:0 0 155 238;
+1
182:0 0 155 239;
+1
182:0 0 155 240;
+1
182:0 0 155 241;
+1
182:0 0 155 242;
+1
182:0 0 155 243;
+1
182:0 0 155 244;
+1
182:0 0 155 245;
+1
182:0 0 155 246;
+1
182:0 0 155 247;
+1
182:0 0 155 248;
+1
182:0 0 155 249;
+1
182:0 0 155 250;
+1
182:0 0 155 251;
+1
182:0 0 155 252;
+1
182:0 0 155 253;
+1
182:0 0 155 254;
+1
182:0 0 155 255;
+1
182:0 0 155 256;
+1
182:0 0 155 257;
+1
182:0 0 155 258;
+1
182:0 0 155 259;
+1
182:0 0 155 260;
+1
182:0 0 155 261;
+1
182:0 0 155 262;
+1
182:0 0 155 263;
+1
182:0 0 155 264;
+1
182:0 0 155 265;
+1
182:0 0 155 266;
+1
182:0 0 155 267;
+1
182:0 0 155 268;
+1
182:0 0 155 269;
+1
182:0 0 155 270;
+1
182:0 0 155 271;
+1
182:0 0 155 272;
+1
182:0 0 155 273;
+1
182:0 0 155 274;
+1
182:0 0 155 275;
+1
182:0 0 155 276;
+1
182:0 0 155 277;
+1
182:0 0 155 278;
+1
182:0 0 155 279;
+1
182:0 0 155 280;
+1
182:0 0 155 281;
+1
182:0 0 155 282;
+1
182:0 0 155 283;
+1
182:0 0 155 284;
+1
182:0 0 155 285;
+1
182:0 0 155 286;
+1
182:0 0 155 287;
+1
182:0 0 155 288;
+1
182:0 0 155 289;
+1
182:0 0 155 290;
+1
182:0 0 155 291;
+1
182:0 0 155 292;
+1
182:0 0 155 293;
+1
182:0 0 155 294;
+1
182:0 0 155 295;
+1
182:0 0 155 296;
+1
182:0 0 155 297;
+1
182:0 0 155 298;
+1
182:0 0 155 299;
+1
182:0 0 155 300;
+1
182:0 0 155 301;
+1
182:0 0 155 302;
+1
182:0 0 155 303;
+1
182:0 0 155 304;
+1
182:0 0 155 305;
+1
182:0 0 155 306;
+1
182:0 0 155 307;
+1
182:0 0 155 308;
+1
182:0 0 155 309;
+1
182:0 0 155 310;
+1
182:0 0 155 311;
+1
182:0 0 155 312;
+1
182:0 0 155 313;
+1
182:0 0 155 314;
+1
182:0 0 155 315;
+1
182:0 0 155 316;
+1
182:0 0 155 317;
+1
182:0 0 155 318;
+1
182:0 0 155 319;
+1
182:0 0 155 320;
+1
182:0 0 155 321;
+1
182:0 0 155 322;
+1
182:0 0 155 323;
+1
182:0 0 155 324;
+1
182:0 0 155 325;
+1
182:0 0 155 326;
+1
182:0 0 155 327;
+1
182:0 0 155 328;
+1
182:0 0 155 329;
+1
182:0 0 155 330;
+1
182:0 0 155 331;
+1
182:0 0 155 332;
+1
182:0 0 155 333;
+1
182:0 0 155 334;
+1
182:0 0 155 335;
+1
182:0 0 155 336;
+1
182:0 0 155 337;
+1
182:0 0 155 338;
+1
182:0 0 155 339;
+1
182:0 0 155 340;
+1
182:0 0 155 341;
+1
182:0 0 155 342;
+1
182:0 0 155 343;
+1
182:0 0 155 344;
+1
182:0 0 155 345;
+1
182:0 0 155 346;
+1
182:0 0 155 347;
+1
182:0 0 155 348;
+1
182:0 0 155 349;
+1
182:0 0 155 350;
+1
182:0 0 155 351;
+1
182:0 0 155 352;
+1
182:0 0 155 353;
+1
182:0 0 155 354;
+1
182:0 0 155 355;
+1
182:0 0 155 356;
+1
182:0 0 155 357;
+1
182:0 0 155 358;
+1
182:0 0 155 359;

File diff suppressed because it is too large Load Diff