BrainMeta'   Connectomics'  

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Csound, A universal sound programming language
electric
post Aug 31, 2007, 12:03 AM
Post #1


Newbie
*

Group: Basic Member
Posts: 37
Joined: Aug 27, 2007
From: Central Europe
Member No.: 12368



I'd like to draw your attention to Csound, just in the case you're interested in making music or playing with sound. It is a programming language allowing you to do almost anything imaginable. You can process sound samples with mathematical tools, in programs of any length and complexity.

They say, Csound is to sound programming what C is to the computer world. (Csound is coded in C, and you can even make new opcodes if the standard ones don't fulfill your need.)

http://www.csounds.com/whatis/index.html

There's a frontend to it, Cecilia, which is both a programming editor and a gui (graphical user interface) with some shipped examples for modifying soundfiles. And there's also the possibility to write a gui in Csound itself, with fltk (fast light tool kit). You can make buttons and sliders on the screen for real-time manipulation with the mouse and play music. (You can also plug midi keyboards or midi slider banks, and as many microphones as your soundcards support,...)

Both, csound and cecilia, of course are also available as Debian packages.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
electric
post Aug 31, 2007, 07:44 AM
Post #2


Newbie
*

Group: Basic Member
Posts: 37
Joined: Aug 27, 2007
From: Central Europe
Member No.: 12368



Here's a csound program for playing melodies with the computer keyboard. I'm using the harmonic scale (which is my favorite one). Y is 4, A 5, Q 6, 1 is 7, and X is 8. C is 12, V 16, B 20, N 24, M 28, and ; is 32. The rest of the keys are the numbers in between.

You need to copy the code into a file named keyb.csd
then you start a terminal, and, provided you're in the right directory, you type
csound keyb.csd
and there it should go. (for Linux with csound installed)
You stop it with ctrl-C or by closing the terminal or after 1800 seconds it stops automatically.



<CsoundSynthesizer>
<CsOptions>
csound -d -o devaudio -b 2048
</CsOptions>

<CsInstruments>
sr=22050
kr=210

instr 1
gkb sensekey
gka init 2
gka=(gkb==127?gka+1:(gkb==10?gka-1:gka))
gka=(gka>5?5:(gka<1?1:gka)) ;Backspace and Return keys change the volume
gkf init 1
gkf=(gkb==1?.25:(gkb==19?.5:(gkb==4?1:(gkb==6?2:(gkb==7?4:(gkb==8?8:gkf)))))) ;ctrl-A /D-F-G-H change the octave range (crtl-S doesn't seem to work on some terminals)
endin

instr 2
ka=(gkb==32?.01:(gkb==60?2:(gkb==9?3:(gkb==121?4:(gkb==97?5:(gkb==113?6:(gkb==49?7:(gkb==120?8:(gkb==115?9:(gkb==119?10:(gkb==50?11:(gkb==99?12:(gkb==100?13:(gkb==101?14:(gkb==51?15:(gkb==118?16:(gkb==102?17:(gkb==114?18:(gkb==52?19:(gkb==98?20:(gkb==103?21:(gkb==116?22:(gkb==53?23:(gkb==110?24:(gkb==104?25:(gkb==122?26:(gkb==54?27:(gkb==109?28:(gkb==106?29:(gkb==117?30:(gkb==55?31:(gkb==44?32:(gkb==107?33:(gkb==105?34:(gkb==56?35:(gkb==46?36:(gkb==108?37:(gkb==111?38:(gkb==57?39:(gkb==45?40:(gkb==-10?41:(gkb==112?42:(gkb==48?43:(gkb==-28?44:(gkb==-4?45:(gkb==-33?46:(gkb==35?47:(gkb==43?48:(gkb==-76?49:0)))))))))))))))))))))))))))))))))))))))))))))))))
schedkwhen ka,0,1,4,0,0,ka
endin

instr 3
ka=(gkb==32?.01:(gkb==45?1:(gkb==-60?2:(gkb==35?3:(gkb==46?4:(gkb==-42?5:(gkb==-36?6:(gkb==43?7:(gkb==44?8:(gkb==76?9:(gkb==80?10:(gkb==-33?11:(gkb==77?12:(gkb==75?13:(gkb==79?14:(gkb==48?15:(gkb==78?16:(gkb==74?17:(gkb==73?18:(gkb==57?19:(gkb==66?20:(gkb==72?21:(gkb==85?22:(gkb==56?23:(gkb==86?24:(gkb==71?25:(gkb==90?26:(gkb==55?27:(gkb==67?28:(gkb==70?29:(gkb==84?30:(gkb==54?31:(gkb==88?32:(gkb==68?33:(gkb==82?34:(gkb==53?35:(gkb==89?36:(gkb==83?37:(gkb==69?38:(gkb==52?39:(gkb==60?40:(gkb==65?41:(gkb==87?42:(gkb==51?43:(gkb==81?44:(gkb==50?45:(gkb==9?46:(gkb==49?47:(gkb==94?48:0)))))))))))))))))))))))))))))))))))))))))))))))))
schedkwhen ka,0,1,4,0,0,ka
endin

instr 4
schedule 5,0,-1,p4
endin

instr 5
kf=p4*gkf*12.13
kl linsegr 0,.06,1,.6,.6,1,.3,.2,0
kff=kf/150
ar oscbnk kf,.1,kff,.1,20,0,.5,1,4,6,124,kf*1.9,kf*8.1,1.5,1.9,1.2,1.3,0,1,2,3,4,5,6
;oscillator bank opcode (changing the parameters change the sound, see documentation): ar oscbnk kcps, kamd, kfmd, kpmd, iovrlap, iseed, kl1minf, kl1maxf, kl2minf, kl2maxf, ilfomode, keqminf, keqmaxf, keqminl, keqmaxl, keqminq, keqmaxq, ieqmode, kfn [, il1fn] [, il2fn] [, ieqffn] [, ieqlfn] [, ieqqfn]
ar=ar*gka*kl*800
ar clip ar,1,32000
out ar
endin
</CsInstruments>

<CsScore>
f1 0 65536 10 9 4 6 3 3 4 1 3 2 0 1 1 0 1 0 1 0 1 ;change the numbers for changing the sound - partial no. 1 has relative strength 100 %, written down as nine (for convenience only one-digit numbers are used)
f2 0 4096 10 1
f3 0 4096 10 1 .6 .4
f4 0 1025 5 1 512 1 512 2
f5 0 1025 5 1 512 2 512 1
f6 0 1025 5 2 512 1 512 2
i1 0 1800
i2 0 1800
</CsScore>
</CsoundSynthesizer>
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Flex
post Aug 31, 2007, 08:28 AM
Post #3


God
******

Group: Basic Member
Posts: 1954
Joined: Oct 17, 2006
From: Bay area CA
Member No.: 5877



I don't get it??? Just use protools and record midi then add whatever samples you want to it...
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
electric
post Aug 31, 2007, 10:37 AM
Post #4


Newbie
*

Group: Basic Member
Posts: 37
Joined: Aug 27, 2007
From: Central Europe
Member No.: 12368



Sure, that's another way of making music. But with csound you can do everything you want, including live performances with real-time manipulation of all incoming sound. You can sit on the computer, the rest of the band is playing, and you can process each microphone individually, any way you wish. You certainly can also mix in samples, live, by pressing a key or clicking on a button, plus processing this sample, be it by on-screen controllers, or be it with a midi mixer. (A hardware sliderbank with up to 64 controls you plug into the midi port.) You certainly can also plug in a midi keyboard and use it for controlling the program. (For example, the program can bend the incoming signals, allowing you to play on different scales.)

The possibilities you have are simply much more than with a sound editor, only it's a bit of an effort to learn. (Though, for certain kinds of work a sound editor is preferable.)

Here's another example. It's the same keyboard as above, only instead of an oscillator bank it uses granular synthesis. When you start the program you get a window where you first set the parameters with sliders, then you can play. You also can change the parameters whilst a note is playing. But for the program to receive a keystroke the terminal has to be the front window.

It's recommended to name the file keybfof.csd or simply kbfof.csd



<CsoundSynthesizer>
<CsOptions>
csound -d -o devaudio -b 4096
</CsOptions>

<CsInstruments>
sr=44100
FLcolor 160,200,250
FLpanel " ",1000,1054,0,0
FLcolor 230,220,140,170,180,140
gihandle0 FLvalue " ", 60,20,100,30
gihandle1 FLvalue " ", 60,20,200,30
gihandle2 FLvalue " ", 60,20,300,30
gihandle3 FLvalue " ", 60,20,400,30
gihandle4 FLvalue " ", 60,20,500,30
gihandle5 FLvalue " ", 60,20,600,30
gihandle6 FLvalue " ", 60,20,700,30
gk1,gihan1 FLslider "freq 1",8,1,0,2,gihandle0,50,700,100,100
gk2,gihan1 FLslider "freq 2",8,1,0,2,gihandle1,50,700,200,100
gkoct,gihan2 FLslider "octaviation",4,0,0,2,gihandle2,50,700,300,100
gkband,gihan3 FLslider "bandwidth",.15,.01,0,2,gihandle3,50,700,400,100
gkdur,gihan4 FLslider "dur",.05,.005,0,2,gihandle4,50,700,500,100
gkris,gihan5 FLslider "rise",.02,.0005,0,2,gihandle5,50,700,600,100
gkdec,gihan6 FLslider "dec",.02,.0005,0,2,gihandle6,50,700,700,100
FLpanelEnd
FLrun

instr 1
gkb sensekey
gka init 2
gka=(gkb==127?gka+1:(gkb==10?gka-1:gka))
gka=(gka>5?5:(gka<1?1:gka))
gkf init 1
gkf=(gkb==1?.25:(gkb==19?.5:(gkb==4?1:(gkb==6?2:(gkb==7?4:(gkb==8?8:gkf))))))
gkt init 1
gkt=(gkb==47?1:(gkb==42?2:gkt))
endin

instr 2
if (gkt==1) then
ka=(gkb==32?.01:(gkb==60?2:(gkb==9?3:(gkb==121?4:(gkb==97?5:(gkb==113?6:(gkb==49?7:(gkb==120?8:(gkb==115?9:(gkb==119?10:(gkb==50?11:(gkb==99?12:(gkb==100?13:(gkb==101?14:(gkb==51?15:(gkb==118?16:(gkb==102?17:(gkb==114?18:(gkb==52?19:(gkb==98?20:(gkb==103?21:(gkb==116?22:(gkb==53?23:(gkb==110?24:(gkb==104?25:(gkb==122?26:(gkb==54?27:(gkb==109?28:(gkb==106?29:(gkb==117?30:(gkb==55?31:(gkb==44?32:(gkb==107?33:(gkb==105?34:(gkb==56?35:(gkb==46?36:(gkb==108?37:(gkb==111?38:(gkb==57?39:(gkb==45?40:(gkb==-10?41:(gkb==112?42:(gkb==48?43:(gkb==-28?44:(gkb==-4?45:(gkb==-33?46:(gkb==35?47:(gkb==43?48:(gkb==-76?49:0)))))))))))))))))))))))))))))))))))))))))))))))))
schedkwhen ka,0,1,4,0,0,ka*gkf
endif
endin

instr 3
if (gkt==2) then
ka=(gkb==32?.01:(gkb==45?1:(gkb==-60?2:(gkb==35?3:(gkb==46?4:(gkb==-42?5:(gkb==-36?6:(gkb==43?7:(gkb==44?8:(gkb==76?9:(gkb==80?10:(gkb==-33?11:(gkb==77?12:(gkb==75?13:(gkb==79?14:(gkb==48?15:(gkb==78?16:(gkb==74?17:(gkb==73?18:(gkb==57?19:(gkb==66?20:(gkb==72?21:(gkb==85?22:(gkb==56?23:(gkb==86?24:(gkb==71?25:(gkb==90?26:(gkb==55?27:(gkb==67?28:(gkb==70?29:(gkb==84?30:(gkb==54?31:(gkb==88?32:(gkb==68?33:(gkb==82?34:(gkb==53?35:(gkb==89?36:(gkb==83?37:(gkb==69?38:(gkb==52?39:(gkb==60?40:(gkb==65?41:(gkb==87?42:(gkb==51?43:(gkb==81?44:(gkb==50?45:(gkb==9?46:(gkb==49?47:(gkb==94?48:0)))))))))))))))))))))))))))))))))))))))))))))))))
schedkwhen ka,0,1,4,0,0,ka*gkf
endif
endin

instr 4
schedule 5,0,-1,p4
endin

instr 5
ifreq=p4*12.13
kl linsegr 0,.05,1,.3,.8,.1,0

kf1=gk1*ifreq
kf2=gk2*ifreq
kb1=gkband*kf1
kb2=gkband*kf2
a1 fof 6000,ifreq,kf1,gkoct,kb1,gkdur,gkris,gkdec,100000,1,2,40
a2 fof 6000,ifreq,kf2,gkoct,kb2,gkdur,gkris,gkdec,100000,1,2,40

ar=a1+a2
ar=ar*gka*kl
ar clip ar,1,32000
out ar
endin
</CsInstruments>

<CsScore>
f1 0 65536 10 1
f2 0 16384 19 1 1 270 1
i1 0 1800
i2 0 1800
i3 0 1800
</CsScore>
</CsoundSynthesizer>
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Flex
post Aug 31, 2007, 10:41 AM
Post #5


God
******

Group: Basic Member
Posts: 1954
Joined: Oct 17, 2006
From: Bay area CA
Member No.: 5877



Seems impractical to me... That is the point of a mixing board.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
electric
post Aug 31, 2007, 10:52 AM
Post #6


Newbie
*

Group: Basic Member
Posts: 37
Joined: Aug 27, 2007
From: Central Europe
Member No.: 12368



No, it's quite practical. You can even make a program where the computer is playing itself, and provided you put enough artificial intelligence into it, the results should sound quite fine. And you can make him react to your own input any way you wish. Easiest example would be to use a pitchtracker and make him accompany your singing with chords, of any complexity, like an orchestra.

It's just a great difference between being a user of standard software and making software yourself. Besides, it trains your intelligence, and since computers are a very important cultural aspect of our time, the ability to code is a facet of cultural competence, and in the future will be even more so.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
electric
post Aug 31, 2007, 11:57 AM
Post #7


Newbie
*

Group: Basic Member
Posts: 37
Joined: Aug 27, 2007
From: Central Europe
Member No.: 12368



And since granular synthesis is such a fascinating thing I'd like to add another example, a more complex one.

Also mea culpa that these programs are written in a sloppy fashion, I haven't used good variable names, and no comments, but I made them only for finding out how the opcodes sound and thought I woudn't show them anyone else.

With this one it seems you have to first move all sliders (at least the buggy one, but I don't know which it is) before you press any key, but then it should work.

It could be called kbgrain3.csd



<CsoundSynthesizer>
<CsOptions>
csound -d -o devaudio -b 2048
</CsOptions>

<CsInstruments>
sr=44100
FLcolor 160,200,250
FLpanel " ",1000,1054,0,0
FLcolor 230,220,140,170,180,140
gihandle0 FLvalue " ", 60,20,700,30
gihandle1 FLvalue " ", 60,20,300,30
gihandle2 FLvalue " ", 60,20,400,30
gihandle3 FLvalue " ", 60,20,200,30
gihandle4 FLvalue " ", 60,20,500,30
gihandle5 FLvalue " ", 60,20,600,30
gihandle6 FLvalue " ", 60,20,100,30
gkphs,gihan0 FLslider "grain phase",1,0,0,2,gihandle0,50,700,700,100
gkfmd,gihan1 FLslider "freq var",1,0,0,2,gihandle1,50,700,300,100
gkpmd,gihan2 FLslider "phase var",1,0,0,2,gihandle2,50,700,400,100
gkdur,gihan3 FLslider "dur",.2,.001,-1,2,gihandle3,50,700,200,100
gkfrpow,gihan4 FLslider "freq distr",2,-2,0,2,gihandle4,50,700,500,100
gkprpow,gihan5 FLslider "phase distr",2,-2,0,2,gihandle5,50,700,600,100
gkdens,gihan6 FLslider "density",4000,10,-1,2,gihandle6,50,700,100,100
FLpanelEnd
FLrun

instr 1
gkb sensekey
gka init 2
gka=(gkb==127?gka+1:(gkb==10?gka-1:gka))
gka=(gka>5?5:(gka<1?1:gka))
gkf init 1
gkf=(gkb==1?.25:(gkb==19?.5:(gkb==4?1:(gkb==6?2:(gkb==7?4:(gkb==8?8:gkf))))))
gkt init 1
gkt=(gkb==47?1:(gkb==42?2:gkt))
endin

instr 2
if (gkt==1) then
ka=(gkb==32?.01:(gkb==60?2:(gkb==9?3:(gkb==121?4:(gkb==97?5:(gkb==113?6:(gkb==49?7:(gkb==120?8:(gkb==115?9:(gkb==119?10:(gkb==50?11:(gkb==99?12:(gkb==100?13:(gkb==101?14:(gkb==51?15:(gkb==118?16:(gkb==102?17:(gkb==114?18:(gkb==52?19:(gkb==98?20:(gkb==103?21:(gkb==116?22:(gkb==53?23:(gkb==110?24:(gkb==104?25:(gkb==122?26:(gkb==54?27:(gkb==109?28:(gkb==106?29:(gkb==117?30:(gkb==55?31:(gkb==44?32:(gkb==107?33:(gkb==105?34:(gkb==56?35:(gkb==46?36:(gkb==108?37:(gkb==111?38:(gkb==57?39:(gkb==45?40:(gkb==-10?41:(gkb==112?42:(gkb==48?43:(gkb==-28?44:(gkb==-4?45:(gkb==-33?46:(gkb==35?47:(gkb==43?48:(gkb==-76?49:0)))))))))))))))))))))))))))))))))))))))))))))))))
schedkwhen ka,0,1,4,0,0,ka*gkf
endif
endin

instr 3
if (gkt==2) then
ka=(gkb==32?.01:(gkb==45?1:(gkb==-60?2:(gkb==35?3:(gkb==46?4:(gkb==-42?5:(gkb==-36?6:(gkb==43?7:(gkb==44?8:(gkb==76?9:(gkb==80?10:(gkb==-33?11:(gkb==77?12:(gkb==75?13:(gkb==79?14:(gkb==48?15:(gkb==78?16:(gkb==74?17:(gkb==73?18:(gkb==57?19:(gkb==66?20:(gkb==72?21:(gkb==85?22:(gkb==56?23:(gkb==86?24:(gkb==71?25:(gkb==90?26:(gkb==55?27:(gkb==67?28:(gkb==70?29:(gkb==84?30:(gkb==54?31:(gkb==88?32:(gkb==68?33:(gkb==82?34:(gkb==53?35:(gkb==89?36:(gkb==83?37:(gkb==69?38:(gkb==52?39:(gkb==60?40:(gkb==65?41:(gkb==87?42:(gkb==51?43:(gkb==81?44:(gkb==50?45:(gkb==9?46:(gkb==49?47:(gkb==94?48:0)))))))))))))))))))))))))))))))))))))))))))))))))
schedkwhen ka,0,1,4,0,0,ka*gkf
endif
endin

instr 4
schedule 5,0,-1,p4
endin

instr 5
kfreq=p4*12.13
kl linsegr 0,.05,1,.3,.8,.1,0
kfmd=gkfmd*kfreq
ar grain3 kfreq,gkphs,kfmd,gkpmd,gkdur,gkdens,5000,1,2,gkfrpow,gkprpow
ar=ar*gka*kl*5000
ar clip ar,1,32000
out ar
endin
</CsInstruments>

<CsScore>
f1 0 65536 10 1 .5 .25 .125
f2 0 16384 19 1 1 270 1
i1 0 1800
i2 0 1800
i3 0 1800
</CsScore>
</CsoundSynthesizer>
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
electric
post Sep 01, 2007, 12:45 AM
Post #8


Newbie
*

Group: Basic Member
Posts: 37
Joined: Aug 27, 2007
From: Central Europe
Member No.: 12368



Here's a pair of programs which allows you to craft chords and replay them by pushing one button.
If you fire up the first program you'll get six sliders and six counters for setting the amplitudes and frequencies of the components of the chord.
There's a checkbox on top. If you click it the chord will get stored in a file called snap.txt.
(You have to click, then wait until the counter reacts, then click again, or it will store the same chord more than once.)
You can store up to 96 chords, and on the buttonbank of chordplay they will appear in the order as recorded,
from top left downwards one column after the other.

The csound files could be called chordrec.csd and chordplay.csd


<CsoundSynthesizer>

<CsOptions>
csound -d -o devaudio
</CsOptions>

<CsInstruments>
sr=44100
FLcolor 100,200,200
FLpanel " ",1280,1024,0,0
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1

gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1

gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1

gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1

gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1

gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1

gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1

gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1

gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1

gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1
gkfake gifake FLbutton " ",1,0,2,5,5,1150,800,-1

gihand1 FLvalue " ",1,1,0,0
FLcolor 170,210,230
gkfreq1 gihandle7 FLcount " ",6,64,1,4,1,200,40,510,210,-1,0
gkfreq2 gihandle7 FLcount " ",6,64,1,4,1,200,40,510,260,-1,0
gkfreq3 gihandle7 FLcount " ",6,64,1,4,1,200,40,510,310,-1,0
gkfreq4 gihandle7 FLcount " ",6,64,1,4,1,200,40,510,360,-1,0
gkfreq5 gihandle7 FLcount " ",6,64,1,4,1,200,40,510,410,-1,0
gkfreq6 gihandle7 FLcount " ",6,64,1,4,1,200,40,510,460,-1,0
FLcolor 170,210,140,210,230,150
gkamp1 gihan FLslider " ",1,10000,0,1,gihand1,200,40,190,210
gkamp2 gihan FLslider " ",1,10000,0,1,gihand1,200,40,190,260
gkamp3 gihan FLslider " ",1,10000,0,1,gihand1,200,40,190,310
gkamp4 gihan FLslider " ",1,10000,0,1,gihand1,200,40,190,360
gkamp5 gihan FLslider " ",1,10000,0,1,gihand1,200,40,190,410
gkamp6 gihan FLslider " ",1,10000,0,1,gihand1,200,40,190,460

FLcolor 200,190,160
gktrig gihan FLbutton " ",1,0,2,50,50,270,90,-1
giprint FLvalue " ",50,20,270,70
FLpanelEnd
FLrun
gkind init 0
instr 1
ibase=12.13
a1 poscil gkamp1,ibase*gkfreq1, 1
a2 poscil gkamp1,ibase*gkfreq1+.5, 1
a3 poscil gkamp1,ibase*gkfreq1+1.3, 1
a4 poscil gkamp1, ibase*gkfreq1+3.2,1
a5 poscil gkamp2*2,ibase*gkfreq2, 1
a6 poscil gkamp2,ibase*gkfreq2+.71, 1
a7 poscil gkamp2,ibase*gkfreq2+1.62, 1
a8 poscil gkamp2, ibase*gkfreq2+3.73,1
a9 poscil gkamp3,ibase*gkfreq3, 1
a10 poscil gkamp3,ibase*gkfreq3+.64, 1
a11 poscil gkamp3,ibase*gkfreq3+1.45, 1
a12 poscil gkamp3, ibase*gkfreq3+3.46,1
a13 poscil gkamp4,ibase*gkfreq4, 1
a14 poscil gkamp4,ibase*gkfreq4+.87, 1
a15 poscil gkamp4,ibase*gkfreq4+1.98, 1
a16 poscil gkamp4, ibase*gkfreq4+3.69,1
a17 poscil gkamp5,ibase*gkfreq5, 1
a18 poscil gkamp5,ibase*gkfreq5+.43, 1
a19 poscil gkamp5,ibase*gkfreq5+1.34, 1
a20 poscil gkamp5, ibase*gkfreq5+3.15,1
a21 poscil gkamp6,ibase*gkfreq6, 1
a22 poscil gkamp6,ibase*gkfreq6+.96, 1
a23 poscil gkamp6,ibase*gkfreq6+1.57, 1
a24 poscil gkamp6, ibase*gkfreq6+3.98,1
ar=a1+a2+a3+a4+a5+a6+a7+a8+a9+a10+a11+a12+a13+a14+a15+a16+a17+a18+a19+a20+a21+a22+a23+a24
ar=ar/4
ar clip ar,1,32000
out ar
schedkwhen gktrig,1.5,1,2,0,.1,gkind
endin
instr 2
FLprintk2 p4+1,giprint
inum, inums FLsetsnap p4
FLsavesnap "snap.txt"
gkind=gkind+1
turnoff
endin
</CsInstruments>

<CsScore>

;f 1 0 65536 9 1 9 0 2 9 0 3 6 0 4 6 0 5 5 0 6 5 0 7 3 0 8 3 0 9 2 0 10 1 0 11 1 0 12 1 0 13 1 0 14 1 0 15 2 0 16 1 0 17 1 0 18 1 0 19 1 0 20 1 0 21 1 0 22 1 0 23 1 0 24 1 0 25 2 0 26 1 0 27 1 0
f 1 0 65536 10 9 8 7 6 5 4 3 2 1
i1 0 1800
</CsScore>

</CsoundSynthesizer>


=================================================0
(end of file)
=================================================0


<CsoundSynthesizer>

<CsOptions>
csound -d -o devaudio
</CsOptions>

<CsInstruments>
sr=44100
FLcolor 180,200,140
FLpanel " ",1280,1024,0,0
FLtabs 1270,1000,5,24
FLcolor2 150,200,180
FLgroup " ",1280,980,0,44,4
FLcolor 150,210,180
gk0 gihan FLbutton " ",1,0,2,80,60,330,160,-1
gk1 gihan FLbutton " ",1,0,2,80,60,330,220,-1
gk2 gihan FLbutton " ",1,0,2,80,60,330,280,-1
FLcolor 230,120,120
gk3 gihan FLbutton " ",1,0,2,80,60,330,340,-1
FLcolor 230,180,110
gk4 gihan FLbutton " ",1,0,2,80,60,330,400,-1
gk5 gihan FLbutton " ",1,0,2,80,60,330,460,-1
gk6 gihan FLbutton " ",1,0,2,80,60,330,520,-1
gk7 gihan FLbutton " ",1,0,2,80,60,330,580,-1
FLcolor 230,120,120
gk8 gihan FLbutton " ",1,0,2,80,60,330,640,-1
FLcolor 150,210,180
gk9 gihan FLbutton " ",1,0,2,80,60,330,700,-1
gk10 gihan FLbutton " ",1,0,2,80,60,330,760,-1
gk11 gihan FLbutton " ",1,0,2,80,60,330,820,-1

gk12 gihan FLbutton " ",1,0,2,80,60,410,160,-1
FLcolor 140,210,220
gk13 gihan FLbutton " ",1,0,2,80,60,410,220,-1
gk14 gihan FLbutton " ",1,0,2,80,60,410,280,-1
FLcolor 230,120,160
gk15 gihan FLbutton " ",1,0,2,80,60,410,340,-1
FLcolor 230,200,90
gk16 gihan FLbutton " ",1,0,2,80,60,410,400,-1
FLcolor 240,220,130
gk17 gihan FLbutton " ",1,0,2,80,60,410,460,-1
gk18 gihan FLbutton " ",1,0,2,80,60,410,520,-1
FLcolor 230,200,90
gk19 gihan FLbutton " ",1,0,2,80,60,410,580,-1
FLcolor 230,120,160
gk20 gihan FLbutton " ",1,0,2,80,60,410,640,-1
FLcolor 140,210,220
gk21 gihan FLbutton " ",1,0,2,80,60,410,700,-1
gk22 gihan FLbutton " ",1,0,2,80,60,410,760,-1
FLcolor 150,210,180
gk23 gihan FLbutton " ",1,0,2,80,60,410,820,-1

FLcolor 160,180,250
gk24 gihan FLbutton " ",1,0,2,80,60,490,160,-1
FLcolor 140,180,210
gk25 gihan FLbutton " ",1,0,2,80,60,490,220,-1
gk26 gihan FLbutton " ",1,0,2,80,60,490,280,-1
gk27 gihan FLbutton " ",1,0,2,80,60,490,340,-1
FLcolor 180,230,160
gk28 gihan FLbutton " ",1,0,2,80,60,490,400,-1
FLcolor 200,200,200
gk29 gihan FLbutton " ",1,0,2,80,60,490,460,-1
gk30 gihan FLbutton " ",1,0,2,80,60,490,520,-1
FLcolor 180,230,160
gk31 gihan FLbutton " ",1,0,2,80,60,490,580,-1
FLcolor 140,180,210
gk32 gihan FLbutton " ",1,0,2,80,60,490,640,-1
gk33 gihan FLbutton " ",1,0,2,80,60,490,700,-1
gk34 gihan FLbutton " ",1,0,2,80,60,490,760,-1
FLcolor 160,180,250
gk35 gihan FLbutton " ",1,0,2,80,60,490,820,-1

FLcolor 240,160,190
gk36 gihan FLbutton " ",1,0,2,80,60,570,160,-1
gk37 gihan FLbutton " ",1,0,2,80,60,570,220,-1
FLcolor 230,180,230
gk38 gihan FLbutton " ",1,0,2,80,60,570,280,-1
FLcolor 200,220,120
gk39 gihan FLbutton " ",1,0,2,80,60,570,340,-1
gk40 gihan FLbutton " ",1,0,2,80,60,570,400,-1
FLcolor 180,160,220
gk41 gihan FLbutton " ",1,0,2,80,60,570,460,-1
gk42 gihan FLbutton " ",1,0,2,80,60,570,520,-1
FLcolor 200,220,120
gk43 gihan FLbutton " ",1,0,2,80,60,570,580,-1
gk44 gihan FLbutton " ",1,0,2,80,60,570,640,-1
FLcolor 230,180,230
gk45 gihan FLbutton " ",1,0,2,80,60,570,700,-1
FLcolor 240,160,190
gk46 gihan FLbutton " ",1,0,2,80,60,570,760,-1
gk47 gihan FLbutton " ",1,0,2,80,60,570,820,-1

gk48 gihan FLbutton " ",1,0,2,80,60,650,160,-1
gk49 gihan FLbutton " ",1,0,2,80,60,650,220,-1
FLcolor 230,180,230
gk50 gihan FLbutton " ",1,0,2,80,60,650,280,-1
FLcolor 200,220,120
gk51 gihan FLbutton " ",1,0,2,80,60,650,340,-1
gk52 gihan FLbutton " ",1,0,2,80,60,650,400,-1
FLcolor 180,160,220
gk53 gihan FLbutton " ",1,0,2,80,60,650,460,-1
gk54 gihan FLbutton " ",1,0,2,80,60,650,520,-1
FLcolor 200,220,120
gk55 gihan FLbutton " ",1,0,2,80,60,650,580,-1
gk56 gihan FLbutton " ",1,0,2,80,60,650,640,-1
FLcolor 230,180,230
gk57 gihan FLbutton " ",1,0,2,80,60,650,700,-1
FLcolor 240,160,190
gk58 gihan FLbutton " ",1,0,2,80,60,650,760,-1
gk59 gihan FLbutton " ",1,0,2,80,60,650,820,-1

FLcolor 160,180,250
gk60 gihan FLbutton " ",1,0,2,80,60,730,160,-1
FLcolor 140,180,210
gk61 gihan FLbutton " ",1,0,2,80,60,730,220,-1
gk62 gihan FLbutton " ",1,0,2,80,60,730,280,-1
gk63 gihan FLbutton " ",1,0,2,80,60,730,340,-1
FLcolor 180,230,160
gk64 gihan FLbutton " ",1,0,2,80,60,730,400,-1
FLcolor 200,200,200
gk65 gihan FLbutton " ",1,0,2,80,60,730,460,-1
gk66 gihan FLbutton " ",1,0,2,80,60,730,520,-1
FLcolor 180,230,160
gk67 gihan FLbutton " ",1,0,2,80,60,730,580,-1
FLcolor 140,180,210
gk68 gihan FLbutton " ",1,0,2,80,60,730,640,-1
gk69 gihan FLbutton " ",1,0,2,80,60,730,700,-1
gk70 gihan FLbutton " ",1,0,2,80,60,730,760,-1
FLcolor 160,180,250
gk71 gihan FLbutton " ",1,0,2,80,60,730,820,-1

FLcolor 150,210,180
gk72 gihan FLbutton " ",1,0,2,80,60,810,160,-1
FLcolor 140,210,220
gk73 gihan FLbutton " ",1,0,2,80,60,810,220,-1
gk74 gihan FLbutton " ",1,0,2,80,60,810,280,-1
FLcolor 230,120,160
gk75 gihan FLbutton " ",1,0,2,80,60,810,340,-1
FLcolor 230,200,90
gk76 gihan FLbutton " ",1,0,2,80,60,810,400,-1
FLcolor 240,220,130
gk77 gihan FLbutton " ",1,0,2,80,60,810,460,-1
gk78 gihan FLbutton " ",1,0,2,80,60,810,520,-1
FLcolor 230,200,90
gk79 gihan FLbutton " ",1,0,2,80,60,810,580,-1
FLcolor 230,120,160
gk80 gihan FLbutton " ",1,0,2,80,60,810,640,-1
FLcolor 140,210,220
gk81 gihan FLbutton " ",1,0,2,80,60,810,700,-1
gk82 gihan FLbutton " ",1,0,2,80,60,810,760,-1
FLcolor 150,210,180
gk83 gihan FLbutton " ",1,0,2,80,60,810,820,-1

gk84 gihan FLbutton " ",1,0,2,80,60,890,160,-1
gk85 gihan FLbutton " ",1,0,2,80,60,890,220,-1
gk86 gihan FLbutton " ",1,0,2,80,60,890,280,-1
FLcolor 230,120,120
gk87 gihan FLbutton " ",1,0,2,80,60,890,340,-1
FLcolor 230,180,110
gk88 gihan FLbutton " ",1,0,2,80,60,890,400,-1
gk89 gihan FLbutton " ",1,0,2,80,60,890,460,-1
gk90 gihan FLbutton " ",1,0,2,80,60,890,520,-1
gk91 gihan FLbutton " ",1,0,2,80,60,890,580,-1
FLcolor 230,120,120
gk92 gihan FLbutton " ",1,0,2,80,60,890,640,-1
FLcolor 150,210,180
gk93 gihan FLbutton " ",1,0,2,80,60,890,700,-1
gk94 gihan FLbutton " ",1,0,2,80,60,890,760,-1
gk95 gihan FLbutton " ",1,0,2,80,60,890,820,-1

FLgroupEnd
FLcolor2 150,180,210
FLgroup " ",1270,980,5,44,4
gihand1 FLvalue " ",1,1,0,0
FLcolor 170,210,230
gkfreq1 gihandle7 FLcount " ",6,64,1,4,1,200,40,510,210,-1,0
gkfreq2 gihandle7 FLcount " ",6,64,1,4,1,200,40,510,260,-1,0
gkfreq3 gihandle7 FLcount " ",6,64,1,4,1,200,40,510,310,-1,0
gkfreq4 gihandle7 FLcount " ",6,64,1,4,1,200,40,510,360,-1,0
gkfreq5 gihandle7 FLcount " ",6,64,1,4,1,200,40,510,410,-1,0
gkfreq6 gihandle7 FLcount " ",6,64,1,4,1,200,40,510,460,-1,0
FLcolor 170,210,140,210,230,150
gkamp1 gihan FLslider " ",1,10000,0,1,gihand1,200,40,190,210
gkamp2 gihan FLslider " ",1,10000,0,1,gihand1,200,40,190,260
gkamp3 gihan FLslider " ",1,10000,0,1,gihand1,200,40,190,310
gkamp4 gihan FLslider " ",1,10000,0,1,gihand1,200,40,190,360
gkamp5 gihan FLslider " ",1,10000,0,1,gihand1,200,40,190,410
gkamp6 gihan FLslider " ",1,10000,0,1,gihand1,200,40,190,460

FLcolor 200,190,160
gktrig gihan FLbutton " ",1,0,2,50,50,270,90,-1
giprint FLvalue " ",50,20,270,70
FLgroupEnd
FLtabsEnd
FLpanelEnd
FLloadsnap "snap.txt"
FLrun
instr 1
ibase=12.13
a1 poscil gkamp1,ibase*gkfreq1, 1
a2 poscil gkamp1,ibase*gkfreq1+.5, 1
a3 poscil gkamp1,ibase*gkfreq1+1.3, 1
a4 poscil gkamp1, ibase*gkfreq1+3.2,1
a5 poscil gkamp2*2,ibase*gkfreq2, 1
a6 poscil gkamp2,ibase*gkfreq2+.71, 1
a7 poscil gkamp2,ibase*gkfreq2+1.62, 1
a8 poscil gkamp2, ibase*gkfreq2+3.73,1
a9 poscil gkamp3,ibase*gkfreq3, 1
a10 poscil gkamp3,ibase*gkfreq3+.64, 1
a11 poscil gkamp3,ibase*gkfreq3+1.45, 1
a12 poscil gkamp3, ibase*gkfreq3+3.46,1
a13 poscil gkamp4,ibase*gkfreq4, 1
a14 poscil gkamp4,ibase*gkfreq4+.87, 1
a15 poscil gkamp4,ibase*gkfreq4+1.98, 1
a16 poscil gkamp4, ibase*gkfreq4+3.69,1
a17 poscil gkamp5,ibase*gkfreq5, 1
a18 poscil gkamp5,ibase*gkfreq5+.43, 1
a19 poscil gkamp5,ibase*gkfreq5+1.34, 1
a20 poscil gkamp5, ibase*gkfreq5+3.15,1
a21 poscil gkamp6,ibase*gkfreq6, 1
a22 poscil gkamp6,ibase*gkfreq6+.96, 1
a23 poscil gkamp6,ibase*gkfreq6+1.57, 1
a24 poscil gkamp6, ibase*gkfreq6+3.98,1
ar=a1+a2+a3+a4+a5+a6+a7+a8+a9+a10+a11+a12+a13+a14+a15+a16+a17+a18+a19+a20+a21+a22+a23+a24
ar=ar/4
ar clip ar,1,32000
out ar
schedkwhen gk0,0,1,2,0,0
schedkwhen gk1,0,1,3,0,0
schedkwhen gk2,0,1,4,0,0
schedkwhen gk3,0,1,5,0,0
schedkwhen gk4,0,1,6,0,0
schedkwhen gk5,0,1,7,0,0
schedkwhen gk6,0,1,8,0,0
schedkwhen gk7,0,1,9,0,0
schedkwhen gk8,0,1,10,0,0
schedkwhen gk9,0,1,11,0,0
schedkwhen gk10,0,1,12,0,0
schedkwhen gk11,0,1,13,0,0
schedkwhen gk12,0,1,14,0,0
schedkwhen gk13,0,1,15,0,0
schedkwhen gk14,0,1,16,0,0
schedkwhen gk15,0,1,17,0,0
schedkwhen gk16,0,1,18,0,0
schedkwhen gk17,0,1,19,0,0
schedkwhen gk18,0,1,20,0,0
schedkwhen gk19,0,1,21,0,0
schedkwhen gk20,0,1,22,0,0
schedkwhen gk21,0,1,23,0,0
schedkwhen gk22,0,1,24,0,0
schedkwhen gk23,0,1,25,0,0
schedkwhen gk24,0,1,26,0,0
schedkwhen gk25,0,1,27,0,0
schedkwhen gk26,0,1,28,0,0
schedkwhen gk27,0,1,29,0,0
schedkwhen gk28,0,1,30,0,0
schedkwhen gk29,0,1,31,0,0
schedkwhen gk30,0,1,32,0,0
schedkwhen gk31,0,1,33,0,0
schedkwhen gk32,0,1,34,0,0
schedkwhen gk33,0,1,35,0,0
schedkwhen gk34,0,1,36,0,0
schedkwhen gk35,0,1,37,0,0
schedkwhen gk36,0,1,38,0,0
schedkwhen gk37,0,1,39,0,0
schedkwhen gk38,0,1,40,0,0
schedkwhen gk39,0,1,41,0,0
schedkwhen gk40,0,1,42,0,0
schedkwhen gk41,0,1,43,0,0
schedkwhen gk42,0,1,44,0,0
schedkwhen gk43,0,1,45,0,0
schedkwhen gk44,0,1,46,0,0
schedkwhen gk45,0,1,47,0,0
schedkwhen gk46,0,1,48,0,0
schedkwhen gk47,0,1,49,0,0
schedkwhen gk48,0,1,50,0,0
schedkwhen gk49,0,1,51,0,0
schedkwhen gk50,0,1,52,0,0
schedkwhen gk51,0,1,53,0,0
schedkwhen gk52,0,1,54,0,0
schedkwhen gk53,0,1,55,0,0
schedkwhen gk54,0,1,56,0,0
schedkwhen gk55,0,1,57,0,0
schedkwhen gk56,0,1,58,0,0
schedkwhen gk57,0,1,59,0,0
schedkwhen gk58,0,1,60,0,0
schedkwhen gk59,0,1,61,0,0
schedkwhen gk60,0,1,62,0,0
schedkwhen gk61,0,1,63,0,0
schedkwhen gk62,0,1,64,0,0
schedkwhen gk63,0,1,65,0,0
schedkwhen gk64,0,1,66,0,0
schedkwhen gk65,0,1,67,0,0
schedkwhen gk66,0,1,68,0,0
schedkwhen gk67,0,1,69,0,0
schedkwhen gk68,0,1,70,0,0
schedkwhen gk69,0,1,71,0,0
schedkwhen gk70,0,1,72,0,0
schedkwhen gk71,0,1,73,0,0
schedkwhen gk72,0,1,74,0,0
schedkwhen gk73,0,1,75,0,0
schedkwhen gk74,0,1,76,0,0
schedkwhen gk75,0,1,77,0,0
schedkwhen gk76,0,1,78,0,0
schedkwhen gk77,0,1,79,0,0
schedkwhen gk78,0,1,80,0,0
schedkwhen gk79,0,1,81,0,0
schedkwhen gk80,0,1,82,0,0
schedkwhen gk81,0,1,83,0,0
schedkwhen gk82,0,1,84,0,0
schedkwhen gk83,0,1,85,0,0
schedkwhen gk84,0,1,86,0,0
schedkwhen gk85,0,1,87,0,0
schedkwhen gk86,0,1,88,0,0
schedkwhen gk87,0,1,89,0,0
schedkwhen gk88,0,1,90,0,0
schedkwhen gk89,0,1,91,0,0
schedkwhen gk90,0,1,92,0,0
schedkwhen gk91,0,1,93,0,0
schedkwhen gk92,0,1,94,0,0
schedkwhen gk93,0,1,95,0,0
schedkwhen gk94,0,1,96,0,0
schedkwhen gk95,0,1,97,0,0
endin
instr 2
inum FLgetsnap 0
endin
instr 3
inum FLgetsnap 1
endin
instr 4
inum FLgetsnap 2
endin
instr 5
inum FLgetsnap 3
endin
instr 6
inum FLgetsnap 4
endin
instr 7
inum FLgetsnap 5
endin
instr 8
inum FLgetsnap 6
endin
instr 9
inum FLgetsnap 7
endin
instr 10
inum FLgetsnap 8
endin
instr 11
inum FLgetsnap 9
endin
instr 12
inum FLgetsnap 10
endin
instr 13
inum FLgetsnap 11
endin
instr 14
inum FLgetsnap 12
endin
instr 15
inum FLgetsnap 13
endin
instr 16
inum FLgetsnap 14
endin
instr 17
inum FLgetsnap 15
endin
instr 18
inum FLgetsnap 16
endin
instr 19
inum FLgetsnap 17
endin
instr 20
inum FLgetsnap 18
endin
instr 21
inum FLgetsnap 19
endin
instr 22
inum FLgetsnap 20
endin
instr 23
inum FLgetsnap 21
endin
instr 24
inum FLgetsnap 22
endin
instr 25
inum FLgetsnap 23
endin
instr 26
inum FLgetsnap 24
endin
instr 27
inum FLgetsnap 25
endin
instr 28
inum FLgetsnap 26
endin
instr 29
inum FLgetsnap 27
endin
instr 30
inum FLgetsnap 28
endin
instr 31
inum FLgetsnap 29
endin
instr 32
inum FLgetsnap 30
endin
instr 33
inum FLgetsnap 31
endin
instr 34
inum FLgetsnap 32
endin
instr 35
inum FLgetsnap 33
endin
instr 36
inum FLgetsnap 34
endin
instr 37
inum FLgetsnap 35
endin
instr 38
inum FLgetsnap 36
endin
instr 39
inum FLgetsnap 37
endin
instr 40
inum FLgetsnap 38
endin
instr 41
inum FLgetsnap 39
endin
instr 42
inum FLgetsnap 40
endin
instr 43
inum FLgetsnap 41
endin
instr 44
inum FLgetsnap 42
endin
instr 45
inum FLgetsnap 43
endin
instr 46
inum FLgetsnap 44
endin
instr 47
inum FLgetsnap 45
endin
instr 48
inum FLgetsnap 46
endin
instr 49
inum FLgetsnap 47
endin
instr 50
inum FLgetsnap 48
endin
instr 51
inum FLgetsnap 49
endin
instr 52
inum FLgetsnap 50
endin
instr 53
inum FLgetsnap 51
endin
instr 54
inum FLgetsnap 52
endin
instr 55
inum FLgetsnap 53
endin
instr 56
inum FLgetsnap 54
endin
instr 57
inum FLgetsnap 55
endin
instr 58
inum FLgetsnap 56
endin
instr 59
inum FLgetsnap 57
endin
instr 60
inum FLgetsnap 58
endin
instr 61
inum FLgetsnap 59
endin
instr 62
inum FLgetsnap 60
endin
instr 63
inum FLgetsnap 61
endin
instr 64
inum FLgetsnap 62
endin
instr 65
inum FLgetsnap 63
endin
instr 66
inum FLgetsnap 64
endin
instr 67
inum FLgetsnap 65
endin
instr 68
inum FLgetsnap 66
endin
instr 69
inum FLgetsnap 67
endin
instr 70
inum FLgetsnap 68
endin
instr 71
inum FLgetsnap 69
endin
instr 72
inum FLgetsnap 70
endin
instr 73
inum FLgetsnap 71
endin
instr 74
inum FLgetsnap 72
endin
instr 75
inum FLgetsnap 73
endin
instr 76
inum FLgetsnap 74
endin
instr 77
inum FLgetsnap 75
endin
instr 78
inum FLgetsnap 76
endin
instr 79
inum FLgetsnap 77
endin
instr 80
inum FLgetsnap 78
endin
instr 81
inum FLgetsnap 79
endin
instr 82
inum FLgetsnap 80
endin
instr 83
inum FLgetsnap 81
endin
instr 84
inum FLgetsnap 82
endin
instr 85
inum FLgetsnap 83
endin
instr 86
inum FLgetsnap 84
endin
instr 87
inum FLgetsnap 85
endin
instr 88
inum FLgetsnap 86
endin
instr 89
inum FLgetsnap 87
endin
instr 90
inum FLgetsnap 88
endin
instr 91
inum FLgetsnap 89
endin
instr 92
inum FLgetsnap 90
endin
instr 93
inum FLgetsnap 91
endin
instr 94
inum FLgetsnap 92
endin
instr 95
inum FLgetsnap 93
endin
instr 96
inum FLgetsnap 94
endin
instr 97
inum FLgetsnap 95
endin
</CsInstruments>

<CsScore>

;f 1 0 65536 9 1 9 0 2 9 0 3 6 0 4 6 0 5 5 0 6 5 0 7 3 0 8 3 0 9 2 0 10 1 0 11 1 0 12 1 0 13 1 0 14 1 0 15 2 0 16 1 0 17 1 0 18 1 0 19 1 0 20 1 0 21 1 0 22 1 0 23 1 0 24 1 0 25 2 0 26 1 0 27 1 0
f 1 0 65536 10 9 8 7 6 5 4 3 2 1
i1 0 1800
</CsScore>

</CsoundSynthesizer>
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
lucid_dream
post Sep 01, 2007, 09:30 AM
Post #9


God
******

Group: Admin
Posts: 1711
Joined: Jan 20, 2004
Member No.: 956



http://en.wikipedia.org/wiki/Csound

sounds kind of interesting and I will give a try later today, though programming music seems to take the fun out of playing it.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
electric
post Sep 01, 2007, 11:13 AM
Post #10


Newbie
*

Group: Basic Member
Posts: 37
Joined: Aug 27, 2007
From: Central Europe
Member No.: 12368



Yeah, I think that too. That's why I'm not so interested in making artificial intelligence music. But you can craft some really fine instruments, and playing with them is lots of fun.
(I'll still have a few programs to post, maybe the next one tomorrow, so if you 're not so keen about programming you can use them.)
Btw, I prefer singing and playing the drum over sitting on the computer, but my ears also love to hear rich sound, so as long as I'm alone in making music I have to do both, I guess.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
electric
post Sep 02, 2007, 02:06 AM
Post #11


Newbie
*

Group: Basic Member
Posts: 37
Joined: Aug 27, 2007
From: Central Europe
Member No.: 12368



Here's a rather simple one, it's for scratching with the mouse. You don't scratch on music like analog vinyl scratching or their digital counterparts but on two steady sounds stored in their tables, constructed from partials, and the two sounds get mixed according to the vertical position of the mouse pointer.
You can use any of the mouse keys, and there's a trick if you have a cordless one. You click, remove the battery while click is held, then release the click, then put the battery in again, and the click should be locked, allowing to scratch without having to press the clicker. (At least it works with my Logitech one.)
I like the sound of scratching because you can make a close imitation of the human voice without having the characteristics of consonants which associate to meaning.


<CsoundSynthesizer>
<CsOptions>
csound -d -o devaudio -B2048
</CsOptions>

<CsInstruments>
sr=44100
kr=4410
FLcolor 200,140,150,250,250,100
FLpanel " ",1280,1024,0,0
iha1 FLvalue " ",0,0,400,20
iha2 FLvalue " ",0,0,500,20
gkx,gkg,ih1,ih2 FLjoy " ",1,65536,1,0,0,0,iha1,iha2,1200,900,40,50
FLpanelEnd
FLrun

instr 1
kg1=gkg
kg2=1-kg1
kx lineto gkx,.05
kxx port kx,.02
ax interp kxx
a1 tablei ax,1,0,0,1 ;ifn,ixmode,ioffs,iwrap
a2 tablei ax,2,0,0,1
ar=a1*kg1+a2*kg2
ar=ar*12000
ar clip ar,1,32000
out ar
endin
</CsInstruments>

<CsScore>
; change the following two tables for changing the sound - partial number, amplitude, phaseshift
f1 0 65536 9 128 1 0 140 1 0 150 1 0 160 1 0 170 1 0 180 1 0 260 1 0 300 1 0 400 1 0 450 1 0 500 1 0 600 1 0 700 1 0
f2 0 65536 9 96 1 0 100 1 0 108 1 0 200 1 0 140 1 0 240 1 0
i1 0 300
</CsScore>
</CsoundSynthesizer>
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
electric
post Sep 03, 2007, 12:58 AM
Post #12


Newbie
*

Group: Basic Member
Posts: 37
Joined: Aug 27, 2007
From: Central Europe
Member No.: 12368



Here's a final example of the power of Csound. I just tried to get it working but it fails, however, on my old Debian 3.1. it worked just fine. Maybe it needs some adjustment, or there's some other minor problem, or it works on any computer except mine.

Here what the program does. You need two short soundfiles (a few seconds length is sufficient), then you perform a FFT (fast fourier transform) to have the information in the frequency domain (usually it's stored in the time domain, in .wav or any other format). Then you have two sliders on the bottom where you can move the pointers to any place within the soundfiles. There's a big joysticklike control in the middle, on both sides there are two sliders to control the amp and freq gain of the two soundfiles. The joystick then controls the amount of cross-synthesis. (In fact, this tool mixes two sounds, with many many possibilities to control the interpolation.)

There's another joystick control up right, this is a filter which is applied after the mix is done. It's a very nice filter, for more detail see documentation. (I suggest the Alternative Csound Reference Manual.) (Here an excerpt of the description:
svfilter is a second order state-variable filter, with k-rate controls for cutoff frequency and Q. As Q is increased, a resonant peak forms around the cutoff frequency. svfilter has simultaneous lowpass, highpass, and bandpass filter outputs; by mixing the outputs together, a variety of frequency responses can be generated. The state-variable filter, or "multimode" filter was a common feature in early analog synthesizers, due to the wide variety of sounds available from the interaction between cutoff, resonance, and output mix ratios. svfilter is well suited to the emulation of "analog" sounds, as well as other applications where resonant filters are called for.

To get it working, you first need two soundfiles, let's say a.wav and b.wav. (Am not sure whether the .wav works, perhaps you need .aiff.)

Then you do
pvanal a.wav a.pv
pvanal b.wav b.pv

In order to have the correct length of the soundfile on the pointer-slider you need to fill in the lengths in the program file. I'm not really sure which numbers to use, I think it was number of samples/1000.

Then you fire up the main program. Have fun.

I'm not going to post more programs since I have a very old computer and it made no sense to get into making complex code since it wouldn't work. But I guess I've shown some interesting examples of what you can do with such a great thing as this Csound is. (Although it seems kind of impractical for the visually oriented.)


<CsoundSynthesizer>
<CsOptions>
csound -d -o devaudio -b4096
</CsOptions>
<CsInstruments>
sr=44100
kr=441
FLcolor 160,190,100,130,150,220
FLpanel "SOUNDHAMMER",1280,1024,0,0
FLlabel 14,4,0,130,60,80
gihandle1 FLvalue " ", 36,20,1202,420
gihandle2 FLvalue " ", 45,20,40,905
gihandle3 FLvalue " ", 45,20,40,60
gihandle12 FLvalue " ", 45,20,40,130
gihandle4 FLvalue " ", 0,0,42,210
gihandle5 FLvalue " ", 45,20,130,310
gihandle6 FLvalue " ", 45,20,40,985
gihandle7 FLvalue " ", 0,0,950,10
gihandle7a FLvalue " ",0,0,900,10
gihandle8 FLvalue " ", 45,20,800,310
gihandle9 FLvalue " ", 0,0,900,210
gihandle10 FLvalue " ", 0,0,225,790
gihandle11 FLvalue " ", 0,0,720,790
gk1,gihan1 FLslider "pitch",2,.25,0,2,gihandle1,40,330,1200,450
gk2,gihan1 FLslider " ",0,1,0,1,gihandle2,1200,50,40,850
gk4,gihan1 FLslider "ampscale",15,0,0,2,gihandle4,45,430,40,340
gk5,gihan1 FLslider "freqscale",2,0,0,2,gihandle5,45,430,130,340
gk6,gihan1 FLslider "position",0,1,0,1,gihandle6,1200,50,40,930
gk8,gihan1 FLslider "freqscale",2,0,0,2,gihandle8,45,430,800,340
gk9,gihan1 FLslider "ampscale",15,0,0,2,gihandle9,45,430,900,340
gk3,gihan1 FLslider "freq",50,5000,-1,1,gihandle3,650,30,40,20
gk12,gihan1 FLslider "Q",1,500,-1,1,gihandle12,650,30,40,90
FLcolor 240,190,100,230,250,120
gk7, gk7a,gih,gih FLjoy "lowXhigh...Yband",0,1,1,0,0,0,gihandle7,gihandle7a,440,290,800,10
FLcolor 190,190,100,250,230,180
gk10,gk11,gihan1,gihan1 FLjoy "amp X Y freq",0,1,1,0,0,0,gihandle10,gihandle11,530,530,225,240
FLpanelEnd
FLrun
instr 1

ilena=19 ;enter size of file a.wav
ilenb=10 ;enter size of file b.wav

ilen1=ilena/680
ilen2=ilenb/680
pvbufread gk6*ilen2,"pvb.pv"
gk1 init 1
ao pvinterp gk2*ilen1,gk1,"pva.pv",gk8,gk5,gk9,gk4,gk11,gk10
gk3 init 100
gk12 init 1
a1,a2,a3 svfilter ao,gk3,gk12
a1 balance a1,ao
a2 balance a2,ao
a3 balance a3,ao
ar=gk7*a2*(1-gk7a)+(1-gk7)*(1-gk7a)*a1+gk7a*a3
ar clip ar,1,32000
out ar
endin
</CsInstruments>
<CsScore>
f1 0 65536 9 1 1 0
f2 0 512 7 0 256 1 256 1
i1 0 1800
</CsScore>
</CsoundSynthesizer>
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 19th November 2017 - 02:28 AM


Home     |     About     |    Research     |    Forum     |    Feedback  


Copyright BrainMeta. All rights reserved.
Terms of Use  |  Last Modified Tue Jan 17 2006 12:39 am

Consciousness Expansion · Brain Mapping · Neural Circuits · Connectomics  ·  Neuroscience Forum  ·  Brain Maps Blog
 · Connectomics · Connectomics  ·  shawn mikula  ·  shawn mikula  ·  articles