uSEQ API less documented

In working with uSEQ, I’ve seen reference to a few functions such as:

FAST, SLOW, OFFSET

These functions are not explicitly described in the current documentation, but used in various ways such as:

(from-list [1 2 (from-list [1 2] bar)] (slow 2 bar))

Being an opensource project, I was able to fetch the source and looking at the file uSEQ/src/uSEQ.cpp I found the definitions for the above.

From these definitions, I can see that the above functions take two arguments, the first of which is an array of two numbers and the second is an “environment”. The concept of an Environment is defined in uSEQ/src/lisp/Environment.cpp, appears to me to be similar to the concept of lexical scope, and is basically handled by modulisp. As a user the first argument’s two values are what is provided, one a number and the other a phasor.

Looking at the meat of these functions, they perform the following:

FAST: multiplies by the provided factor
SLOW: divides by the provided factor
OFFSET: adds the provided offset.

The effect of this is to transform the “phasor” by applying the above rule in a new environment linked as a child to the original. This allows for modifications to the parent to ripple down to the child environments.

This does seem to imply that the global BPM is used throughout the system and defining systems with multiple BPMs is not currently not supported. Something I’ll definitely ask about in the Discord server.

cl-useq – A Common Lisp Library for working with uSEQ

Had a few moments this weekend to put together a library to connect to uSEQ. It uses a standard common-lisp implementation (tested with SBCL) and cl-libserial-port to form a serial connection to the uSEQ device (RP2040 based usb device).

I implemented a basic REPL to have a back and forth with the device. uSEQ ships with a much more full featured library called useqedit that I would recommend most people to use. I wrote this library to fold uSEQ into my native coding environment, which is Emacs and SLIME.

The cl-useq library can be found on my github along with a description and examples.

Franz mentioned on Dr Dobbs site

A lot of people ask about my day job at Franz and I usually have a rehearsed answer that goes something like this:

We work on a version of a programming language called Common Lisp and we have built tools on top of it. One of these tools is a database useful for studying complex data sets.

It would be cool to say something like “twitter” or “vimeo” and have instant recognition of my area of work, but with Franz you get a puzzled look and usually 10 minutes of back and forth to properly describe what we do.

With that confusion in mind I jumped to read this Dr. Dobbs interview with our CEO, Jans. I think to the technical people out there, some of this will make sense:

Dr. Dobbs interview with Jans Aasman of Franz Inc