Google Mail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
BEEP to PLAY conversion?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Follow-up To:
Add Cc | Add Follow-up to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers that you hear
 
zxbruno  
View profile   Translate to Translated (View Original)
 More options 28 Oct, 06:17
Newsgroups: comp.sys.sinclair
From: zxbruno <zxspectrum...@gmail.com>
Date: Tue, 27 Oct 2009 23:17:32 -0700 (PDT)
Local: Wed 28 Oct 2009 06:17
Subject: BEEP to PLAY conversion?
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. :)


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
zxbruno  
View profile   Translate to Translated (View Original)
 More options 28 Oct, 06:57
Newsgroups: comp.sys.sinclair
From: zxbruno <zxspectrum...@gmail.com>
Date: Tue, 27 Oct 2009 23:57:53 -0700 (PDT)
Local: Wed 28 Oct 2009 06:57
Subject: Re: BEEP to PLAY conversion?
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.


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brian Gaff  
View profile   Translate to Translated (View Original)
 More options 28 Oct, 09:12
Newsgroups: comp.sys.sinclair
From: "Brian Gaff" <bria...@blueyonder.co.uk>
Date: Wed, 28 Oct 2009 09:12:17 GMT
Local: Wed 28 Oct 2009 09:12
Subject: Re: BEEP to PLAY conversion?
There was a program like this back in the day, but as its been a long time I
cannot recall it. Was it not part of a commercial product?
The big problem is though, you would need to do it correctly, so you would
really have to merge a line in with the beeps, and read the data using the
sysvar nextlin presumably and try to decode the floating point versions of
numbers and the keyword tokens in the line.

Brian

--
Brian Gaff - bria...@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" <zxspectrum...@gmail.com> wrote in message

news:b428f812-f6a3-4d6c-ac6a-215c84b8782d@y10g2000prg.googlegroups.com...


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matthew Westcott  
View profile   Translate to Translated (View Original)
 More options 28 Oct, 09:50
Newsgroups: comp.sys.sinclair
From: Matthew Westcott <gas...@raww.org>
Date: Wed, 28 Oct 2009 09:50:02 +0000
Local: Wed 28 Oct 2009 09:50
Subject: Re: BEEP to PLAY conversion?

zxbruno wrote:
> 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.

Would LET O=INT (N/12)+5 work?

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Fred  
View profile   Translate to Translated (View Original)
 More options 28 Oct, 11:53
Newsgroups: comp.sys.sinclair
From: Fred <fr...@spamcop.net>
Date: Wed, 28 Oct 2009 22:53:03 +1100
Local: Wed 28 Oct 2009 11:53
Subject: Re: BEEP to PLAY conversion?

zxbruno wrote:
> Is there a mathematical way to
> determine which PLAY octave the BEEP pitch belongs too?

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


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
OwenBot  
View profile   Translate to Translated (View Original)
 More options 28 Oct, 12:10
Newsgroups: comp.sys.sinclair
From: OwenBot <cheve...@gmail.com>
Date: Wed, 28 Oct 2009 05:10:46 -0700 (PDT)
Local: Wed 28 Oct 2009 12:10
Subject: Re: BEEP to PLAY conversion?
You've already got enough info to write an AY playback routine for
GarageBEEP. But why would you? You should really give Vortex Tracker
II a go. It's really very easy to use.

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google