#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create the files:
#	sting.scot
#	sting.orc
# This archive created: Thu Apr 26 22:53:55 1990
export PATH; PATH=/bin:$PATH
if test -f 'sting.scot'
then
	echo shar: will not over-write existing file "'sting.scot'"
else
cat << \SHAR_EOF > 'sting.scot'
; Backing riff for "Rock Steady" from "Nothing like the Sun" by Sting
; Martin Guy, Canterbury, April 1990
orchestra {
	bass = 1
	chords = 2
	gdecay = 3
}

functions {
; sine wave table
f1 0 1024 10 1
; string just before plucking.
f2 0 1024 7 0 32 1 928 -1 32 0
}

score {
$bass
t 130
4=,,a12rra6'e12,a6'g12,a__/
12arr12rra6'e12,a6'g_12f#/
4,a12rra6'e12,a6'g12,a__/
12arr12rra6'e12,a4'g/

4,a12rra6'e12,a6'g12,a__/
12arr12rra6'e12,a6'g_12f#/
4,a12rra6'e12,a6'g12,a__/
12arr12rra6'e12,a4'g/

$chords
4r 12=c#<=g<=,e rr  4r 12 =c#<=g<=,e rr /
4r 12=c#<=g<=,e rr  4r 12 =c#<=g<=,e rr /
4r 12=c#<=g<=,e rr  4r 12 =c#<=g<=,e rr /
4r 12=c#<=g<=,e rr  4r 12 =c#<=g<=,e rr /

4r 12=c#<=g<=,e rr  4r 12 =c#<=g<=,e rr /
4r 12=c#<=g<=,e rr  4r 12 =c#<=g<=,e rr /
4r 12=c#<=g<=,e rr  4r 12 =c#<=g<=,e rr /
4r 12=c#<=g<=,e rr  4r 12 =c#<=g<=,e rr /
}

score {
$bass
t 130
4=,,,f12rrf6'e-12,f6'f12,f__/
12frr12rrf6'e-12,f4'f/
4,f12rrf6'e-12,f6'f12,f__/
12frr12rrf6'e-12,f4'f/

4,f12rrf6'e-12,f6'f12,f__/
12frr12rrf6'e-12,f4'f/
4,f12rrf6'e-12,f6'f12,en__/
12err12rre4'dc/

$chords
4r 12=c<=a<=,e- rr  4r 12 =c<=a<=,e- rr /
4r 12=c<=a<=,e- rr  4r 12 =c<=a<=,e- rr /
4r 12=c<=a<=,e- rr  4r 12 =c<=a<=,e- rr /
4r 12=c<=a<=,e- rr  4r 12 =c<=a<=,e- rr /

4r 12=c<=a<=,e- rr  4r 12 =c<=a<=,e- rr /
4r 12=c<=a<=,e- rr  4r 12 =c<=a<=,e- rr /
4r 12=c<=a<=,e- rr  4r 12 =c<=a<=,e- rr /
4r =bn<=a-<=,d rr/ 
}

score {
$bass
t 130
4=,,a12rra6'e12,a6'g12,a__/
12arr12rra6'e12,a6'g12f#/
4,a12rra6'e12,a6'g12,a__/
12arr12rra6'e12,a4'g/

4,a12rra6'e12,a6'g12,a__/
12arr12rra6'e12,a6'g12f#/
4,a12rra6'e12,a6'g12,a__/
12arr12rra6'e12,a4'g/

$chords
4r 12=c#<=g<=,e rr  4r 12 =c#<=g<=,e rr /
4r 12=c#<=g<=,e rr  4r 12 =c#<=g<=,e rr /
4r 12=c#<=g<=,e rr  4r 12 =c#<=g<=,e rr /
4r 12=c#<=g<=,e rr  4r 12 =c#<=g<=,e rr /

4r 12=c#<=g<=,e rr  4r 12 =c#<=g<=,e rr /
4r 12=c#<=g<=,e rr  4r 12 =c#<=g<=,e rr /
4r 12=c#<=g<=,e rr  4r 12 =c#<=g<=,e rr /
4r 12=c#<=g<=,e rr  4r 12 =c#<=g<=,e rr /

$gdecay
1c__/1c__/1c__/1c__/
1c__/1c__/1c__/1c/
}
SHAR_EOF
fi # end of overwriting check
if test -f 'sting.orc'
then
	echo shar: will not over-write existing file "'sting.orc'"
else
cat << \SHAR_EOF > 'sting.orc'
; Orchestra for backing riff from "Rock Steady" from "Nothing like the Sun"
; by Sting.  Plucked bass and hammond clone.
; Martin Guy, Canterbury, April 1990
sr=8192
kr=512
ksmps=16

; Bogus instrument for global end decay
gkdecay	init 1
instr 3
gkdecay	line	1,p3,0
endin

