Page 1 of 1
New beginner challenges
Posted: Mon Feb 20, 2017 4:05 am
by Zimboguitar
Hello. My first question. I am 67 and would like to try to learn programming. Smart Basic suits me. I hope this page is relevant for my question. As an experiment I will try for a simple flight simulator. Cockpit with scenery rotating behind windscreen. I tried cockpit as main graphics window with scenery as a Sprite through windscreen. However the document states sprites are placed 'above' the main graphic window and I need that Sprite to be 'below' as if through windscreen (then scenery can be rotated etc). Am I attempting this the wrong way ? Thankyou.
Re: New beginner challenges
Posted: Mon Feb 20, 2017 6:49 am
by Mr. Kibernetik
This means that your windscreen needs to be a sprite to have something "below" it.
Re: New beginner challenges
Posted: Mon Feb 20, 2017 2:28 pm
by Zimboguitar
Thankyou for helping with my question re sprites. I am starting to understand. Meanwhile my Smart Basic editing screen has gone black with green font. At the bottom of that screen is a slider which seems to scale the text. I can't put the screen colour back to the default text or the blue screen. Can you advise me why the screen has turned black with a green font please?
Also when I 'begin' and 'end' a new Sprite e.g. Draw a line, I can't make it visible even with 'show Sprite'. If I simply draw the line it appears immediately.
Any help is much appreciated while I am learning the beginning commands.
Thankyou.
Re: New beginner challenges
Posted: Mon Feb 20, 2017 3:16 pm
by Mr. Kibernetik
Zimboguitar wrote: ↑Mon Feb 20, 2017 2:28 pm
Thankyou for helping with my question re sprites. I am starting to understand. Meanwhile my Smart Basic editing screen has gone black with green font. At the bottom of that screen is a slider which seems to scale the text. I can't put the screen colour back to the default text or the blue screen. Can you advise me why the screen has turned black with a green font please?
Also when I 'begin' and 'end' a new Sprite e.g. Draw a line, I can't make it visible even with 'show Sprite'. If I simply draw the line it appears immediately.
Any help is much appreciated while I am learning the beginning commands.
Thankyou.
Please check samples in "Examples > Editor Settings" folder.
Re: New beginner challenges
Posted: Tue Feb 21, 2017 8:29 am
by Dutchman
Mr. Kibernetik wrote: ↑Mon Feb 20, 2017 3:16 pm
Please check samples in "Examples > Editor Settings" folder.
The recent post
viewtopic.php?f=20&t=1779 gives another example
Re: New beginner challenges
Posted: Wed Feb 22, 2017 1:53 pm
by Zimboguitar
Thankyou for helping with the Editor settings which has solved my problem (I like the black screen with green font - it reminds me of old computers in the eighties.) I still can't get to see my sprites (they are invisible, even with 'show Sprite') so I am going to try a different project. Artificial Intelligence music composing ! Looking at the examples I can understand them, but I don't see any formulae being used. Is it possible to manipulate 'note set' with formulae please?
Re: New beginner challenges
Posted: Sat Feb 25, 2017 12:52 am
by Zimboguitar
My question re using formulae to manipulate 'note set' data has brought no response. I need this functionality to explore 'artificial intelligence music composing'. Formulae seems only to work with numeral data - not alphabetical as in music note Names. None of the music examples show note manipulation by formulae. Would it be possible therefore to make a table of note name letters to numbers which will work with the 'note set' command. If this is not possible then sadly, I am attempting the wrong language.
Re: New beginner challenges
Posted: Sat Feb 25, 2017 4:23 am
by rbytes
If you look in Examples/Music and Sound/, you will see a file call Synthesizer.txt. Examining the code will answer most of your questions. Smart Basic supports MIDI, which is a mathematical way of defining and playing various instruments at different pitches, timings and volumes, using the sound chip in your iOS device. But if you are just getting started with smart Basic, you will not suddenly find yourself able to implement all of this information. You will need to start off slowly by coding a few lines, running the code and listening to the results. Then you can start to build on that knowledge.
When you are in the code editor, you can press the ? Button on the top toolbar and see the built-in manual. Two sections will be of interest. The MUSIC section contains two types of commands, those that contain the word MUSIC and those that contain the word NOTES. It is the second type - NOTES - that you will need to explore, in order to learn to generate sounds from within your device. The music commands are also useful, but they do not generate original sounds. They simply play back prerecorded audio files. The next section of the manual is called INSTRUMENTS. It lists all of the musical instruments available for use with NOTES commands. Following the list of instruments, there is a list of the pitches that are available for notes.
There are a few other programs that have been posted on this forum over the past few years that deal with music synthesis. Let me know if you are interested in checking them out.
Re: New beginner challenges
Posted: Sun Feb 26, 2017 7:46 am
by Zimboguitar
Hi, and thanks so much for coming to my rescue with Smart Basic in particular the subject of music. I will certainly look closely at the references you mentioned. I use an IPad mini as my Apple device and use Garage Band which is an astonishingly well written piece of software. I see Smart Basic as an extension of the Ipad and hope to be able to explore original software to allow music composition by computer.
Since my last letter my step grandson (18 and studying programming) has pointed out that my need to convert the musical notes etc, A to G and other symbols can all be done using Arrays which will convert them to numberical values allowing formula to be applied. I will let you know my progress. Thanks again.
Re: New beginner challenges
Posted: Sun Feb 26, 2017 3:43 pm
by rbytes
I enjoy Garage Band, too, and have quite a few other good music apps. For a lot of fun, check out VidRhythm. You and your friends/family can have endless fun with it. (No, I have no personal connection!)
Your grandson is correct - you can turn any number into a MIDI pitch, rest, duration, tempo, etc. by using arrays to convert it as needed to any letter/number combination. Good luck!