• # Lesson 14. Further Working with Binaries

## Annotation

A new rhythm is created here for the pitch list by removing all pitches of c# (cs4) and g (g4).

```(setf line-rnd (gen-eval 5 '(rnd-sample 5 line) :seed 41))
=> ((cs4 g4 cs4 c5 cs4) (cs4 c4 c5 c5 g4) (fs4 fs4 c5 fs4 cs4)
(cs4 c5 cs4 fs4 c5) (c5 c5 g4 g4 fs4))```
```(setf bin-rhythm (gen-binary-remove '(cs4 g4) line-rnd))
=> ((0 0 0 1 0) (0 1 1 1 0) (1 1 1 1 0)
(0 1 0 1 1) (1 1 0 0 1))```

Again the ‘swallowing’ effect is created in the length output.

```(setf line-map (binary-map bin-rhythm line-rnd))
=> ((c5) (c4 c5 c5) (fs4 fs4 c5 fs4)
(c5 fs4 c5) (c5 c5 fs4))```
```(setf rhy-mapped (binary-map bin-rhythm '(e)))
=> ((-1/8 -1/8 -1/8 1/8 -1/8) (-1/8 1/8 1/8 1/8 -1/8)
(1/8 1/8 1/8 1/8 -1/8) (-1/8 1/8 -1/8 1/8 1/8)
(1/8 1/8 -1/8 -1/8 1/8))```

Let’s see how it appears in OMN. Note the use of the minus sign for indicating a rest and the repeat sign = as a short hand for repeatedly writing e.

```=> ((-e - - c5 f -) (-e c4 mp c5 = -)
(e fs4 f fs4 c5 fs4 -) (-e c5 mf - fs4 c5)
(e c5 ff c5 - - fs4))```

## Score

```(setf line '(c4 cs4 fs4 g4 c5))
(setf bass (pitch-transpose -24 line))
(setf line-rnd (gen-eval 5 '(rnd-sample 5 line) :seed 41))
(setf bin-rhythm (gen-binary-remove '(cs4 g4) line-rnd))
(setf line-map (binary-map bin-rhythm line-rnd))
(setf rhy-mapped (binary-map bin-rhythm '(e)))
(setf bass-line (gen-repeat 5 (list bass)))
(setf rhythm (span bass-line '(e)))
(setf dynamics (mclist '(f mp f mf ff)))
(setf dyn-spanned (span line-rnd dynamics))

(setf line-1 (make-omn
:length rhy-mapped
:pitch line-map
:velocity dyn-spanned))

(setf bass-1 (make-omn
:length rhythm
:pitch bass-line
:velocity dyn-spanned))

(setf ts-list (get-time-signature line-1 :group '((5))))

(def-score lesson-14
(:key-signature 'chromatic
:time-signature ts-list
:tempo 100
:layout (piano-layout 'piano-rh 'piano-lh))

(piano-rh
:omn line-1
:channel 1
:sound 'gm
:program 'acoustic-grand-piano)

(piano-lh
:omn bass-1)
)```

## Notation

Go back to Reference page.

Edited by opmo

• ### Introduction to OMN the language

OMN is designed as a scripting language for musical events. It’s not about sounds themselves, it is about their control and organisation in a musical composition. As a linear script rather than a graphic stave, musical events can be transformed, extended, reorganised by powerful computer algorithms. Some sequencers and score writers provide basic algorithms, but they do not represent the way composers now think about the process of music composition. Composing has become such a multi-faceted pro

opmo
OMN The Language 0
• ### Introduction to Opusmodus

Contents A Contemporary Language for Making Music The Parametric World of Music The Parametric Instrument Learning Opusmodus : A Strategy Important Questions: Necessary Answers

opmo
Tutorial Guide 0
• ### CLM Installation

Contents CLM Installation Command Line Tools Load and Compile Instruments CLM Installation Common Lisp Music, by William Schottstaedt is a powerful sound synthesis language implemented in Lisp and C. CLM is essentiall

opmo
CLM Examples 0
×

• Lessons