; Spluck.
instr 1
a11	pluck	7500,cpspch(p5),200,2,1
a12	pluck	7500,cpspch(p5)*1.01,200,2,1
a13	oscil	5000,cpspch(p5),1
kdecay	linseg	1,p3*0.9,1,p3*0.1,0
	out	(a11+a12+a13)*kdecay*gkdecay
endin

instr 2
; Wobba.
; Harmonic sine waves, with amplitudes controlled by slow sines of different
; rates for a hammond-like effect.
; Amplitude of tones is proportional to 1/freq for equal energy.

icps = cpspch(p5)	; pitch of current note in cps
iamp = 440/icps		; amplitude of current note
ileslie = (icps/440)*2	; speed of wobble

; Four slow oscillators control amplitude of first four harmonics.
; The tremolo rate is proportional to the frequency of the harmonic.
k1	oscil 2500*iamp,ileslie,1
k2	oscil 1250*iamp,ileslie*2,1
k3	oscil 750*iamp,ileslie*3,1
k4	oscil 1000*iamp,ileslie*4,1

; The first four harmonics (almost)
a1	oscil k1,icps,1
a2	oscil k2,icps*2.01,1
a3	oscil k3,icps*3.02,1
a4	oscil k4,icps*4.03,1

; Envelope for tidy decay
kenv	linseg	1,p3*3/4,1,p3/4,0

asig	= (a1+a2+a3+a4)*kenv

out	asig * gkdecay

endin
SHAR_EOF
fi # end of overwriting check
#	End of shell archive
exit 0

Received: from kestrel by gos.Ukc.AC.UK   Over Ring with SMTP  id aa01602;
          1 May 90 23:17 BST
Received: from nsfnet-relay.ac.uk by kestrel.Ukc.AC.UK 
           via Janet (UKC CAMEL FTP)  id aa18992; 1 May 90 23:17 BST
Received: from vax.nsfnet-relay.ac.uk by sun.NSFnet-Relay.AC.UK 
           Via Ethernet with SMTP  id ab14489; 1 May 90 22:21 GMT
Date:     Tue, 1 May 90 23:00:18 BST
From:     NSFnet-Relay Memo Service (mmdf.5.86) <mmdf@nsfnet-relay.ac.uk>
Sender:   mmdf@nsfnet-relay.ac.uk
Subject:  Failed mail  (msg.aa08860)
To:       mg@ukc.ac.uk

    Your message could not be delivered to
'csound@ems.media.mit.edu (host: ems.media.mit.edu) (queue: satnet)' for the following
reason:  ' edu... User unknown'


    Your message follows:

Received: from sun.nsfnet-relay.ac.uk by vax.NSFnet-Relay.AC.UK 
           via Janet with NIFTP  id aa08860; 1 May 90 22:13 BST
Received: from gos by kestrel.Ukc.AC.UK   Over Ring with SMTP  id aa22309;
          1 May 90 15:10 BST
Date: Tue, 01 May 90 15:01:32 +0100
From: mg@uk.ac.ukc
To: csound@edu.mit.media.ems
Subject: Something to play using csound

Hi
   Here is a piece I knocked up to test out a couple of easy csound
instruments: a plucked bass and a hammond clone.  The score is written in scot.
Thanks to mark@acorn.co.uk for pointing out a pre-production bug.

Enjoy
	Martin

#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create the files:
#	sting.scot
#	sting.orc
# This archive created: Thu Apr 26 22:53:55 1990
export PATH; PATH=/bin:$PATH
if test -f 'sting.scot'
then
	echo shar: will not over-write existing file "'sting.scot'"
else
cat << \SHAR_EOF > 'sting.scot'
; Backing riff for "Rock Steady" from "Nothing like the Sun" by Sting
; Martin Guy, Canterbury, April 1990
orchestra {
	bass = 1
	chords = 2
	gdecay = 3
}

functions {
; sine wave table
f1 0 1024 10 1
; string just before plucking.
f2 0 1024 7 0 32 1 928 -1 32 0
}

score {
$bass
t 130
4=,,a12rra6'e12,a6'g12,a__/
12arr12rra6'e12,a6'g_12f#/
4,a12rra6'e12,a6'g12,a__/
12arr12rra6'e12,a4'g/

4,a12rra6'e12,a6'g12,a__/
12arr12rra6'e12,a6'g_12f#/
4,a12rra6'e12,a6'g12,a__/
12arr12rra6'e12,a4'g/

$chords
4r 12=c#<=g<=,e rr  4r 12 =c#<=g<=,e rr /
4r 12=c#<=g<=,e rr  4r 12 =c#<=g<=,e rr /
4r 12=c#<=g<=,e rr  4r 12 =c#<=g<=,e rr /
4r 12=c#<=g<=,e rr  4r 12 =c#<=g<=,e rr /

4r 12=c#<=g<=,e rr  4r 12 =c#<=g<=,e rr /
4r 12=c#<=g<=,e rr  4r 12 =c#<=g<=,e rr /
4r 12=c#<=g<=,e rr  4r 12 =c#<=g<=,e rr /
4r 12=c#<=g<=,e rr  4r 12 =c#<=g<=,e rr /
}

