Snd lab #2 & Homework assignment #2

Pd and Snd streaming illusion

Test out streaming.pd in the usual pd directory. It starts computing when opened but you need to bring up the output dB level manually.


The example is an endlessly looping series of four ascending pitches, with cycling timbres. The even rhythm begins at a setting of 400 msec. Listen to the pattern for awhile and then slowly increase the speed, moving the rhythm slider to a smaller (faster) value. At what value does the texture sound like it splits into 3 descending voices?


A visual analogy:


(shapes = timbres & colors = pitches)




Isorhythm is a musical technique where complex phasing is played out between cycling patterns in different musical dimensions. In the medieval version, it was melodic sequences of one length vs. rhythmic sequences of another length (in terms of number of notes) with the effect of generating complex patterns that would eventually repeat.

In a similar way, the gestalt principle of grouping by similarity can be demonstrated by inequal phasing. The effect in this case is to split a simple linear pattern into simultaneous layers, like the way you see the color pattern in the cones, then the donuts, then the balls above when the items are closer together. In the Pd example, FM synthesis generates 3 timbres phased against 4 pitches. Tempo can be changed to increase or decrease the effect of proximity in which timbral similarity pulls the tones into different streams, or musical voices. Psuedo-polyphony is another way to describe it.

The timbres of the FM tones alternate between:



What pulls the tones apart into groups is the salience of the timbral differences. Other differences can also overcome the ascending pitch progression, including other timbral qualities (attack, vibrato, etc.) and even loudness or spatial location.


The assignment is to create the illusion based on register rather than timbre and to use a scheme example to produce it. Turn in a soundfile, hw2.wav in the same fashion as hw1.wav, which you've computed using snd. It should be exactly 200 notes with an acceleration in which the rhythm values decrease from 0.4 to 0.1 sec.

Register is gross pitch range, like bass, alto, or soprano. To create ther register-based illusion, create a list of 3 octave displacements that will cycle against 4 pitches. Choose your own pitches, but as above, keep the pitches themselves close in register. We'll use midi keynums for this (semitones), and an octave shift up is made by adding 12 to a given keynum (octave = 12 semitones). The note middle-c is keynum 60.


The following assumes you've mastered snd-lab1.html and have been successful with operating the examples it walks you through. You also need to become familiar with the CM dictionary.


Take a cue from ~cc/220a/scm/fm-violin/fmViolin1-pre-hw2.scm and perhaps play around with the parts which create its cycling effect. These are highlighted. This is an pitch-rhtyhm isorhythm example, not a streaming illusion.

(define (notes num-notes)
  (let (
	(p (new cycle :of '(58 60 62 64 66)))	; pitches as midi keynums
	(r (new cycle :of '(0.1 0.2 0.5 0.7)))  ; rhythms
	)
    (process 
     initially (make-clm-event 'vn-note
			       '((v (make-fm-violin (hertz keynum) amplitude))
				 (e (make-env :envelope '(0 0 1 1 2 0) :end samps))
				 (l (make-locsig :degree azimuth :output *output*))
				 )
			       '(locsig l (+ t0 tn) (* (env e) (v))))
     for ctr from 0 below num-notes by 1
   do
     (output (new-event 'vn-note 
			:time (now)
			:duration 0.25
			:amplitude 0.5 :keynum (next p)	; apply cycling pitches from list
			:azimuth 45.0))
     wait (next r))))						; apply cycling rhythms from list

Your job is to create a streaming illusion version where octave shifts of keynum happen in a 3-cycle, while pitches loop in a 4-cycle. Use a nested expression. Above, keynum is set to (next p) and you will want to change that to be (+ (next octave-list-that-you-will-define) (next p)). Rhythm should interpolate from slow to fast over exactly 200 notes. Use CM's interp procedure introduced in the sine.scm example (where it controlled azimuth) adapting it to produce values that are interpolated down from 0.4 to 0.1 over the course of the computation.