Microsoft Small Basic

Program Listing: ZMN750-0
' program Yvan Leduc
' Sept 18 th 2016
' Macrophotography slides show with 2 music song in asynchrome LD mode
' program no: ZMN750-0
' all photography in this slides show by the Author Yvan Leduc, all right reserved 2016
' modification by Nonki Takahashi, Sept 18th 2016, opacity algorhytm section.
' with the help of LitDev for the asynchrome mode LDCALLAsync
' version no :


init_photos()
GraphicsWindow.Top = 0
GraphicsWindow.Left = 0
GraphicsWindow.width = 1366
GraphicsWindow.height = 768
GraphicsWindow.BackgroundColor="black"
GraphicsWindow.fontname="Comic sans MS"
GraphicsWindow.brushcolor="gray"
GraphicsWindow.fontsize="16"
GraphicsWindow.DrawBoundText( 950,275,300"Photography by Yvan Leduc 2016")
GraphicsWindow.brushcolor="white"
GraphicsWindow.fontsize="30"

playing = "True"
LDCall.CallComplete = OnCallComplete1
song1 = LDCall.CallAsync("","","","FurElise","")
'
For i = 1 To 17
image2=image
image=Shapes.AddImage(url[i])
title2=title
title=shapes.addtext("")
Shapes.SetText(title,txt[i])

' _______________ this section modified and improve by Nonki Takahashi ____________________
For op= 1 to 100
Shapes.Move(image,75,0)
Shapes.setOpacity(image,op)
Shapes.setOpacity(title,op)
op2 = 100 - op
Shapes.setOpacity(image2,op2)
Shapes.setOpacity(title2,op2)
Program.Delay(25)
Shapes.Move(title,900,200)
endfor

Program.Delay(3000)
EndFor

While playing
Program.Delay(100)
EndWhile
GraphicsWindow.fontsize="66"
GraphicsWindow.drawboundtext(900,300,500," The End")

' ___________________this section is LitDev idea and algorhytm ________________________________________

Sub OnCallComplete1
song2 = LDCall.CallAsync("","","","Carulli","")
LDCall.CallComplete = OnCallComplete2
EndSub

Sub oncallcomplete2
playing = "False"
EndSub

'____________________________________________________________________________________________________________




Sub init_photos
url[1]="https://s3.amazonaws.com/storage.filemobile.com/storage/26879792/1551"
txt[1]= "Mantis head"

url[2]="https://s3.amazonaws.com/storage.filemobile.com/storage/26820510/1551"
txt[2]= "Bee collecting pollen"

url[3]="https://s3.amazonaws.com/storage.filemobile.com/storage/26820376/1551"
txt[3]= "Damselfly Blue Eyes"

url[4]="https://s3.amazonaws.com/storage.filemobile.com/storage/26715151/1551"
txt[4]= "Eastern Blue Butterfly"

url[5]="https://s3.amazonaws.com/storage.filemobile.com/storage/26855935/1551"
txt[5]= "Mantis , Mantidea"

url[6]="https://s3.amazonaws.com/storage.filemobile.com/storage/26814772/1551"
txt[6]="Black-yellow garden Spider"

url[7]="https://s3.amazonaws.com/storage.filemobile.com/storage/26362722/1551"
txt[7]= "Bumbble Bee"

url[8]="https://s3.amazonaws.com/storage.filemobile.com/storage/26781814/1551"
txt[8]= "Red Dragonfly"

url[9]="https://s3.amazonaws.com/storage.filemobile.com/storage/26492038/1551"
txt[9]= "Bee on Asclepias flower"


url[10]="https://s3.amazonaws.com/storage.filemobile.com/storage/26472615/1551"
txt[10]= "LadyBug"

url[11]="https://s3.amazonaws.com/storage.filemobile.com/storage/26624897/1551"
txt[11]="The Eastern Black Swallowtail"

url[12]="https://s3.amazonaws.com/storage.filemobile.com/storage/26321249/1551"
txt[12]= "double wing Dragonfly"

url[13]="https://s3.amazonaws.com/storage.filemobile.com/storage/27043692/1551"
txt[13]= "GrassHopper head close-up."

url[14]="https://s3.amazonaws.com/storage.filemobile.com/storage/27044058/1551"
txt[14]= "Eastern tailed blue butterfly"

url[15]="https://s3.amazonaws.com/storage.filemobile.com/storage/26472702/1551"
txt[15]= "Blue eyes Damselfly"

url[16]="https://s3.amazonaws.com/storage.filemobile.com/storage/26434764/1551"
txt[16]= "Working Bee"

url[17]="https://s3.amazonaws.com/storage.filemobile.com/storage/27043630/1551"
txt[17]= "Mantis"
EndSub


'___________________________________________________________________________________________________________
Sub FurElise

For M = 1 To 9
Read_Measure()
For T = 1 TO 6

sound.PlayMusic (a[t]+n[t])

a[t]=""
n[t]=""

ENDFOR
ENDFOR


For M = 1 To 8

Read_Measure()

For T = 1 TO 6
sound.PlayMusic (a[t]+n[t])
a[t]=""
n[t]=""
ENDFOR
ENDFOR


For M = 10 TO 24

Read_Measure()

For T = 1 TO 6
sound.PlayMusic (a[t]+n[t])
a[t]=""
n[t]=""

ENDFOR
ENDFOR



For M=11 TO 25

Read_Measure()

For T = 1 TO 6
sound.PlayMusic (a[t]+n[t])
a[t]=""
n[t]=""

ENDFOR
ENDFOR


EndSub


SUB Read_Measure

If (M=1) then ' measure 1


n[1]="O6L6 E"
n[2]="O6L6 D#"


ElseIf (M=2) then ' measure 2

n[1]="O6L6 E"
n[2]="O6L6 D#"
n[3]="O6L6 E"
n[4]="O5L6 B"
n[5]="O6L6 D" ' becarre
n[6]="O6L6 C"

ElseIf (M=3) then ' measure 3

a[1]="O3L64 A" +"O5L64 A"
n[1]="O5L6 A"
n[2]="O4L6 E"
n[3]="O4L6 A"

n[4]="O5L6 C"
n[5]="O5L6 E"
n[6]="O5L6 A"

ElseIf (M=4) then ' measure 4

a[1]="O3L64 E" +"O5L64 B"
n[1]="O5L6 B"
n[2]="O4L6 E"
n[3]="O4L6 G#"

n[4]="O5L6 E"
n[5]="O5L6 G#"
n[6]="O5L6 B"


ElseIf (M=5) then ' measure 5

a[1]="O3L64 A" +"O5L64 C"
n[1]="O5L6 C"
n[2]="O4L6 E"
n[3]="O4L6 A"

n[4]="O5L6 E"
n[5]="O6L6 E"
n[6]="O6L6 D#"

ElseIf (M=6) then ' measure 6

n[1]="O6L6 E"
n[2]="O6L6 D#"
n[3]="O6L6 E"
n[4]="O5L6 B"
n[5]="O6L6 D" ' becarre
n[6]="O6L6 C"

ElseIf (M=7) then ' measure 7

a[1]="O3L64 A" +"O5L64 A"
n[1]="O5L6 A"
n[2]="O4L6 E"
n[3]="O4L6 A"

n[4]="O5L6 C"
n[5]="O5L6 E"
n[6]="O5L6 A"

ElseIf (M=8) then ' measure 8

a[1]="O3L64 E" +"O5L64 B"
n[1]="O5L6 B"
n[2]="O4L6 E"
n[3]="O4L6 G#"

n[4]="O5L6 E"
n[5]="O6L6 C"
n[6]="O5L6 B"

ElseIf (M=9) then ' measure 9

a[1]="O3L64 A" +"O5L64 A"
n[1]="O5L6 A"
n[2]="O4L5 E"
n[3]="O4L5 A" ' ralentissimo


ElseIf (M=10) then ' measure 10

