Topics

*STEREO and *VOICE commands

Richard Russell
 

Most of the features of the SDL 2.0 port of BBC BASIC are either identical to, or have some restrictions compared with, their equivalents in BBC BASIC for Windows. However there is one major exception - SOUND and ENVELOPE. I have taken advantage of SDL's multimedia capabilities to support, out of the box, the High Quality (44.1 kHz, 16-bit, stereo) sound only available from BB4W by using the HQSOUND library.


Now I've gone even further by implementing two new commands to control the sound system: *STEREO and *VOICE; these have approximately the same functionality as the STEREO statement and the *CHANNELVOICE command in ARM BASIC (on RISC OS). Their syntax is as follows:


*STEREO chan,pan
*VOICE chan,waveform

where chan is an integer value from 0 to 3, pan is an integer value from -127 (fully left) to +127 (fully right), and waveform is an integer value from 1 to 8. These commands are available in BBC BASIC for SDL 2.0 v0.10a; the Linux (x86) version can be downloaded from http://www.rtr.myzen.co.uk/bbclinux.zip.


It gave me considerable satisfaction to provide the same eight waveforms that I chose for my Z80 Music program in 1981! That used only 8-bit samples so I performed a Fourier analysis to discover the harmonic content and synthesised new 16-bit waveforms to match the originals, but with much better quality.


Here the *VOICE command is used to reproduce, approximately, the original Z80 Music waveform switching in Ron Stickley's 1983 transcription of Come To The Fair.


https://youtu.be/IIU9eE58Su8 https://youtu.be/IIU9eE58Su8


Richard.

Edwin Mendey
 

Dear Russell,

The video looks impressive, but is the BBC Basic SDL port available for
download or when will it be available. Also I did see the video for BBC
Basic for Android and again when will this be available for download?

Regards,

Edwin

On 19/01/16 11:33, yahoo@... [bb4w] wrote:

Most of the features of the SDL 2.0 port of BBC BASIC are either
identical to, or have some restrictions compared with, their
equivalents in BBC BASIC for Windows. However there is one major
exception - SOUND and ENVELOPE. I have taken advantage of SDL's
multimedia capabilities to support, out of the box, the High Quality
(44.1 kHz, 16-bit, stereo) sound only available from BB4W by using the
HQSOUND library.


Now I've gone even further by implementing two new commands to control
the sound system: *STEREO and *VOICE; these have approximately the
same functionality as the STEREO statement and the *CHANNELVOICE
command in ARM BASIC (on RISC OS). Their syntax is as follows:


*STEREO chan,pan
*VOICE chan,waveform

where chan is an integer value from 0 to 3, pan is an integer value
from -127 (fully left) to +127 (fully right), and waveform is an
integer value from 1 to 8. These commands are available in BBC BASIC
for SDL 2.0 v0.10a; the Linux (x86) version can be downloaded from
http://www.rtr.myzen.co.uk/bbclinux.zip.


It gave me considerable satisfaction to provide the same eight
waveforms that I chose for my Z80 Music program in 1981! That used
only 8-bit samples so I performed a Fourier analysis to discover the
harmonic content and synthesised new 16-bit waveforms to match the
originals, but with much better quality.


Here the *VOICE command is used to reproduce, approximately, the
original Z80 Music waveform switching in Ron Stickley's 1983
transcription of Come To The Fair.


https://youtu.be/IIU9eE58Su8 https://youtu.be/IIU9eE58Su8


Richard.





[Non-text portions of this message have been removed]

Richard Russell
 

---In bb4w@..., <edlemen@...> wrote :
> is the BBC Basic SDL port available for download


Yes, the Linux (x86) run-time engine is available for download: there's a link in my message. You will need to trawl through earlier threads to find installation instructions for various Linux 'flavours' (if you have a choice, 32-bit Ubuntu is probably the easiest because you don't need to recompile anything). If you have specific requirements please ask.


> BBC Basic for Android ... when will this be available for download?



When I last asked there was literally *nobody* here (except me!) who had an 'Intel Inside' (x86) Android device on which it could run, so on that basis I haven't bothered to make it available. The other issue is that in the absence of any kind of IDE, or even a primitive program editor, its functionality is limited (the Linux version also has no IDE, but that's more easily worked around).


