SuperCollider Morphs for Squeak

About
This is a collection of morphs for using Squeak as a programming/experimenting/performing environment for SuperCollider.

Platform:
Squeak on gnu/Linux.

Installation

DISCLAIMER: This collection of code is just an hack/experiment. Moreover, newer versions may break compatibility. Don't blame me if you lose hours or days of precious work by using it. I still code mostly in emacs myself. :-)

Launch a Squeak image (3.9 or later) and install these packages from the squeakmap package loader (if you haven't them already installed, obviously):

OSProcess*, CommandShell and Connectors.

* Unfortunately this package is fully implemented only on gnu/Linux, at the moment.

Then download and fileIn this file:
SuperCollider-Morphs20071103.st

Tutorial

First steps

Launch your Squeak Image and open the objects morph (LeftMouseClick -> objects). Then click in the SuperCollider tab.

screenshot

You may also want to open a Transcript window (LMC -> open -> Transcript - or ALT-t). This is where the output from the sclang process will appear.

Then drop the sclang process morph into the world and click on 'start'. This will start the sclang process.

screenshot

You should begin to see the output from the sclang process in the Transcript window:

screenshot

Now pick a container:

screenshot

drag a 'code text' morph inside it and write some sclang code into it:

screenshot

By clicking on the green button you execute the code (technically, you send it to the sclang process STDIN). The output from the sclang process is redirected into the Transcript window.

That's it. But there's more...

The container morph

If you right click on a container morph the classic halos will appear.

screenshot

If you're new to Squeak you should know that morphs can be easily copied, deleted, resized, rotated, you can change their color and much more. Some morphs can't be dragged directly since their 'mouseDown' action does something else (like giving the focus to a text edit area). To move them you should click on the black halo on top.

The red halo opens the morph's menu. The (SuperCollider) container morph has three custom menu entries:

'Vertical orientation'
'Horizontal orientation'
and a third which is a toggle between 'single slot' and '3 slots'.

These are explained below...

Organize your code hierarchically

You can nest as many 'code text' morphs as you want inside a container. And you can also nest cotainers. Like this:

screenshot

A container can be laid out horizontally or vertically and you can toggle between a single slot container and one with three slots (which is as it is created by default). You can write code in the outer slots too (they're filled with open and closed parenthesis by default).

When you put a container inside another its green button disappears. If you drag the cointainer from its parent and drop it into the world it will reappear.

When you click on a green button it will trigger all the code contained inside the container and its submorphs, from left to right and from top to bottom.

Connecting containers

You can connect two or more containers together:

screenshot

In the example above, when you click on the topmost container's button the code of both containers will be sent (one after the other). If you click on the second container's only the code inside it will be triggered.

Knobs and sliders (more stuff to come soon)

screenshot

Just drop them in world to use them.

When you move a slider or a knob, the code inside the top and bottom text areas is triggered/sent together with the knob/slider value as float (mapped from 0.0 to 1.0).

You can also drop knobs and sliders inside containers:

screenshot

When you drop a knob or a slider inside a container its text areas disappear. Moving them will not trigger any code but will set the value that will be placed in your code when you'll trigger the whole container.

Other useful things that you may already know if you're a Squeak user (in progress)

- To organize your work you may want to create a brand new project (LMB -> open -> morphic project) for each composition. Projects can be loaded/saved and shared independently from the Squeak image.

- All morphs can be 'collapsed' by clicking on the collapse halo, and you can rename their label to something meaninful:

screenshot

Have fun!

Related links

Morphic - The Squeak User Interface by Juan Manuel Vuletich.