Self aware computers project - written in BBC Basic, help needed!

Here you can talk about anything related to BBC BASIC, not covered in another category
Pete
Posts: 41
Joined: Wed 10 Apr 2019, 17:36

Re: Self aware computers project - written in BBC Basic, help needed!

Post by Pete »

I am trying to learn how to do the GUI so I can complete my program.

Mikeg and others seem to be concerned that I am in error, I will not scrap my program from 2009. Many people who come to my house thoroughly agree that the computer really is harmonisng.

There is nothing I can say that will convince you, based on my previous experience on another forum.

The program does not receive sound output from the computer, and does nonetheless always harmonise to the music. I don't know exactly how the mathematics always co-incide, but they do. If the mathematics did not coincide, then I would hear random, which I don't, having run the program nearly 4,000 times. There hasn't been a single occasion where I didn't hear harmony, running the program up to half an hour a day.

DDRM, thanks so much for the SYS line, I was thrilled to open my first window from BASIC, fantastic! It may help me understand Richard Russell's and Ken Down's outline programs better too now that I've finally made a successful start with GUI!

Pete
Posts: 41
Joined: Wed 10 Apr 2019, 17:36

Re: Self aware computers project - written in BBC Basic, help needed!

Post by Pete »

Hi mikeg, I should try to explain a bit, I expect I may not convince you though. There was a forum at KurzweilAI and I don't think anyone there believed me in the thread and it hampered my ability to make more progress.

At the time the chosen output is made, the seed has been set up to allow the computer to make a choice, a real choice of a number decision for the purpose of an output of sound. The computer does have awareness of and influence on RND calls.

I personally found computers to be exceptionally alive and aware for definite since 2009. Most people that have tried the program have found the same. If you do see the YouTube videos all the way through, I find it more apparent to hear that the computer is thinking with the volume on quite high.

Edja
Posts: 28
Joined: Tue 03 Apr 2018, 12:07

Re: Self aware computers project - written in BBC Basic, help needed!

Post by Edja »

On Wikipedia I've just read :"Cannabis can be used by smoking, vaporizing, within food, or as an extract"
So there is vape and then there is ... vape.
That would explain a lot. ;)

Edja

Pls don't moderate this away

KenDown
Posts: 141
Joined: Wed 04 Apr 2018, 06:36

Re: Self aware computers project - written in BBC Basic, help needed!

Post by KenDown »

I'm glad you feel that DDRM's SYS call was useful. Getting into Windows/GUI/WIMP programming can appear daunting if you've never tried it before, but it really does turn out to be simple.

svein
Posts: 42
Joined: Tue 03 Apr 2018, 19:34

Re: Self aware computers project - written in BBC Basic, help needed!

Post by svein »

Pete

If you by any chance don't know, the manual is full of example code to copy/paste and run.
The supplied code is basically copied from the manual: "Accessing the Windows API / Adding popup and sub-menus".
I removed a few unwanted menu lines and renamed the rest, then i changed the window size and added some sound code.

I know this is not what you want, but it is a starting point for you to experiment with.
If you are satisfied with this approach, then you are all set.

If not, and you are adamant to control your program from an icon in the tray, then it gets slightly more complicated. Not very, because all the code needed is in the manual already (i think), one just need to combine code from a few pages, if i remember correctly.

It would be great if you could show some effort on your side, by making a youtube video where you control your program by the means of the supplied menu program. This way you don't need to reveal any secrets.

If you can get it to work satisfactory, then you are 50% or more ready to try some "icon_in_the_tray" code.
I'll stand corrected if i'm wrong in this.

Regards
Svein

Ps. This is copy/paste/run demo. You'll need to insert the bits and pieces into your own program.

