Apple-1 ACI Music Player: Also the Apple-1 has a sound card ;)

3 posts / 0 new
Last post
Offline
Last seen: 4 months 2 weeks ago
Joined: Nov 30 2014 - 19:10
Posts: 35
Apple-1 ACI Music Player: Also the Apple-1 has a sound card ;)
AttachmentSize
Package icon AudioPlayer_Demo_010.zip1.43 MB

Hello to All,

I am doing experiments with my Apple-1 ARM Replica, and after a lot of work on the ACI driver, I can save and load programs and data into real tape cassette. While working on this driver I tried to generate some sound, as if the ACI was a sound card. It was so fun that I developed a tiny music player with a simple tone generator and a note sequencer. The first music I tried to compose is the theme of the movie "Back to the future" Smile

In attachment you can ear te sample taken directly from my emulator. I am pretty happy but I will be real happy if this worked also on a real hardware. So is there somebody who wants to try this for me? Smile
The program saved hopefully should load also on the real hardware by typing:

C100R
270.487R

and then launch the song typing:

300R

You should hear the music...

The main program starts at 300, even if there are parameters and variables starting at 277. Music data starts from 400, and every note is a group of 5 bytes. Pauses are treated as notes as well but without toggling the output line. If this works also on the real hardware I will put the assembly source code online of course. Who knows maybe this gives a new life to Apple-1 Wink

Biggrin Thank you all!

Offline
Last seen: 1 week 1 day ago
Joined: Oct 9 2011 - 12:54
Posts: 1352
Re: Apple-1 ACI Music Player: Also the Apple-1 has a sound ...

Yep you can use the ACI on the real hardware to make sounds. I posted a few years back the code for twinkle twinkle little star. I also use it for my ascii graphics lunar lander basic program to make sound effects.

Cheers,
Corey

Offline
Last seen: 4 months 2 weeks ago
Joined: Nov 30 2014 - 19:10
Posts: 35
Re: Apple-1 ACI Music Player: Also the Apple-1 has a sound ...

Cool, I didn't see that. Smile

I just saw your post, so the audio engine is called from the BASIC by setting the note and the duration, is it correct? In my engine there is a main "loop" that continuously update the tone oscillator according to the current period of the frequency to play. There is also the counter of the duration of the note that is decremented for each iteration. When this counter reaches zero the next note is loaded and the loop goes on.

I worked also on a white noise generator with a LFSR register divided into two bytes. My original idea was to create a super simplified version of a module tracker like the AMIGA ones, but with one channel only and two instruments(a tone and a Noise).
The Noise works, but in the whole loop everything becomes slow Sad

Currently my emulator may be not so accurate in timings because of the ISR routine that generates the video signal. I am porting the emulator on a faster board, and converting the scanline renderer to use a DMA channel to free the CPU. So I will see if I can come up with something interesting Smile

Log in or register to post comments