Impromptu (programming environment)
Encyclopedia
Impromptu is a Mac OS X
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...

 programming
Computer program
A computer program is a sequence of instructions written to perform a specified task with a computer. A computer requires programs to function, typically executing the program's instructions in a central processor. The program has an executable form that the computer can use directly to execute...

 environment for live coding
Live coding
Live coding is a performance practice centred upon the use of improvised interactive programming and real-time computing in creating sound and image based digital media. Live coding is particularly prevalent in computer music, combining algorithmic composition with improvisation...

. Impromptu is built around the Scheme language, which is a member of the Lisp family of languages. The source code of its core has been opened as the Extempore project.

Description

The environment allows to make changes to a program at runtime
Runtime
In computer science, run time, run-time, runtime, or execution time is the time during which a program is running , in contrast to other phases of a program's lifecycle such as compile time, link time, load time, etc....

, so variables and functions may be redefined and the changes take effect immediately. A programmer can also create and schedule code for future execution, as well as data events such as notes and graphics objects. Once an event is scheduled, execution continues. Looping is performed by using an idiom called "temporal recursion" which works by having a function asynchronously schedule a future call to itself as its final action.

The library allows communicating with Audio Units
Audio Units
Audio Units are a system-level plug-in architecture provided by Core Audio in Mac OS X developed by Apple Computer. Audio Units are a set of application programming interface services provided by the operating system to generate, process, receive, or otherwise manipulate streams of audio in...

 for audio synthesis, and with graphics layers such as QuickTime
QuickTime
QuickTime is an extensible proprietary multimedia framework developed by Apple Inc., capable of handling various formats of digital video, picture, sound, panoramic images, and interactivity. The classic version of QuickTime is available for Windows XP and later, as well as Mac OS X Leopard and...

, Quartz
Quartz (graphics layer)
Quartz specifically refers to a pair of Mac OS X technologies, each part of the Core Graphics framework: Quartz 2D and Quartz Compositor. It includes both a 2D renderer in Core Graphics and the composition engine that sends instructions to the graphics card...

, Core Image
Core Image
Core Image is a pixel-accurate, near-realtime, non-destructive image processing technology in Mac OS X. Implemented as part of the QuartzCore framework of Mac OS X 10.4 and later, Core Image provides a plugin-based architecture for applying filters and effects within the Quartz graphics rendering...

, OpenGL
OpenGL
OpenGL is a standard specification defining a cross-language, cross-platform API for writing applications that produce 2D and 3D computer graphics. The interface consists of over 250 different function calls which can be used to draw complex three-dimensional scenes from simple primitives. OpenGL...

 for video composition. Code written in Objective-C
Objective-C
Objective-C is a reflective, object-oriented programming language that adds Smalltalk-style messaging to the C programming language.Today, it is used primarily on Apple's Mac OS X and iOS: two environments derived from the OpenStep standard, though not compliant with it...

 can be called from the editor, and also Objective-C frameworks can perform calls to the Scheme interpreter.

Impromptu's Scheme interpreter was initially built from the TinyScheme
TinyScheme
TinyScheme is a free software implementation of the Scheme programming language with a lightweight Scheme interpreter of a subset of the R5RS standard. It is meant to be used as an embedded scripting interpreter for other programs...

 1.35 baseline, but it has been substantially modified since to better suit the live coding context. A real-time garbage collector
Garbage collection (computer science)
In computer science, garbage collection is a form of automatic memory management. The garbage collector, or just collector, attempts to reclaim garbage, or memory occupied by objects that are no longer in use by the program...

, and Objective-C
Objective-C
Objective-C is a reflective, object-oriented programming language that adds Smalltalk-style messaging to the C programming language.Today, it is used primarily on Apple's Mac OS X and iOS: two environments derived from the OpenStep standard, though not compliant with it...

 integration were added. Also, a new statically typed language called the Extempore Language has been integrated to the system. This language is syntactically Scheme-like, but semantically closer to C, and is designed for real-time sound synthesis and other computationally heavy tasks. It provides type inference
Type inference
Type inference refers to the automatic deduction of the type of an expression in a programming language. If some, but not all, type annotations are already present it is referred to as type reconstruction....

 and is compiled to machine language by LLVM.

Sample performance

A Study in Keith is a live coding performance in Impromptu by Andrew Sorensen. The first two minutes (1:56) are silent, while the performer writes the program that will produce the introduction of the piece. From then on, he modifies the code on the fly to evolve the composition.

Extempore

The core of Impromptu has been released as Extempore under a BSD style licence. It runs under both Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

 and Mac OS X. The project is as of June 2011 at an early stage and is intended as a developer preview, not suited for end users. It includes the Scheme interpreter, the Extempore Language compiler and the scheduler. The bindings to Apple libraries are absent, but the environment can interface with dynamic libraries.

See also

  • Comparison of audio synthesis environments
    Comparison of audio synthesis environments
    Software audio synthesis environments typically consist of an audio programming language and a user environment to design/run the language in. Although many of these environments are comparable in their abilities to produce high-quality audio, their differences and specialties are what draw users...

  • SuperCollider
    Supercollider
    A Supercollider is a high energy particle accelerator. The term may refer to:* Superconducting Super Collider, planned 80 km project in Texas, canceled in 1993...

  • Processing (programming language)
    Processing (programming language)
    Processing is an open source programming language and integrated development environment built for the electronic arts and visual design communities with the purpose of teaching the basics of computer programming in a visual context, and to serve as the foundation for electronic sketchbooks...

  • OpenFrameworks
    OpenFrameworks
    openFrameworks is an open source toolkit designed for "creative coding". OpenFrameworks is written in C++ and runs on Windows, Mac OS X, and Linux...

  • NodeBox
  • ChucK
    ChucK
    ChucK is a concurrent, strongly timed audio programming language for real-time synthesis, composition, and performance, which runs on Mac OS X, Linux, Microsoft Windows, and iPhone/iPad. It is designed to favor readability and flexibility for the programmer over other considerations such...

  • jMax
  • Max (software)
    Max (software)
    Max is a visual programming language for music and multimedia developed and maintained by San Francisco-based software company Cycling '74. During its 20-year history, it has been widely used by composers, performers, software designers, researchers, and artists for creating innovative recordings,...

  • Pure Data
    Pure Data
    Pure Data is a visual programming language developed by Miller Puckette in the 1990s for creating interactive computer music and multimedia works. While Puckette is the main author of the program, Pd is an open source project with a large developer base working on new extensions to it. It is...

  • TinyScheme
    TinyScheme
    TinyScheme is a free software implementation of the Scheme programming language with a lightweight Scheme interpreter of a subset of the R5RS standard. It is meant to be used as an embedded scripting interpreter for other programs...


Academic papers


Other sources


External links

  • http://improgramming.wordpress.com/ - a blog about Impromptu by Thor Magnusson
  • http://vimeo.com/impromptu/videos/sort:plays - Live performances by Andrew Sorensen.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK