| Ever get tired of opening an editor buffer and starting:
sr = 44100
kr = .....
Blah blah blah.
Takes minutes before you get your first beep out of Csound.
I finally wrote a little script that automates the tedious part.
I call it 'cs' and put it in /usr/local/script. You give it
an argument which is the name of a directory that it will create.
It puts a basic orc and sco inside with a Makefile that will generate
a beep.
So if you have a quick idea to try out with csound, it is very fast
to just go:
cs foo
and then go into foo and tweek the vanilla orc and sco.
####################### CUT HERE #############################
mkdir $1
cd $1
cat << END > orc
sr = 44100
kr = 4410
ksmps = 10
nchnls = 1
gasig init 0
instr 1
;***** INITIALIZE *****
imvol init 1
ibegin init p2
idur init p3
ivol init p4
ipitch init p5
ifront init .1
iback init idur - ifront
;***** INSTRUMENT *****
aenv linseg 0, ifront, 1, iback, 0
asig oscil ivol, ipitch, 1
asig = asig * aenv * imvol
gasig = gasig + asig
endin
instr 99
irevamt init .1
ihidec init .5
arev reverb2 gasig, 10, ihidec
asig = gasig * (1 - irevamt) + arev * irevamt
out asig
gasig = 0
endin
END
cat << END2 > Makefile
OUTFILE = \$\$SFDIR/test
#OUTFILE = dac
CSFLAGS = -R -W -d -o \$(OUTFILE)
\$(OUTFILE) : orc sco
csound \$(CSFLAGS) orc sco
END2
cat << END3 > sco
f1 0 65536 10 1 .8 .6 .4 .2 .1
i1 0 3 10000 440
i99 0 4 |