;Written by Iain McCurdy, 2010

<CsoundSynthesizer>

<CsOptions>
-odevaudio -b200 -M0 -+rtmidi=virtual
</CsOptions>

<CsInstruments>

sr		=	44100
kr		=	441
ksmps		=	100
nchnls		=	2
0dbfs		=	1

gisine		ftgen	3, 0, 4096, 10, 1

		FLpanel	"FLkybd", 1280, 240, 0,0
FLvkeybd "", 1280, 240, 0, 0

		FLpanelEnd	;END OF PANEL CONTENTS

FLcolor	255, 255, 255, 0, 0, 0		
;INSTRUCTIONS AND INFO PANEL                 WIDTH | HEIGHT | X | Y
				FLpanel	" ", 500,     220,    0, 290
;TEXT BOXES												TYPE | FONT | SIZE | WIDTH | HEIGHT | X | Y
ih		 	FLbox  	"                            FLkybd                           ", 	1,      5,     14,    490,    15,     5,  0
ih		 	FLbox  	"-------------------------------------------------------------", 	1,      5,     14,    490,    15,     5,  20
ih		 	FLbox  	"FLkybd can be used to create an FLTK keyboard widget that    ", 	1,      5,     14,    490,    15,     5,  40
ih		 	FLbox  	"functions in a similar fashion to the virtual keyboard (but  ", 	1,      5,     14,    490,    15,     5,  60
ih		 	FLbox  	"without the continuous controllers).                         ", 	1,      5,     14,    490,    15,     5,  80
ih		 	FLbox  	"The command line flags '-M(number)' and '-+rtmidi=virtual'   ", 	1,      5,     14,    490,    15,     5, 100
ih		 	FLbox  	"are still required.                                          ", 	1,      5,     14,    490,    15,     5, 120
ih		 	FLbox  	"The advantages of using FLkybd over the virtual device is    ", 	1,      5,     14,    490,    15,     5, 140
ih		 	FLbox  	"that FLkybd can be embedded within an FL panel along with    ", 	1,      5,     14,    490,    15,     5, 160
ih		 	FLbox  	"other widgets and it can be resized, as this example         ", 	1,      5,     14,    490,    15,     5, 180
ih		 	FLbox  	"demonstrates.                                                ", 	1,      5,     14,    490,    15,     5, 200

		FLrun		;RUN THE WIDGET THREAD

instr	1
	icps	cpsmidi
	iamp	ampmidi	1
	aenv	linsegr	0,0.01,1,0.01,0
	a1	oscil	0.1*aenv*iamp, icps, gisine
	outs	a1, a1 
endin

</CsInstruments>

<CsScore>
f 0 3600
</CsScore>

</CsoundSynthesizer>