08.04.2013 Views

Amiga Computing - Commodore Is Awesome

Amiga Computing - Commodore Is Awesome

Amiga Computing - Commodore Is Awesome

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

1In the last part of this<br />

guide to multimedia,<br />

Phil South looks at<br />

animated buttons<br />

and sounds<br />

happen by using the mouse, and now<br />

L ast well month look we at making talked about buttons making onimate things so<br />

IIMED that the user gets a bit of feedback for his<br />

mouse click.<br />

You'd be surprised how many Amos programs<br />

omit any kind of feedback, that is to say a visual or<br />

audible cue to confirm that a mouse click has been<br />

mode and accepted. If you make your buttons with<br />

Amos drawing commands this couldn't be easier.<br />

let's take our example program from last time and<br />

odd animated buttons<br />

keserve lone 3<br />

Set Zone 1,10,10 To 30,10 Set Zone 2,35,10 To 51,30<br />

Set Zone 3,60,10 To 80,30<br />

Curs Off : Cts 0<br />

Ink 2 : Bar 10,10 To 30,30<br />

Ink 1 : Bar 12,12 To 30,30<br />

Ink 7 : Bar 12,12 To 21,28<br />

Ink 2 : Bar 15,10 To 55,30<br />

Ink 8 ; Bar 37,12 To 55,30<br />

Ink 7 : Bar 37,12 To 53,28<br />

Ink 2 : Dar 60,10 To 80,10<br />

1<br />

Ink 8 : Bar 62,12 To 80,10<br />

Ink 7 : Bar 62,12 To 71,28<br />

Pen 2 : Paper 4 : locate 0,8 : Print "Ctiek tke<br />

dove buttons to sake a noise.'<br />

Do<br />

SOUND SENSE<br />

Its tempting to use the built-in sounds for oil your Amos programs, mostly<br />

because the sounds ore right there and the commands are simple<br />

Type BOOM, BELL or SHOOT and you are there I olways use them in examples<br />

because they are so easy, but you can odd other sounds to Amos very<br />

easily.<br />

Sound sampling has always been an easy technology on the Amigo. Most<br />

of the hardware you need to grab sounds is built in to the system, and with<br />

the addition of a simple I/O box you can sample 8-bit sound into the <strong>Amiga</strong><br />

directly. To use your own samples, like a button on o computer keyboard<br />

being pressed, you hove to pock the samples into a sample bank (Amos Bank<br />

or ABK file), which can be loaded into an Amos program From where the<br />

samples can be played bock at any time in the program using the SAM PLAY<br />

command. Using:<br />

SAN PLAY 1<br />

for example, you will play the first sample in the bank. For really interesting<br />

multimedia with the minimum of sounds you should steal a trick from the<br />

arcade game coders and ploy back a sound at different speeds, thereby doubling<br />

and tripling the amounts of uses you can put a single sample to Use<br />

the<br />

SAN PLAT 15,1,1000<br />

Formal where 15 • maximum number of voices for best sound quality, 1 •<br />

sample name from the bank, and 1000 • samples per second, with 1000<br />

being around the lowest and 30000 or more being the highest. The only way<br />

to tell what different speeds will do to your samples is to try it and see. You'll<br />

be surprised at the amount of ideas this will give you.<br />

-;antatiatiNIMININIT<br />

1<br />

1<br />

AMIGA 1 COMPUTING<br />

1MAY<br />

1996<br />

-v<br />

i<br />

t<br />

a<br />

r<br />

t<br />

3<br />

PP<br />

Loot<br />

Perfect<br />

buttons<br />

AMOS Professional Sample Bank Maker<br />

Version 1.141<br />

By Francois Lionet<br />

Copyright 1992 Europress Software Ltd.<br />

Nouse Zone<br />

CnNouse Ctick<br />

If Col and 2.2 Then Boos<br />

If Ces0 and 1.3 Then Shoot<br />

The basic listing sets up the zones and senses<br />

when a mouse dick has occurred. This time if we<br />

reverse the white and dark grey colours on the<br />

button it'll seem as though the button has been<br />

inverted.<br />

So for each button we need to do a redraw each<br />

time the button is activated So after the button is<br />

pressed we redraw it with the colours reversed,<br />

wait for half a second, and then redraw them the<br />

way they were, as in this example for the first<br />

button<br />

47P Mgt7ONNI=18777.1.111MININ,<br />

Bank: not named<br />

Nom Name Bytes<br />

'4 567<br />

9<br />

.113<br />

2<br />

11!<br />

Empty<br />

ur„ 1 , 1 4 L I<br />

APAOS's sa mple e ditor is not the be st the re e ve r wa s but it is, a t le a st, inte gra te d<br />

into the progra mming e nvironme nt, ma king it e a sie r to incorpora te sa mple d<br />

sound into your multime dia production<br />

IT co(' and 241 Then Bell Ink A: Sir 10,10 To<br />

30,30 : Ink 2 : Bar 12,12 To 30,30 : Ink 7 : Bar<br />

12,12 To 28,28 : Wait 25 : Ink 2 : Bar 10,10 To<br />

30,30 ; Ink 8 : Bar 12,12 To 30,30 : Ink 7 : Dar<br />

12,12 To 28,28<br />

We only reverse the white (colour 2) and the dark<br />

grey (colour 8) colours and leave the body of the<br />

button (colour 7) as it is. After o wait of 25 clicks<br />

(half a second in new money) we redraw the button<br />

the way it was, as if the button pops down for a<br />

second and then pops up again.<br />

It's easy to rewrite all this information onto the end<br />

of the line as you simply do a block copy and paste<br />

with the code from the original lines which drew<br />

the buttons in the first place. This saves having to<br />

laboriously retype all the data for the buttons, but it<br />

also avoids any mistakes in the data if it is identical.<br />

USE YOUR INTUITION<br />

One last thing I've reviewed o lot of extension add'<br />

ins for Amos over the years which make the program<br />

access the Intuition libraries. Don't neglect Intuitionbased<br />

programs in your search for the perfect multimedia<br />

app. One such extension is reviewed in this<br />

very issue, in fact) Multimedia doesn't hove to be<br />

carried out on custom screens using Amos, but can<br />

be made perfectly transparently with Intuition, and<br />

sound samples and other additional multimedia bits<br />

con be added. If you are really clever you can even<br />

interface the <strong>Amiga</strong> with other devices to make your<br />

<strong>Amiga</strong> truly multimedia, But that's up la you and<br />

how much code bonging you want to get involved<br />

in. All the relevant data for taking this further is in<br />

the Amos manuals and the various hardware<br />

reference works.<br />

Back to our normal transmissions next month<br />

when we'll be learning how to make Amos do all<br />

sorts of clever tricks again. I'll be delving into my<br />

Amos notebooks to remind you of a few little tricks<br />

which are not in the manuals and showing you easy<br />

r± : • 7-1I1W51.11M111111MINIC' "111.1.11.11r18.1<br />

ways to make tricky things possible, See you then, orni<br />

1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!