Next Chapter
Previous Chapter
Table of Contents

Simple Editing Commands

The Pulse2 object created in the previous chapter is an exact duplicate of Pulse. We can now change its structure (for example by reordering, deleting or adding sub-objects to the current set) or by changing values in its data (for example, by providing new values for the note, rhythm, duration, amplitude or channel slots of its midi-notes.)

Let's demonstrate the easiest commands from each category.

Retrograde

Retrograde reverses the order within a range of objects. If no range is given the all the sub-objects are reversed.

Stella [Top-Level]: list pulse2[1,end]
Pulse2:
     1. #<MIDI-NOTE | C5| 0.100| 0.100| 0.250| 0|> 
Pulse2:
    80. #<MIDI-NOTE | G4| 0.100| 0.100| 0.750| 0|> 
Stella [Top-Level]: retrograde pulse2
Stella [Top-Level]: list pulse2[1,end]
Pulse2:
     1. #<MIDI-NOTE | G4| 0.100| 0.100| 0.750| 0|> 
Pulse2:
    80. #<MIDI-NOTE | C5| 0.100| 0.100| 0.250| 0|> 
Stella [Top-Level]:
Now listen to Pulse2 together with Pulse:

Stella [Top-Level]: mix 1,3 0,1.5
Stella [Top-Level]:
Try listening several more times, providing different start time offsets to Pulse, Pulse2 and Sinus.

Transpose and Invert

The transpose command shifts frequency values up or down in the standard scale. (The standard scale can be set to any scale defined by Common Music's defscale macro.) The process of transposition does not change the nature of the material; note names remain symbols, pitches remain floating point numbers and degrees remain integers. In the next example the midi-notes in Pulse2 are transposed up 5 steps:

Stella [Top-Level]: transpose pulse2 note 5
Stella [Top-Level]: 
Listen to the material again. As an additional exercise, try inverting Pulse2. Invert reflects frequency values around an absolute position in the standard scale:

Stella [Top-Level]: invert pulse2 note c5
Stella [Top-Level]:  
Pulse2 is now a retrograde inversion of Pulse.

About Editing Slot Data

Stella has a whole family of commands that affect changes in slot data. All of these commands share a similar syntax:

    command references {slot expr}*
Following references come zero or more pairs of arguments. Each pair consists of the name of a slot followed by an expression, or "expr" that is evaluated to change the slot's value. For example,

Stella [Top-Level]: set pulse2[1] amplitude .5
Stella [Top-Level]:  
will set the amplitude slot of the first object in Pulse2 to .5 and

Stella [Top-Level]: scale pulse2[1] amplitude .5
Stella [Top-Level]:  
will set the amplitude to half its current value. Editing commands and slot expressions are covered in the section Set, and in the Mapping Slot Data chapter later in this tutorial.

Next Chapter
Previous Chapter
Table of Contents