Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
<
[-]
Slideshow

GG BASIC - wait and random functions
#1
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"
- the program would draw a random chord
Code:
$draw=random(19)
- if draw is the same as previous draw: redraw
Code:
if($draw=$old_draw) then goto (xx) $old_draw=$draw
- write the name of the chord
Code:
Print(512, 120, $chords[$draw], 60, 1)
- speak it B)
Code:
Speech($chords[$draw])
- wait for the musician to play it on his instrument (guitar, piano,...)
- 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)
:oops:

Thanks
Yours
Mat
Reply
#2
hello,

is someone here ? :dry:
Reply
#3
iOS 
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.
Reply
#4
iOS 
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 Wink ), to send the code to the iphone or pad via email and paste... B)

yours
Reply
#5
I will add the paste from anywhere for the editor, i forgot this thing in the past :O
Reply
#6
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!
Reply
#7
iOS 
: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 Sad

May have I some help, please ? Blush

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) End
Reply
#8
iOS 
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
Reply
#9
iOS 
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:
Reply
#10
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 Big Grin

This app will be one of them Big Grin
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)
[-]
Recent Posts
Top Google Site
I think you could probably google thatFrankJScott — 02:48 AM
Useful Google Site
I think you could probably - google thatFrankJScott — 02:32 AM
New Google Site
I think you could probably google that I think you could probab...FrankJScott — 02:26 AM
cb radio box on iPhone4
This technical discussion thread typically addresses hardware qu...jessicalorem — 06:38 AM
Slot Scopa
DOWNLOAD HERE The most famous slot machine is now availabl...xGEKKOx — 03:31 PM

>