[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Very basic sound programming question
On Mar 31, 4:48 am, Jim <j...@magrathea.plus.com> wrote:
> On 2009-03-31, Simon D. Williams <ad...@retro-net.org> wrote:
>
> > On Tue, 31 Mar 2009, Jim wrote:
>
> >> Out of interest is there any way to control volume?
>
> > Not trivially... there are some assembly programs from the Assembly Lines
> > zine that claim to support some limited volume control, but I've never
> > got round to trying them...
>
> Right-o, thanks. It's not really a problem but I just thought I'd ask.
>
>
>
> > Alternately you could use DAC.522 to playback actual samples. You could
> > even dynamically generate the samples if the waveforms are simple enough.
>
> Due to the limitations of my system (the serial card isn't a Super Serial
> Card, or compatible enough) I can't use something like ATDPro to get stuff
> over onto my //e.
>
> The reason I'm after the sound programming advice is actually rather childish
> - I use my //e to monitor my main FreeBSD box's filewall (it outputs it over
> a serial link) at a suitably silly baud rate (300 or less) for that
> authentic early-80's feel. I just want to generate some suitably silly
> sounds while it's doing that.
>
> I _was_ just using X = PEEK (-16336) to click the speaker, but since I
> just erased the programme by mistake and need to re-enter it, I thought I'd
> try for something a little less...cicky.
>
> Told you it was childish..:-)
>
> Jim
> --http://www.ursaMinorBeta.co.uk http://twitter.com/GreyAreaUK
> Please help save Bletchley Park - sign the petition for
> Government funding at: (open to UK residents and ex.pats)http://petitions.number10.gov.uk/BletchleyPark/ ; Thank you.
Here is an assimilation volume control I came across in ML
300: A0 90 LDY #90
302: A9 60 LDY #60
304: 38 SEC
305: ED 14 03 SBC 0314
308: 8D 0C 03 STA 030C
30B: A2 01 LDX #01
30D: CA DEX
30E: DO FD BNE 030D
310: AD 30 C0 LDA C030
313: A2 60 LDX #60
315: CA DEX
316: D0 FD BNE 0315
318: AD 30 C0 LDA C030
31B: 88 DEY
31C: D0 ED BNE 30B
31E: 60 RTS
DURATION $301 (769), PITCH $303 (771), VOLUME $314 (788)
For Volume, the maximum is half the number for the pitch.
1=softest pitch/2=loudest
Test with this
320:A9 01 8D 14 03 EE 14 03 AD 14 03 C9 60 D0 F3 60
Rob