a[1]="O3L64 A" +"O5L64 A"
n[1]="O5L6 A"
n[2]="O4L6 E"
n[3]="O4L6 A"

n[4]="O5L6 B"
n[5]="O6L6 C"
n[6]="O6L6 D"

ElseIf (M=11) then ' measure 11

a[1]="O4L64 C" +"O5L64 E"
n[1]="O6L6 E"
n[2]="O4L6 G"
n[3]="O5L6 C"

n[4]="O5L6 G"
n[5]="O6L6 F"
n[6]="O6L6 E"


ElseIf (M=12) then ' measure 12

a[1]="O3L64 G" +"O5L64 D"
n[1]="O6L6 D"
n[2]="O4L6 G"
n[3]="O4L6 B"

n[4]="O5L6 F"
n[5]="O6L6 E"
n[6]="O6L6 D"

ElseIf (M=13) then ' measure 13

a[1]="O3L64 A" +"O5L64 C"
n[1]="O6L6 C"
n[2]="O4L6 E"
n[3]="O4L6 A"

n[4]="O5L6 E"
n[5]="O6L6 D"
n[6]="O6L6 C"

ElseIf (M=14) then ' measure 14

a[1]="O3L64 E" +"O5L64 B"
n[1]="O5L6 B"
n[2]="O4L6 E"
n[3]="O5L6 E"

n[4]="O5L6 E"
n[5]="O6L6 E"
n[6]="O5L6 E"

ElseIf (M=15) then ' measure 15

n[1]="O6L6 E"
n[2]="O6L6 E"
n[3]="O7L6 E"

n[4]="O6L5 D#" ' dim
n[5]="O6L5 E"
n[6]="O6L4 D#"

ElseIf (M=16) then ' measure 16

n[1]="O6L4 E"
n[2]="O6L5 D#" ' rit
n[3]="O6L5 E"

n[4]="O6L5 D#"
n[5]="O6L6 E" ' a tempo
n[6]="O6L6 D#"

ElseIf (M=17) then ' measure 17

n[1]="O6L6 E"
n[2]="O6L6 D#"
n[3]="O6L6 E"
n[4]="O5L6 B"
n[5]="O6L6 D" ' becarre
n[6]="O6L6 C"


ElseIf (M=18) then ' measure 18

a[1]="O3L64 A" +"O5L64 A"
n[1]="O5L6 A"
n[2]="O4L6 E"
n[3]="O4L6 A"

n[4]="O5L6 C"
n[5]="O5L6 E"
n[6]="O5L6 A"

ElseIf (M=19) then ' measure 19

a[1]="O3L64 E" +"O5L64 B"
n[1]="O5L6 B"
n[2]="O4L6 E"
n[3]="O4L6 G#"

n[4]="O5L6 E"
n[5]="O5L6 G#"
n[6]="O5L6 B"

ElseIf (M=20) then ' measure 20

a[1]="O3L64 A" +"O5L64 C"
n[1]="O5L6 C"
n[2]="O4L6 E"
n[3]="O4L6 A"

n[4]="O5L6 E"
n[5]="O6L6 E"
n[6]="O6L6 D#"

ElseIf (M=21) then ' measure 21

n[1]="O6L6 E"
n[2]="O6L6 D#"
n[3]="O6L6 E"
n[4]="O5L6 B"
n[5]="O6L6 D" ' becarre
n[6]="O6L6 C"

ElseIf (M=22) then ' measure 22

a[1]="O3L64 A" +"O5L64 A"
n[1]="O5L6 A"
n[2]="O4L6 E"
n[3]="O4L6 A"

n[4]="O5L6 C"
n[5]="O5L6 E"
n[6]="O5L6 A"

ElseIf (M=23) then ' measure 23

a[1]="O3L64 E" +"O5L64 B"
n[1]="O5L6 B"
n[2]="O4L6 E"
n[3]="O4L6 G#"

n[4]="O5L6 E"
n[5]="O6L6 C"
n[6]="O5L6 B"

ElseIf (M=24) then ' measure 24

a[1]="O3L64 A" +"O5L64 A"
n[1]="O5L6 A"
n[2]="O4L6 E"
n[3]="O4L6 A"

n[4]="O5L6 B"
n[5]="O6L6 C"
n[6]="O6L6 D"

ElseIf (M=25) then ' fin

a[1]="O3L64 A" +"O5L64 A"
n[1]="O5L2 A"


EndIf


EndSub


'_______________________________________________________________________________________________________________

Sub carulli
Program.Delay(1000) ' 1 sec between 2 songs


For M= 1 To 8 ' scores is 16 measure of 4:4


IF M=1 THEN
MESURE_1()
ElseIf M=2 THEN
MESURE_2()
ElseIf M=3 THEN
MESURE_3()
ElseIf M=4 THEN
MESURE_4()
ElseIf M=5 THEN
MESURE_5()
ElseIf M=6 THEN
MESURE_6()
ElseIf M=7 THEN
MESURE_7()
ElseIf M=8 THEN
MESURE_8()
Else
EndIf

For T=1 TO 8

sound.PlayMusic (a[t]+n[t])

a[t]=""
n[t]=""
endfor

endfor

' section II

For M= 9 To 16 ' scores is 16 measure of 4:4


IF M=9 THEN
MESURE_9()
ElseIf M=10 THEN
MESURE_10()
ElseIf M=11 THEN
MESURE_11()
ElseIf M=12 THEN
MESURE_12()
ElseIf M=13 THEN
MESURE_13()
ElseIf M=14 THEN
MESURE_14()
ElseIf M=15 THEN
MESURE_15()
ElseIf M=16 THEN
MESURE_16()
Else
EndIf

For T=1 TO 8

sound.PlayMusic (a[t]+n[t])

a[t]=""
n[t]=""
endfor

endfor

endsub

SUB MESURE_1

a[1]="O4L64 G" +"O6L64 B"
n[1]="o6l6 B"
n[2]="o6l6 G"
a[3]="o4l64 G"
n[3]="o6l6 B"
n[4]="o6l6 G"

a[5]="O4L64 A" +"O6L64 C"
n[5]="o6l6 C"
n[6]="o5l6 G"
a[7]="o4l64 A"
n[7]="o6l6 C"
n[8]="o5l6 G"
ENDSUB

SUB MESURE_2

a[1]="O4L64 B" +"O6L64 D"
n[1]="o6l6 D"
n[2]="o5l6 G"
a[3]="o4l64 B"
n[3]="o6l6 D"
n[4]="o5l6 G"

a[5]="O4L64 B" +"O6L64 D"
n[5]="o6l2 D" ' un noire
n[6]="" 'un silence
n[7]="o6l6 E"
n[8]="o6l4 F#"

ENDSUB

SUB MESURE_3

a[1]="O4L64 E" +"O6L64 G"
n[1]="o6l6 G"
n[2]="o5l6 G"
a[3]="o5l64 E"
n[3]="o6l6 G"
n[4]="o5l6 G"

a[5]="O4L64 D" +"O6L64 F#"
n[5]="o6l6 F#"
n[6]="o5l6 G"
a[7]="o5l64 D"
n[7]="o6l6 F#"
n[8]="o5l6 G"

ENDSUB

SUB MESURE_4

a[1]="O4L64 C" +"O6L64 E"
n[1]="o6l6 E"
n[2]="o5l6 G"
a[3]="o4l64 C"
n[3]="o6l6 E" ' eu peu de human feeling
n[4]="o5l6 G"

a[5]="O4L64 B" +"O6L64 G"
n[5]="o6l1 D" ' un noire
n[6]="" 'un silence
n[7]="" 'un silence
n[8]="" 'un silence


ENDSUB

SUB MESURE_5

a[1]="O4L64 C" +"O6L64 A"
n[1]="o6l6 A"
n[2]="o5l6 D"
a[3]="o4l64 C"
n[3]="o6l6 A"
n[4]="o5l6 D"

