NOTE! This site uses cookies and similar technologies.

If you not change browser settings, you agree to it.

I understand
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: GG BASIC - wait and random functions

GG BASIC - wait and random functions 8 years 1 week ago #1580

  • MatBasic
  • MatBasic's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 8
  • Karma: 0
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),
$chords[0]="A"
$chords[1]="Am"
$chords[2]="A#"
$chords[2]="B"
- the program would draw a random chord
$draw=random(19)
- if draw is the same as previous draw: redraw
if($draw=$old_draw) then goto (xx)
$old_draw=$draw
- write the name of the chord
Print(512, 120, $chords[$draw], 60, 1)
- speak it B)
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
for($i = 1, 1000, 1) 
'wait
next($i)
:oops:

Thanks
Yours
Mat
Last Edit: 8 years 1 week ago by MatBasic.
The administrator has disabled public write access.

GG BASIC - wait and random functions 8 years 1 week ago #1582

  • MatBasic
  • MatBasic's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 8
  • Karma: 0
hello,

is someone here ? :dry:
The administrator has disabled public write access.

GG BASIC - wait and random functions 8 years 1 week ago #1584

  • Gekko
  • Gekko's Avatar
  • Offline
  • Administrator
  • Posts: 774
  • Thank you received: 108
  • Karma: 39
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.
The administrator has disabled public write access.

GG BASIC - wait and random functions 8 years 1 week ago #1585

  • MatBasic
  • MatBasic's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 8
  • Karma: 0
Gekko 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
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
Last Edit: 8 years 1 week ago by MatBasic.
The administrator has disabled public write access.

GG BASIC - wait and random functions 8 years 6 days ago #1586

  • Gekko
  • Gekko's Avatar
  • Offline
  • Administrator
  • Posts: 774
  • Thank you received: 108
  • Karma: 39
I will add the paste from anywhere for the editor, i forgot this thing in the past :O
The administrator has disabled public write access.
The following user(s) said Thank You: MatBasic

GG BASIC - wait and random functions 8 years 6 days ago #1587

  • Gekko
  • Gekko's Avatar
  • Offline
  • Administrator
  • Posts: 774
  • Thank you received: 108
  • Karma: 39
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!
The administrator has disabled public write access.
The following user(s) said Thank You: MatBasic

GG BASIC - wait and random functions 8 years 5 days ago #1588

  • MatBasic
  • MatBasic's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 8
  • Karma: 0
: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 ? :blush:
'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
Last Edit: 8 years 5 days ago by MatBasic.
The administrator has disabled public write access.

GG BASIC - wait and random functions 8 years 3 days ago #1589

  • Gekko
  • Gekko's Avatar
  • Offline
  • Administrator
  • Posts: 774
  • Thank you received: 108
  • Karma: 39
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
The administrator has disabled public write access.
The following user(s) said Thank You: MatBasic
  • Page:
  • 1
  • 2
Moderators: Gekko