As previously stated I am concentrating on the Run Time Engine because I'm the only person who can do that. As far as an IDE for the SDL port is concerned, I'm assuming that it will itself be written in BBC BASIC (especially as that's the easiest way to make it portable) so I am leaving that to others to provide, either individually or as a 'community project'.


The SDL 2.0 port of BBC BASIC is potentially an exciting project, because it holds out the hope of creating BBC BASIC applications that can run on Linux (x86), Android (x86) and, in principle, Mac OS-X. But try as I might I don't seem to be able to instil the degree of enthusiasm from the 'user community' that will be necessary to turn it into a fully-functional reality.


Richard.

Richard Russell
 

Here's another demonstration, this time of Bach's Toccata & Fugue in D Minor, transcribed (in 1983 and 1981 respectively) by Ron Stickley and Gerald Pye. Best appreciated with headphones, the various 'organ stops' are spread across the stereo stage.

https://www.youtube.com/watch?v=9FtJ2D3gJtU

Richard.



Richard Russell
 

On Sun, Mar 12, 2017 at 03:13 am, Richard Russell wrote:
Here's another demonstration, this time of Bach's Toccata & Fugue in D Minor

If you would like to play this on your own device here is a link to the code:

www.rtr.myzen.co.uk/tocfugue.txt

I've made it available as a plain-text file to simplify copying to an Android device (visit the URL with your browser; 'select all' and copy to the clipboard; paste into an empty file in BBC BASIC).

It will run as-is in all editions of BBCSDL. To play in BB4W REM-out the OSCLI "voice " and OSCLI "stereo " lines (obviously there will be no stereo or stop-change effects in this case).

Richard.

D.V.N. Sarma
 

I could run it on the Win7 desktop.
regards,
Sarma.

Richard Russell
 

On Thu, Mar 16, 2017 at 05:33 am, D.V.N. Sarma wrote:
I could run it on the Win7 desktop.

Sorry, I don't understand what you mean.

The new version of the program is specifically intended as a demonstration of the *STEREO and *VOICE commands in BBCSDL.  Although you can run it in BB4W by deleting these commands, there's little point and the resulting effect is disappointing (the fugue, in particular, relies of the counterpoint between two different voices).  Run it in BBCSDL, or just play the YouTube video.

Richard.

 

Dear Sirs,

What instructions are used in BBC Basic to play a video film from a
drive (D:\ or a USB drive)?
How to proceed if I want the video to be displayed in specific delimited window?

Regards

2017-03-12 11:13 UTC+01:00, Richard Russell <news@...>:

Here's another demonstration, this time of Bach's Toccata & Fugue in D
Minor, transcribed (in 1983 and 1981 respectively) by Ron Stickley and
Gerald Pye. Best appreciated with headphones, the various 'organ stops' are
spread across the stereo stage.

https://www.youtube.com/watch?v=9FtJ2D3gJtU (
https://www.youtube.com/watch?v=9FtJ2D3gJtU )

Richard.

Richard Russell
 

On Thu, Apr 20, 2017 at 04:51 pm, CHABI Salomon wrote:
What instructions are used in BBC Basic to play a video film from a
drive (D:\ or a USB drive)?

It is confusing to tack onto an existing topic a question about something completely unrelated, it also means that future searches are less likely to locate relevant topics.  This thread is discussing the *STEREO and *VOICE commands in BBC BASIC, if you wish to enquire about playing video files please start a new thread on that subject.  This is basic forum etiquette, your cooperation is appreciated.

Richard.

 

Ok Russell! You're right.
I'll resend my e-mail.


2017-04-21 10:26 GMT+01:00 Richard Russell <news@...>:

On Thu, Apr 20, 2017 at 04:51 pm, CHABI Salomon wrote:
What instructions are used in BBC Basic to play a video film from a
drive (D:\ or a USB drive)?

It is confusing to tack onto an existing topic a question about something completely unrelated, it also means that future searches are less likely to locate relevant topics.  This thread is discussing the *STEREO and *VOICE commands in BBC BASIC, if you wish to enquire about playing video files please start a new thread on that subject.  This is basic forum etiquette, your cooperation is appreciated.

Richard.