a[5]="O4L64 C" +"O6L64 A"
n[5]="o6l6 A"
n[6]="o5l6 D"
n[7]="o6l6 E"
n[8]="o6l4 D"


ENDSUB

Sub MESURE_6

a[1]="O4L64 B" +"O5L64 G"
n[1]="o6l6 G"
n[2]="o5l6 D"
a[3]="o4l64 B"
n[3]="o6l6 G"
n[4]="o5l6 D"

a[5]="O4L64 B" +"O5L64 G"
n[5]="o6l6 G"
n[6]="o5l6 D"
n[7]="o6l6 G"
n[8]="o6l6 F#"
EndSub

Sub MESURE_7

n[1]="o5l6 C"
n[2]="o6l6 E"
n[3]="o5l6 B"
n[4]="o6l6 D"
n[5]="o5l6 A"
n[6]="o6l6 C"
n[7]="o5l6 G"
n[8]="o6l6 B"
EndSub

Sub MESURE_8

a[1]="O4L64 B" +"O5L64 D"
n[1]="o5l6 D"
n[2]="o5l4 C"
n[3]="o5l4 C#"
n[4]="o5l4 D"
a[5]="O4L64 D" +"O5L64 A"
n[5]="o6l1 A"
n[6]=""
n[7]=""
n[8]=""
EndSub

Sub MESURE_9

n[1]="o5l6 D"
n[2]="o6l6 C"
n[3]="o6l6 F#"
n[4]="o6l5 C"

n[5]="o5l6 D"
n[6]="o6l6 C"
n[7]="o6l6 F#"
n[8]="o6l5 C"

EndSub

Sub MESURE_10

n[1]="o5l6 G"
n[2]="o6l6 G"
n[3]="o5l6 D"
n[4]="o6l5 C"

n[5]="O5L6 G"
n[6]="o5l6 B"
n[7]="o5l6 G"
n[8]="o5l5 D"
EndSub

Sub MESURE_11

n[1]="o5l6 D"
n[2]="o6l6 C"
n[3]="o6l6 F#"
n[4]="o6l5 C"

n[5]="o5l6 D"
n[6]="o6l6 C"
n[7]="o6l6 F#"
n[8]="o6l5 C"
EndSub



Sub MESURE_12
n[1]="o5l6 G"
n[2]="o6l6 G"
n[3]="o5l6 D"
n[4]="o6l5 C"

n[5]="O5L6 G"
n[6]="o5l6 B"
n[7]="o5l5 G"
n[8]="o5l5 D"

ENDSUB

Sub MESURE_13
n[1]="o4l6 C"
n[2]="o5l6 G"
n[3]="o6l6 E"
n[4]="o4l6 C"

n[5]="O4L6 B"
n[6]="o5l6 G"
n[7]="o6l6 D"
n[8]="o4l5 B"

EndSub

Sub MESURE_14
n[1]="o4l6 D"
n[2]="o5l6 C"
n[3]="o6l6 F#"
n[4]="o4l5 D"

n[5]="O4L6 E"
n[6]="o5l6 B"
n[7]="o6l5 G"
n[8]="o4l5 E"


EndSub


Sub MESURE_15
n[1]="o5l6 C"
n[2]="o6l6 E"
n[3]="o5l5 C"
n[4]="o5l5 A"

a[5]="O5L64 B" +"O5L64 D"
n[5]="o5l6 D"
n[6]="o6l5 D"

a[7]="O5L64 B" +"O5L64 C"
n[7]="o5l5 C"
n[8]="o5l4 A"

EndSub

Sub MESURE_16
a[1]="O4L64 G" +"O5L64 B"+"O3L64 G"
n[1]="o5l5 B"

n[2]="o5l4 G" ' la vitesse diminue pour la fin
n[3]="o4l4 D"
n[4]="o4l3 G"

a[5]="O3L64 G" +"O4L64 B"
n[5]="O5L1 G"

EndSub