Tha basic of SuperBasic

Anything QL Software or Programming Related.
User avatar
Bubu
Bent Pin Expansion Port
Posts: 92
Joined: Sat Dec 06, 2014 2:07 am
Location: Seville (Spain)

Tha basic of SuperBasic

Post by Bubu »

Hi there!!!

Now as I have my QL working, I'd like to start having fun with it trying SuperBasic commands as color changing, sounds, plots and draws, loops, microdrive instructions, and so on. Where could I find a "SuperBasic for dummies"?

Cheers!


If something works... DON'T TOUCH IT!!! AT ALL!!!
RWAP
RWAP Master
Posts: 2892
Joined: Sun Nov 28, 2010 4:51 pm
Location: Stone, United Kingdom
Contact:

Re: Tha basic of SuperBasic

Post by RWAP »

The beginner's guide section of the QL user manual is a good start.

Some of the QL Series of books by Hutchinson can be quite good for starters, but contain a LOT of repetition.

Have a look at the books on the QL Wiki - http://www.rwapadventures.com/ql_wiki/i ... g=en#toc_2

I have some of those listed on sellmyretro :)


User avatar
ql_freak
Gold Card
Posts: 479
Joined: Sun Jan 18, 2015 1:29 am

Re: Tha basic of SuperBasic

Post by ql_freak »

Just found that since November 2014 Jan Jones (programmer of Ql SuperBASIC) "QL SuperBASIC - The Definitive Handbook" is now again available on Amazon for the Kindle


http://peter-sulzer.bplaced.net
GERMAN! QL-Download page also available in English: GETLINE$() function, UNIX-like "ls" command, improved DIY-Toolkit function EDLINE$ - All with source. AND a good Python 3 Tutorial (German) for Win/UNIX :-)
Derek_Stewart
Font of All Knowledge
Posts: 4668
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: Tha basic of SuperBasic

Post by Derek_Stewart »

Hi,

For most of the QL related documentation goto: http://www.dilwyn.me.uk/docs/index.html

Which is probably the best resource for QL manuals and beinners info'

There is a return QL guide: http://www.dilwyn.me.uk/gen/backtoql/backtoql.html

Probably worth a look.


Regards,

Derek
User avatar
Bubu
Bent Pin Expansion Port
Posts: 92
Joined: Sat Dec 06, 2014 2:07 am
Location: Seville (Spain)

Re: Tha basic of SuperBasic

Post by Bubu »

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?


If something works... DON'T TOUCH IT!!! AT ALL!!!
User avatar
ql_freak
Gold Card
Posts: 479
Joined: Sun Jan 18, 2015 1:29 am

Re: Tha basic of SuperBasic

Post by ql_freak »

100 FILL 1: REMark 1 = ON
110 INK 3
120 CIRCLE 50,50,20
130 FILL 0: REMark 0 = OFF
140 INK 7
150 CIRCLE 50,85,10


http://peter-sulzer.bplaced.net
GERMAN! QL-Download page also available in English: GETLINE$() function, UNIX-like "ls" command, improved DIY-Toolkit function EDLINE$ - All with source. AND a good Python 3 Tutorial (German) for Win/UNIX :-)
User avatar
Bubu
Bent Pin Expansion Port
Posts: 92
Joined: Sat Dec 06, 2014 2:07 am
Location: Seville (Spain)

Re: Tha basic of SuperBasic

Post by Bubu »

I'm going right now to try it, ql_freak, thanx!!

And then, any basic tutorial or so in internet to learn the basic? If not, I'll do one for this site, but first I'd need to learn :-D


If something works... DON'T TOUCH IT!!! AT ALL!!!
Derek_Stewart
Font of All Knowledge
Posts: 4668
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: Tha basic of SuperBasic

Post by Derek_Stewart »

Hi,

Goto http://www.dilwyn.me.uk/

You find alot of information with regards to QL Programming.


Regards,

Derek
User avatar
Bubu
Bent Pin Expansion Port
Posts: 92
Joined: Sat Dec 06, 2014 2:07 am
Location: Seville (Spain)

Re: Tha basic of SuperBasic

Post by Bubu »

I've found this reference:

http://www.rwapsoftware.co.uk/SBASIC_re ... al_online/

It's got everything ;-)


If something works... DON'T TOUCH IT!!! AT ALL!!!
User avatar
dilwyn
Mr QL
Posts: 3057
Joined: Wed Dec 01, 2010 10:39 pm

Re: Tha basic of SuperBasic

Post by dilwyn »

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


Post Reply