score {
$bass
t 130
4=,,,f12rrf6'e-12,f6'f12,f__/
12frr12rrf6'e-12,f4'f/
4,f12rrf6'e-12,f6'f12,f__/
12frr12rrf6'e-12,f4'f/

4,f12rrf6'e-12,f6'f12,f__/
12frr12rrf6'e-12,f4'f/
4,f12rrf6'e-12,f6'f12,en__/
12err12rre4'dc/

$chords
4r 12=c<=a<=,e- rr  4r 12 =c<=a<=,e- rr /
4r 12=c<=a<=,e- rr  4r 12 =c<=a<=,e- rr /
4r 12=c<=a<=,e- rr  4r 12 =c<=a<=,e- rr /
4r 12=c<=a<=,e- rr  4r 12 =c<=a<=,e- rr /

4r 12=c<=a<=,e- rr  4r 12 =c<=a<=,e- rr /
4r 12=c<=a<=,e- rr  4r 12 =c<=a<=,e- rr /
4r 12=c<=a<=,e- rr  4r 12 =c<=a<=,e- rr /
4r =bn<=a-<=,d rr/ 
}

score {
$bass
t 130
4=,,a12rra6'e12,a6'g12,a__/
12arr12rra6'e12,a6'g12f#/
4,a12rra6'e12,a6'g12,a__/
12arr12rra6'e12,a4'g/

4,a12rra6'e12,a6'g12,a__/
12arr12rra6'e12,a6'g12f#/
4,a12rra6'e12,a6'g12,a__/
12arr12rra6'e12,a4'g/

$chords
4r 12=c#<=g<=,e rr  4r 12 =c#<=g<=,e rr /
4r 12=c#<=g<=,e rr  4r 12 =c#<=g<=,e rr /
4r 12=c#<=g<=,e rr  4r 12 =c#<=g<=,e rr /
4r 12=c#<=g<=,e rr  4r 12 =c#<=g<=,e rr /

4r 12=c#<=g<=,e rr  4r 12 =c#<=g<=,e rr /
4r 12=c#<=g<=,e rr  4r 12 =c#<=g<=,e rr /
4r 12=c#<=g<=,e rr  4r 12 =c#<=g<=,e rr /
4r 12=c#<=g<=,e rr  4r 12 =c#<=g<=,e rr /

$gdecay
1c__/1c__/1c__/1c__/
1c__/1c__/1c__/1c/
}
SHAR_EOF
fi # end of overwriting check
if test -f 'sting.orc'
then
	echo shar: will not over-write existing file "'sting.orc'"
else
cat << \SHAR_EOF > 'sting.orc'
; Orchestra for backing riff from "Rock Steady" from "Nothing like the Sun"
; by Sting.  Plucked bass and hammond clone.
; Martin Guy, Canterbury, April 1990
sr=8192
kr=512
ksmps=16

; Bogus instrument for global end decay
gkdecay	init 1
instr 3
gkdecay	line	1,p3,0
endin

; Spluck.
instr 1
a11	pluck	7500,cpspch(p5),200,2,1
a12	pluck	7500,cpspch(p5)*1.01,200,2,1
a13	oscil	5000,cpspch(p5),1
kdecay	linseg	1,p3*0.9,1,p3*0.1,0
	out	(a11+a12+a13)*kdecay*gkdecay
endin

instr 2
; Wobba.
; Harmonic sine waves, with amplitudes controlled by slow sines of different
; rates for a hammond-like effect.
; Amplitude of tones is proportional to 1/freq for equal energy.

icps = cpspch(p5)	; pitch of current note in cps
iamp = 440/icps		; amplitude of current note
ileslie = (icps/440)*2	; speed of wobble

; Four slow oscillators control amplitude of first four harmonics.
; The tremolo rate is proportional to the frequency of the harmonic.
k1	oscil 2500*iamp,ileslie,1
k2	oscil 1250*iamp,ileslie*2,1
k3	oscil 750*iamp,ileslie*3,1
k4	oscil 1000*iamp,ileslie*4,1

; The first four harmonics (almost)
a1	oscil k1,icps,1
a2	oscil k2,icps*2.01,1
a3	oscil k3,icps*3.02,1
a4	oscil k4,icps*4.03,1

; Envelope for tidy decay
kenv	linseg	1,p3*3/4,1,p3/4,0

asig	= (a1+a2+a3+a4)*kenv

out	asig * gkdecay

endin
SHAR_EOF
fi # end of overwriting check
#	End of shell archive
exit 0

