PlanetSquires Forums

Support Forums => PlanetSquires Software => Topic started by: veltesian on July 29, 2020, 11:39:21 AM

Title: wishlist item ... if anyone could help me plz?
Post by: veltesian on July 29, 2020, 11:39:21 AM
one thing i would really love to create with winfbe... but i'm only sad that it probably cannot
be done. i want to be able to create a tone generator. even if its something simple, i'd be
happy for the while.

a tone generator with just the basic wave forms .... sawtooth, sine, square, triangle & noise.
Title: Re: wishlist item ... if anyone could help me plz?
Post by: jermy on July 29, 2020, 02:26:12 PM
Hi veltesian

the most simple tone generator ever


Declare Function WinBeep Lib "kernel32" Alias "Beep" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long

''
''
Function frmMain_Button1_Click( ByRef sender As wfxButton, ByRef e As EventArgs ) As LRESULT

WinBeep 200, 2000

    Function = 0
End Function


Or you can use José Roca more complex piano demo at starting point.
https://github.com/JoseRoca/WinFBX (https://github.com/JoseRoca/WinFBX)  must to have
Title: Re: wishlist item ... if anyone could help me plz?
Post by: veltesian on July 29, 2020, 02:43:32 PM
hello jermy....

that code does not show any errors.... but it does not work. sorry to tell you that jermy.
i thank you for your help though.
Title: Re: wishlist item ... if anyone could help me plz?
Post by: jermy on July 29, 2020, 04:13:01 PM

Quote
that code does not show any errors.... but it does not work.

of course it is ... you forgot the click event in the toolbox?
Title: Re: wishlist item ... if anyone could help me plz?
Post by: veltesian on July 29, 2020, 10:27:50 PM
hello jermy....

i unzipped the winbeep.zip into my folder where i would open the file(s)
i launched my winfbe,... and saw there were 2 workspace files

1. winbeep.bas
2. WinFBE_VD_MAIN.bas

i first opened winbeep.bas  <---- this file seemed to compile with no errors,... but there was no GUI or console
to even see on the screen. next i opened the WinFBE_VD_MAIN.bas <----- this file crashed after 2 or so seconds
of it attemping to be compiled....so i'm not really sure where to go from here. (gives a look of uncertainty)


Title: Re: wishlist item ... if anyone could help me plz?
Post by: Paul Squires on July 29, 2020, 11:28:50 PM
Jermy has provided a full archive as per my attached screenshot. The archive contains a WinFBE "project". You need to unzip the archive and use WinFBE's "Open Project" and select the file "WinBeep.wfbe"   <--- that is a WinFBE project file.

If you are creating any type of WinFBE visual designer project then I urge you to use the project features rather than building your gui just using one simple .bas form. It will be MUCH easier in the long run for you.
Title: Re: wishlist item ... if anyone could help me plz?
Post by: Paul Squires on July 29, 2020, 11:30:51 PM
The WinFBE_VD_MAIN.bas is an autogenerated file created by WinFBE each time you compile your project. It is the main file that is fed to the FreeBasic compiler. You should not include that file in the project nor edit it as it gets recreated often.
Title: Re: wishlist item ... if anyone could help me plz?
Post by: veltesian on July 30, 2020, 11:54:42 PM
thank you paul....

i appreciate your explaining about that. i'll definitely be mindful of any
warnings/advice for not editing too much unless i know what i am looking at.