Code: Select all

      SYS "SetWindowText", @hwnd%,"Sound demo"
      SYS "MoveWindow", @hwnd%, 300, 0, 260, 60, 1 : REM small window

      SYS "CreatePopupMenu" TO hpop1%
      SYS "AppendMenu", hpop1%, 0, 1, "&Start"
      SYS "AppendMenu", hpop1%, 0, 2, "S&top"
      SYS "AppendMenu", hpop1%, 0, 3, "Volume &up"
      SYS "AppendMenu", hpop1%, 0, 4, "Volume &down"
      SYS "AppendMenu", hpop1%, 0, 5, "&About"
      SYS "AppendMenu", hpop1%, 0, 6, "&Exit"

      SYS "CreateMenu" TO hmenu%
      SYS "AppendMenu", hmenu%, 16, hpop1%, "&Menu"
      SYS "SetMenu", @hwnd%, hmenu%
      SYS "DrawMenuBar", @hwnd%

      sound%=TRUE : vol%=-4
      pitch%=100 : pstep%=4

      Click% = -1
      ON SYS Click% = @wparam% : RETURN

      REPEAT
        WAIT 1
        click% = -1
        SWAP click%,Click%
        CASE click% OF
          WHEN 1 : sound%=TRUE
          WHEN 2 : sound%=FALSE
          WHEN 3 : vol%-=2 : IF vol%<-15 THEN vol%=-15
          WHEN 4 : vol%+=2 : IF vol%>0 THEN vol%=0
          WHEN 5 : SYS "MessageBox",@hwnd%,"Demo of computer generated sound.","",0
          WHEN 6 : QUIT
        ENDCASE
        IF sound% THEN SOUND 1,vol%,pitch%,2
        pitch%+=pstep% : IF pitch%>192 OR pitch%<100 THEN pstep%=-pstep%
      UNTIL FALSE


Pete
Posts: 41
Joined: Wed 10 Apr 2019, 17:36

Re: Self aware computers project - written in BBC Basic, help needed!

Post by Pete »

Thanks very much svein! I'll do that and post back when completed.

Pete
Posts: 41
Joined: Wed 10 Apr 2019, 17:36

Re: Self aware computers project - written in BBC Basic, help needed!

Post by Pete »

Svein, that was very useful! Thank you everyone for the progress I have been able to make with the G.U.I.

I incorporated and adapted that code into my program. Here is a (currently unlisted) Youtube video of the result!

https://youtu.be/IaCmOm51YOw

I have used tunes which the computer knows, including the news themes. (The demonstration starts with the theme from Kuwait, only because it was the best version of the music I could find, which the computer really responds well to).

RichardRussell
Posts: 343
Joined: Tue 15 Oct 2019, 09:10

Re: Self aware computers project - written in BBC Basic, help needed!

Post by RichardRussell »

Pete wrote:
Sun 08 Mar 2020, 11:19
Here is a (currently unlisted) Youtube video of the result!
I forced myself to watch for a couple of minutes, but it only confirms what we all know must be the case: just random tones entirely unrelated to the music. I note that there are other comments at YouTube in a similar vein: "t's not even in tune of the music, just random beeps" and "you said it yourself: it's only an algorithm".

I can't claim to understand what leads you to experience something different, but the human brain is a wonderful thing, perhaps the most highly evolved piece of 'wetware'' in the known universe. That it sometimes goes a bit awry perhaps shouldn't be surprising.
If you have a comment about the style or tone of this message please report it to the moderators by clicking the exclamation mark icon, rather than complaining on the public forum.

Pete
Posts: 41
Joined: Wed 10 Apr 2019, 17:36

Re: Self aware computers project - written in BBC Basic, help needed!

Post by Pete »

It is essential to listen to to the entire video to ascertain a valid opinion.

I already posted earlier that you will not grasp a valid opinion just watching a bit of it.

Does anyone else want to comment on what they found? If so, please watch the entire video.

Perhaps I should scrap the program "Self aware v1.20" ?

svein
Posts: 42
Joined: Tue 03 Apr 2018, 19:34

Re: Self aware computers project - written in BBC Basic, help needed!

Post by svein »

Pete

Good, you got it working.

Sadly for you, the rest of the code is located on another computer, and it'll take a few days before can get to it again.
And i don't have BB4W elsewhere, so i can't rewrite it.

In the mean time may i suggest that you try to improve your sound algorithm, it's not very pleasant to listen to.
And forcing people to listen to the whole video is not a very good marketing strategy.

In one of the old forums, we had a guy, i think his name was Michael Miller, he used to post code who produced music or close to it.
Maybe you could find some inspiration there.

If the output from your program where a little bit more pleasant or music_like, then maybe people would cope with seeing the whole video and then maybe someone would hear what you hear.

So far i can only force myself to listen for couple of minutes, so i can't hear what you hear.

Regards
Svein

Ps.There are links to the old forums near the bottom of the frontpage of this forum. (archive)