Date : Mon, 14 Dec 2009 21:39:45 +0000
From : kevin@... (Kevin Bracey)
Subject: BASIC V/VI SOUND command?
Rick Murray wrote:
> Jonathan Graham Harston wrote:
>
>
>> RISC OS does not implement OSWORD 7 (SOUND) or OSWORD 8 (ENVELOPE).
>> I've been trying to track down a module somebody wrote to implement
>> them.
>>
>
> I recall one of the magazines yonks ago offered source for a module
> that, given ENVELOPE-style parameters, built up a loadable module
> containing a voice, in sine/square/sawtooth wave profile.
>
And bizarrely, WaveSynth is itself partway to such a module. It supports
ADSR envelopes with programmable waveforms. Hence the name... Except it
isn't properly documented - all I've ever seen is the example WaveSynth
voice program in the WaveSynth chapter of the PRMs. The only WaveSynth
documentation I know of is in that program's comments. (The WaveSynth
source itself isn't terribly edifying, but mercifully short.)
And it was never attached to OS_Word 8 in any way to make it easy to
use, tragically. It was always a bit odd - while VIDC's sound system is
much more sophisticated than the Beeb's, Arthur/RISC OS's sound APIs
were much harder to use for someone who didn't fancy dabbling in
relatively complicated machine code. Presented with just a BASIC prompt,
you're going to get more interesting sounds out of the BBC micro. Why do
all that TEMPO/BEATS stuff before just getting something ENVELOPE-like in?
For the record, RISC OS does support OS_Word 7 (by passing it to
Sound_ControlPacked), and it's what BASIC passes SOUND to. BASIC also
passes ENVELOPE to OS_Word 8, in case anyone does implement it. Unknown
OS_Words are offered to Service_UKWord, then dropped without error.
Kevin