On Oct 27, 11:17 pm, zxbruno <zxspectrum
...@gmail.com> wrote:
> Does anyone know of a BASIC or machine code routine that can process a
> list of BEEP commands and display what would be the equivalent if
> using the PLAY command in 128K BASIC? I think I know how to do it but
> my method would be in BASIC and it would probably be done the hard
> way. I would probably read all BEEP commands on a BASIC listing and
> output 1 string that could be viewed and saved, or maybe it would read
> all BEEP commands if they were on DATA statements, and it would
> probably get a little bit more complicated if I had to interpret PAUSE
> commands between BEEPs. :|
> 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.