BBC BASIC for Windows
« BB4W installation. »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 11:37pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1 2  Notify Send Topic Print
 hotthread  Author  Topic: BB4W installation.  (Read 2979 times)
hitsware
Junior Member
ImageImage


member is offline

Avatar




Homepage PM

Gender: Male
Posts: 70
xx Re: BB4W installation.
« Reply #15 on: Jun 1st, 2014, 3:03pm »

>>>>> >>> THANK YOU RICHARD ! <<<<<<<<<<<

That makes a lot of my endeavors so much easier.
I have some external hardware with FREQOUT capability. (even sinewave and duty-cycle on the 'rectangular' wave) but no envelopes and only 2 channels.

>This code works with the standard, unpatched, BB4W >(either in the IDE or as a compiled EXE, and either >v5.95a or the v6 beta). However if you run it in the IDE >be aware that it modifies the frequency table, so will >affect subsequent programs using standard SOUND >statements.

Would you elaborate on that somewhat ? I just tried a short snippet of old code and noted no differance, but very short (and also didn't use the FREQOUT function more than enough to see it works).

MEGA-THANKS ! ........... Michael Miller
User IP Logged

rtr
Guest
xx Re: BB4W installation.
« Reply #16 on: Jun 1st, 2014, 4:12pm »

on Jun 1st, 2014, 3:03pm, hitsware wrote:
Would you elaborate on that somewhat ?

As FNfreqout modifies the frequency table, any subsequent SOUND statements, which use the regular 'quarter-semitone' pitch values (even in a completely different program), are quite likely not to work. The safest thing to do, after running a program which uses FNfreqout, is to quit and restart BBC BASIC for Windows.

Of course if you compile your program to an EXE (which I reiterate is the way BB4W is expected to be used) this isn't an issue because its frequency table is then private to its own process.

I've written a Wiki article on FNfreqout. The same technique can be used to program the frequency table for MIDI notes, or for just intonation, so there is no longer ever a need to patch the BB4W executable.

Richard.
User IP Logged

hitsware
Junior Member
ImageImage


member is offline

Avatar




Homepage PM

Gender: Male
Posts: 70
xx Re: BB4W installation.
« Reply #17 on: Jun 1st, 2014, 6:25pm »

> quit and restart BBC BASIC for Windows

Ninguna problema !!!!!!!!!

Again I owe you a pint (or whatever is your favorite libation ) at your favorite pub .....
User IP Logged

hitsware
Junior Member
ImageImage


member is offline

Avatar




Homepage PM

Gender: Male
Posts: 70
xx Re: BB4W installation.
« Reply #18 on: Jun 1st, 2014, 9:27pm »

REM: Works Like a Charm !

*TEMPO 130

DIM f(3)

FOR x=0 TO 3: f(x)=110: NEXT x
v=0: PROC_setscreen

REPEAT
x=INKEY(1): a=v: b=f(v)
IF x=138 THEN f(v)=f(v)-1
IF x=139 THEN f(v)=f(v)+1
IF x=136 THEN v=v-1
IF x=137 THEN v=v+1
IF v<0 THEN v=0
IF v>3 THEN v=3
IF f(v)<20 THEN f(v)=20
IF f(v)>10000 THEN f(v)=10000
IF v<>a OR f(v)<>b THEN PROC_setscreen
SOUND 0,-5,FNfreqout(f(0)),1
SOUND 1,-5,FNfreqout(f(1)),1
SOUND 2,-5,FNfreqout(f(2)),1
SOUND 3,-5,FNfreqout(f(3)),1
UNTIL FALSE

DEFPROC_setscreen
CLS
PRINT
PRINT " up-down arrows set frequency "
PRINT " left-right arrows set voice "
PRINT
PRINT " voice 0 1 2 3 "
PRINT
PRINT " frequency ";f(0);" ";f(1);" ";f(2);" ";f(3)
ENDPROC

DEF FNfreqout(f)
LOCAL I% : PRIVATE ftab%, indx&
IF ftab% = 0 THEN
LOCAL base%
SYS "GetModuleHandle", 0 TO base%
FOR I% = base% TO base% + 65534 STEP 2
IF !I% = &03550354 IF I%!4 = &06060606 EXIT FOR
NEXT
IF I% > base% + 65534 ERROR 100, "Cannot locate frequency table"
ftab% = I% + 8
SYS "VirtualProtect", ftab% AND -&1000, &2000, &40, ^I% TO I%
IF I% = 0 ERROR 100, "Cannot make memory image writable"
ENDIF
indx& += 1 : IF indx& = 0 indx& = 1
I% = 2 * indx&
ftab%!I% = ftab%!I% AND &FFFF0000 OR INT(f * &10000 / 22050 + 0.5)
= indx&
User IP Logged

hitsware
Junior Member
ImageImage


member is offline

Avatar




Homepage PM

Gender: Male
Posts: 70
xx Re: BB4W installation.
« Reply #19 on: Jun 6th, 2014, 02:30am »

As FNfreqout modifies the frequency table, any subsequent SOUND statements, which use the regular 'quarter-semitone' pitch values (even in a completely different program), are quite likely not to work. The safest thing to do, after running a program which uses FNfreqout, is to quit and restart BBC BASIC for Windows.

> Even if moving to another routine that again
> is using FNfreqout !
User IP Logged

stargate
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 1
xx Re: BB4W installation.
« Reply #20 on: Mar 3rd, 2015, 1:43pm »

Just a quick note.

I recently bought a new computer which runs Windows7 Home Premium. I tried installing BB4W Demo version. It worked OK except I couldn't change the font setting. I tried the compatibility setting and setting it to Windows XP (SP2). It now works OK, as does BB4W full version. Hope this might help someone.
User IP Logged

rtr2
Guest
xx Re: BB4W installation.
« Reply #21 on: Mar 3rd, 2015, 1:58pm »

on Mar 3rd, 2015, 1:43pm, stargate wrote:
I tried installing BB4W Demo version. It worked OK except I couldn't change the font setting.

The usual reason for not being able to change the font is forgetting to deselect the Use System Fixed Font checkbox first (it's selected by default and easy to miss).

Quote:
I tried the compatibility setting and setting it to Windows XP (SP2).

BB4W v6.00a (both trial and paid-for) is fully compatible with versions of Windows up to 8.1 (in fact it even has a Windows 10 compatibility manifest!).

Richard.
« Last Edit: Mar 3rd, 2015, 2:02pm by rtr2 » User IP Logged

Pages: 1 2  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls