Bubu wrote:I still haven't found what I needed... i.e. if I wanted to draw a circle and fill it with a color, how should I do it? And if I wanted to play 3 notes (C, D, E), how is it?
Music (or as close as the QL gets) is programmed using BEEP commands. It can be difficult to relate BEEP command parameters to musical notes and note durations, so I suggest this article to help you work out the values needed:
http://www.dilwyn.me.uk/docs/articles/beeps.pdf
The Sound page on my website
http://www.dilwyn.me.uk/sound/index.html contains some programs which might help too. Try Composer, for example, whih is written in BASIC and lets you compose music. Or Sounder by Peter Hale, also written in BASIC.
PlayMusic by Mark Swift shows how to store notes to play in DATA statements.
Somewhere in the Turbo compiler demo routines there is a little routine by Simon N Goodwin to play musical tunes. Since compiled BASIC can be multi-tasking, music and sound effect routines can be compiled using Turbo or QLiberator) to play background music. The only thing is that the QL has no volume control so short of modifying the QL hardware to add some form of volume control, probably stuffing a sock around the beeper is as close to a volume control as we'll get!
Since notes made by BEEP continue to be played in the background, but there is no buffering system, you'll need to make sure that the first note is complete before the second starts otherwise the second deletes the first. I suggest use of the BEEPING function like this (untested):
Code: Select all
REPeat playing
REPeat waiting : IF NOT BEEPING THEN EXIT waiting
REM duration and pitch values can be stored in DATA statements
BEEP duration,pitch
END REPeat playing
There are a few QL books available as PDFs here (scroll down page to BOOKS section):
http://sinclairql.speccy.org/archivo/docs/docs.htm
There's a list of QL books published here, although most are not available to download it should help you keep an eye out for second hand books to watch out for on websites
http://www.worldofspectrum.org/books.html. ANother list of books here, with some cover pictures
http://www.dilwyn.me.uk/gen/books/books.html. From time to time, QL books come up for sale on sites like SellMyRetro.com and eBay of course.
As an example, here's the Sinclair QL User Guide by Lionel Fleetwood (not the user guide supplied with the QL, this is a separate book) on SellMyRetro.com
http://www.sellmyretro.com/offer/detail ... twood-3836 or a book called Good Programming With QL SuperBASIC
http://www.sellmyretro.com/offer/detail ... BASIC-4094. Both (at the time of writing) going for only £1.99