Maybe something was already done and published on your favorite
Sinclair magazine back in the day. One can only hope. :)
Ok, some type of progress has been made...
BEEP---------PLAY
0--------------------c
1------------------#c
2--------------------d
3------------------#d
4--------------------e
5--------------------f
6------------------#f
7--------------------g
8------------------#g
9--------------------a
10------------------#a
11-------------------b
Which makes me ask a few more questions.
How would I go about figuring out which Octave BEEP is using just by
consering the pitch value? For example, BEEP .05,0 translates as PLAY
"c", but BEEP .05,12 is PLAY "O6c". Is there a mathematical way to
determine which PLAY octave the BEEP pitch belongs too? The only way I
can think of is by doing this:
LET O=(5 AND N>=0 AND N<=11)+(6 AND N>=12 AND N<=23), etc.
Secondly, if PAUSE was used to create the BEEP tune, what would be the
best way to translate this to what PLAY uses?
And thirdly, I still have to come up with a table of BEEP durations
and their corresponding 9 possible note lenghts when using PLAY.
I think these three things will probably be enough for a decent
conversion. Will post more as this gets developed.
Brian
--
Brian Gaff - bri...@blueyonder.co.uk
Note:- In order to reduce spam, any email without 'Brian Gaff'
in the display name may be lost.
Blind user, so no pictures please!
"zxbruno" <zxspec...@gmail.com> wrote in message
news:b428f812-f6a3-4d6c...@y10g2000prg.googlegroups.com...
Would LET O=INT (N/12)+5 work?
Don't know, but Beta Basic 4.0 has interrupt driven AY sound in the
BEEP! command which puts data directly into the AY registers.
The Beta Basic 4.0 manual says:
> The old BEEP numbers and the [AY] tone period are related like this:
> Tone Period=INT (125.95/2^((Beep Number-9)/12)+.5)
I think you could use that to derive the data required by an interrupt
driven playback routine rather than PLAY.
zxbruno wrote:
> Secondly, if PAUSE was used to create the BEEP tune, what would be the
> best way to translate this to what PLAY uses?
Still a slight tangent, but the Beta Basic manual suggests using a 0
tone period for this for its BEEP! command (which is not what PLAY uses
obviously).
On topic, the Spectrum 128 manual says:
> A rest (no note playing) is specified by a & and has the same length
> as the current note. For example
>
> 10 LET a$="7A&B&C&D&E"
>
> is five minims with equal pauses between them.
So you would set the note duration to match the PAUSE and use an "&".
Hope that helps,
Fred