Hallo!
Is it possible to acquire or test the code of the "text to R2D2 translation script"?
I am interested in knowing how it works.
Regards, patforkin.
// Split Text into an array of characters
dim chars() as string = split(Text,"")
// Convert array of characters to an array of ASCII codes
dim asciis() as integer
for each char as string in chars
asciis.Append asc(char)
next
// Play the corresponding sound for each ASCII code
for i as integer = 0 to UBound(asciis)
dim ascii as integer = asciis(i)
dim s as sound
// Determine which sound to play
if ascii < 33 or ascii > 126 then
s = silence
else
s = beeps(ascii-33)
end
// Play the sound
s.Play
// wait until the sound is done playing
do
loop until not s.IsPlaying
next
Users browsing this forum: No registered users and 1 guest