![]() |
|
GG BASIC - wait and random functions - Printable Version +- GEKKOTECH (https://www.forum.gekkotech.net) +-- Forum: GEKKO FORUM (https://www.forum.gekkotech.net/forum-3.html) +--- Forum: HELP (https://www.forum.gekkotech.net/forum-6.html) +--- Thread: GG BASIC - wait and random functions (/thread-10307.html) Pages:
1
2
|
GG BASIC - wait and random functions - MatBasic - 10-11-2016 Hello @GEKKO! I do like your great software :woohoo: and I would like to code a "chord dictation" : - I store the list of 19 chords in a array (Do, RĂ©, Mi ... C#, D, Em), Code: $chords[0]="A"
$chords[1]="Am"
$chords[2]="A#"
$chords[2]="B"Code: $draw=random(19)Code: if($draw=$old_draw) then goto (xx)
$old_draw=$drawCode: Print(512, 120, $chords[$draw], 60, 1)Code: Speech($chords[$draw])- clear the screen - loop I'm looking for 2 functions - a random function! :cheer: - a wait/sleep function that I can emulate by a loop Code: for($i = 1, 1000, 1)
'wait
next($i)Thanks Yours Mat GG BASIC - wait and random functions - MatBasic - 15-11-2016 hello, is someone here ? :dry: GG BASIC - wait and random functions - xGEKKOx - 15-11-2016 Hi MatBasic, sorry for the late response, i was very busy to update some apps... I will do the additions you need... If you have more functions that you want to add please let me know!!! I'm very happy you like my preprocessed Basic on iOS!!! And for sure your suggestions could make the app better. GG BASIC - wait and random functions - MatBasic - 16-11-2016 Gekko post=1584 Wrote:I'm very happy you like my preprocessed Basic on iOS!!! yeah, it turns the iDevice into a nice plateform for simple programming : many thanks! for keeping this great project alive Quote:And for sure your suggestions could make the app better.the app doesn't allow to paste from an email, that's a pity... As it's easier to type on the computer (during office hours ), to send the code to the iphone or pad via email and paste... B) yours GG BASIC - wait and random functions - xGEKKOx - 16-11-2016 I will add the paste from anywhere for the editor, i forgot this thing in the past :O GG BASIC - wait and random functions - xGEKKOx - 17-11-2016 Ok new update sent to Apple, now we will wait for the review. Updated : - Paste button - Undo button - Wait(seconds) command - Rnd(min, max) command Solved some bugs on save and othe little bugs. In the next version i will update the editor with more bug fix on select copy/paste and i will add some themes. Continue to help me to make it better!!! Thanks! GG BASIC - wait and random functions - MatBasic - 18-11-2016 :cheer: thanks for the new version! here is some feedbacks (tested on iPhone 6 and iOS 9.3.5) : - "Paste" works only in one case: if I do "select all" before - and "Select All" doesn't work - I cannot save any program on the server. I got error "File name already exist or general error". But the file doesn't exist yet and name is a new one. + new feature: maybe a "compile" button? to check the syntax my code is running without any visible error and it stops after 20 seconds but nothing has been displayed nor spoken May have I some help, please ? Code: 'initialisation
Cls
$old_draw=0
'chords
$chords[0]="A"
$chords[1]="B"
$chords[2]="C"
$chords[3]="D"
$chords[4]="E"
$chords[5]="F"
$chords[6]="G"
$chords[7]="Am"
$chords[8]="Bm"
$chords[9]="Cm"
$chords[10]="Dm"
$chords[11]="Em"
$chords[12]="Fm"
$chords[13]="Gm"
$chords[14]="A#"
$chords[15]="C#"
$chords[16]="D#"
$chords[17]="F#"
$chords[18]="G#"
'name of chord for speech
$chords_name[0]="A"
$chords_name[1]="B"
$chords_name[2]="C"
$chords_name[3]="D"
$chords_name[4]="E"
$chords_name[5]="F"
$chords_name[6]="G"
$chords_name[7]="A minor"
$chords_name[8]="B minor"
$chords_name[9]="C minor"
$chords_name[10]="D minor"
$chords_name[11]="E minor"
$chords_name[12]="F minor"
$chords_name[13]="G minor"
$chords_name[14]="A sharp"
$chords_name[15]="C sharp"
$chords_name[16]="D sharp"
$chords_name[17]="F sharp"
$chords_name[18]="G sharp"
'loop start
Cls
'make a draw
$draw=Rnd(0,18)
'if same draw as before return to "make a draw"
If($draw=$old_draw) Then Goto(49)
$old_draw=$draw
Print(50, 50, $chords[$draw], 20, 1)
Render
Speech($chords_name[$draw])
Wait(2)
'go to "loop start"
Goto(47)
EndGG BASIC - wait and random functions - xGEKKOx - 19-11-2016 I will give a try to your code and see if there are other bugs. I will also check the new speech synthetizer on ios 10 The compiler button is integrated in the run, but if you want i could add it to the button bar I will change the buttons to littler ones to get more of it GG BASIC - wait and random functions - MatBasic - 23-11-2016 Tks for your test! :cheer: Yes, a Compile button would be convenient if it says some information on compiling error! on iPhone, the buttons are already really small... :blink: GG BASIC - wait and random functions - xGEKKOx - 27-11-2016 Hi Mat, yes the Plugin i integrated in the app to do the editor is old. It is called CodeMirror. I will update it with the last version and i will send again the app to the Apple. In this month i'm working on passing from AGK to Cocos2Dx, as i want to port my apps also on other devices ![]() This app will be one of them
|