home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga MA Magazine 1998 #3
/
amigamamagazinepolishissue1998.iso
/
maksiu
/
utils
/
eaissue3b.lha
/
Source_Code
/
AK_VUmeter_Cross.AMOS
/
AK_VUmeter_Cross.amosSourceCode
Wrap
AMOS Source Code
|
1995-12-30
|
3KB
|
135 lines
Dim P(31)
Global SETTING,P()
F$=Fsel$("","","Select a Pro/Sound/Noise","Tracker module to use")
If F$="" : Edit : End If
If Exist(F$)
Track Load F$,3 : Track Play 3
Track Loop On : Led Off
Else
Edit
End If
Proc PREPARE
Do
Proc _VU5[200]
Loop
Procedure PREPARE
Load "EAIssue3a:Data/VU_Cross",8 : Unpack 8 To 4 : For N=0 To 31 : Colour N,0 : Next N
End Proc
Procedure _VU5[SETTING]
TLP=0 : Hide On
G=Rnd(3)
If G=0
DAT2:
Data $0,$FFF,$EEE,$DDD,$CCC,$BBB,$AAA,$999,$FFF,$EEE,$DDD,$CCC
Data $BBB,$AAA,$999,$999,$888,$666,$555,$444,$222,$333,$999
Data $888,$777,$666,$555,$444,$333,$58C,$BB0,$99F
Restore DAT2 : For OO=0 To 31 : Read P(OO) : Next OO
End If
If G=1
DAT3:
Data $0,$49,$3A,$3B,$2C,$1D,$1E,$F,$FFF,$EEE,$DDD,$CCC,$BBB
Data $AAA,$999,$999,$888,$666,$555,$444,$222,$333,$900,$A00
Data $B00,$C00,$D00,$E00,$F00,$58C,$BB0,$99F
Restore DAT3 : For OO=0 To 31 : Read P(OO) : Next OO
End If
If G=2
DAT4:
Data $0,$999,$888,$777,$666,$555,$444,$333,$999,$888,$777,$666
Data $555,$444,$333,$999,$888,$777,$666,$555,$444,$333,$999
Data $888,$777,$666,$555,$444,$333,$58C,$BB0,$99F
Restore DAT4 : For OO=0 To 31 : Read P(OO) : Next OO
End If
If G=3
DAT5:
Data $0,$900,$A00,$B00,$C00,$D00,$E00,$F00,$90,$A0,$B0,$C0
Data $D0,$E0,$F0,$990,$AA0,$BB0,$CC0,$DD0,$EE0,$FF0,$49,$3A
Data $3B,$2C,$1D,$1E,$F,$58C,$BB0,$99F
Restore DAT5 : For OO=0 To 31 : Read P(OO) : Next OO
End If
For N=0 To 31 : Colour N,0 : Next N
Wait Vbl : Screen To Front 4 : Screen Show 4
Do
Gosub ACQUIRE
If TLP=>SETTING*2 : Exit : End If
Inc TLP
Loop
Pop Proc
ACQUIRE:
A=(Vumeter(0))+1 : CH1=0 : B=(Vumeter(1))+1 : CH2=0
C=(Vumeter(2))+1 : CH3=0 : D=(Vumeter(3))+1 : CH4=0
If A>A1 Then A1=A
If A>A1 Then CH1=1
If B>B1 Then B1=B
If B>B1 Then CH2=1
If C>C1 Then C1=C
If C>C1 Then CH3=1
If D>D1 Then D1=D
If D>D1 Then CH4=1
If CH1=0 Then A1=A1-1
If CH2=0 Then B1=B1-1
If CH3=0 Then C1=C1-1
If CH4=0 Then D1=D1-1
If A1<0 Then A1=0
If B1<0 Then B1=0
If C1<0 Then C1=0
If D1<0 Then D1=0
OO=1
P=A1/10 : If A1=>62 : P=7 : End If : Gosub _DRAW1
P=B1/10 : If B1=>62 : P=7 : End If : Gosub _DRAW2
P=C1/10 : If C1=>62 : P=7 : End If : Gosub _DRAW3
P=D1/10 : If D1=>62 : P=7 : End If : Gosub _DRAW4
Return
_DRAW1:
If P=0 : Colour 1,0 : End If
If P>0
For N=1 To P : Colour N,P(N) : Next N
If P<7 : For N=P+1 To 7 : Colour N,0 : Next N : End If
End If
Return
_DRAW2:
If P=0 : Colour 8,0 : End If
If P>0
For N=1 To P : Colour N+7,P(N+7) : Next N
If P<7 : For N=7+(P+1) To 13 : Colour N,0 : Next N : End If
End If
Return
_DRAW3:
If P=0 : Colour 15,0 : End If
If P>0
For N=1 To P : Colour N+14,P(N+14) : Next N
If P<7 : For N=14+(P+1) To 20 : Colour N,0 : Next N : End If
End If
Return
_DRAW4:
If P=0 : Colour 22,0 : End If
If P>0
For N=1 To P : Colour N+21,P(N+21) : Next N
If P<7 : For N=21+(P+1) To 27 : Colour N,0 : Next N : End If
End If
Return
End Proc