Topic: AY + Beeper

Crossing another item off my to-do list, which has been on there for an awful long time.

This is just a little experiment to demonstrate that it can be done. I have no intentions of developing this into a full sound driver at the moment, mainly because I'm totally sick of writing these XM converters.

The beeper part is basically a simplified version of Squeeker with 3 channels and variable duty cylces. The AY part is very basic, just tones and software-generated envelopes. Noise is certainly possible, I was just too lazy to implement it. Perhaps buzzer could be done as well, after all it's just copying the values from the envelope register to a volume register, right? Anyway, check out the source code for inspiration, if you like.

Post's attachments

main.asm 4.31 kb, 5 downloads since 2016-08-01 

music.asm 9.79 kb, 3 downloads since 2016-08-01 

test.tap 3.65 kb, 7 downloads since 2016-08-01 

You don't have the permssions to download the attachments of this post.

Re: AY + Beeper

I am currently working on something slightly similar, AY+Beeper mixed driver. Beeper will be used for digital drums.

Re: AY + Beeper

Hehe, well this is something new ! 
Very cool smile

Re: AY + Beeper

Abrimaal has done some hybrid engine work too smile


http://battleofthebits.org/arena/Entry/ … %29/19488/

http://battleofthebits.org/arena/Entry/ … iel/15148/

Re: AY + Beeper

Cheers guys wink Yes, Abrimaal's work actually renewed my interest in doing this.

introspec, so basically like a reverse Tim Follin player? big_smile

Re: AY + Beeper

it sounds very nice together, and this tune is great!

7 (edited by abrimaal 2016-08-02 01:52:32)

Re: AY + Beeper

Utz, I'm impressed with your work.

I've done two modifications of Special FX engine.
In the first one I used the drum routine to play the AY basses as a third independent channel, but...
I wanted the music to be editable in Beepola, so the limit was 4 bass notes + AY mute.
I chose notes D, F, A and A# as the best synchronized and hard-wired them to drums 1-4.
Drum 5 is used as AY mute.

In the Beepola SFX editor you can use more drums, but only drums 1 to 5 are exported to asm music data.
You can use other notes, but the values of DRM patterns must be changed manually in a text editor
or if you want to use 4 different notes, simply change them in the asm for drums 1-4
The values in the DRM patterns are 129 - 132 for drums 1-4, 133 for AY mute, they are exported automatically.
The drums 6+ use higher values 134+
The test is the pattern 4. Notes E, F#, G, B are used as drums 6-9.

The original beeper drums may be added to the music, but carefully. When the AY note is changed, a drum is released.
That's why there are only beeper drums 1 and 3 arranged.
Separation of beeper drums and AY bass is possible, but it would require re-writing the engine, to store the data for drums and AY bass in separate columns or use bits of the tracker notation (if any bits are free).

The zip contains a Beepola tracker file, a ZX tape and assembly of the engine and music data.
The tape runs with USR 60000 (or RANDOMIZE USR 60000 on ZX48), This is only a short example to see that almost everything may be edited in Beepola.
Compile Beepola music as data only .asm, remove the ORG at the beginning and re-assembly with the DoomBass.

Post's attachments

doombass01.zip 6.19 kb, 7 downloads since 2016-08-02 

You don't have the permssions to download the attachments of this post.
AYGOR and computer projects: http://abrimaal.pro-e.pl/zx/
Abrimaal music: http://abrimaal.pro-e.pl/music/

Re: AY + Beeper

utz wrote:

introspec, so basically like a reverse Tim Follin player? big_smile

No, not really, Tim Follin's player is not a real inspiration. This one is: http://zxart.ee/eng/authors/j/jonathan- … -beeper-1/

Of course, we can do better nowadays. Much better in fact.

9 (edited by utz 2016-08-02 12:43:54)

Re: AY + Beeper

introspec, I meant because Follin player is Beeper + AY drums, and yours will be AY + Beeper drums wink

abrimaal, nice work, and thank you for sharing the sources (and welcome to the new 1-bit forum, btw). Indeed, it is always a problem to find a way to edit music for new drivers. That's why I'm now trying to create a C++ library for extracting data from XM files. Ideally, this would allow for very quick creation of XM converters, but at the moment it is still too inconsisten and instable to be used productively.

In case of doombass, perhaps FrankT could help unlock the extra drums? He's done quite a bit of patching in the Beepola code, so he might have an idea where the relevant parameter for the limit of drums is hidden. Frank, where are you man?

EDIT: Couldn't resist trying to implement the Buzzer effect. Voilà.

Post's attachments

test.tap 7.98 kb, 12 downloads since 2016-08-02 

You don't have the permssions to download the attachments of this post.

10 (edited by abrimaal 2016-08-02 17:46:50)

Re: AY + Beeper

I think it's not the way with drums. For the full octave there should be 12 drums. If we want to extend the range, change waveforms, use all 3 AY channels, the number of drums should be unlimited.

I talked some time ago via fb chat with Chris (if this is the same person as FrankT), he said that AY emulation is not implemented in Beepola, but it is possible.

The best would be as you did it in your engine prototype, at least 1 byte for each AY channel in the tracker data. I'm not good enough to code it.
Or if we want it simpler, one AY channel and one more byte in the tracker data, that defines the AY note and calls the AY player before playing the beeper note.

AYGOR and computer projects: http://abrimaal.pro-e.pl/zx/
Abrimaal music: http://abrimaal.pro-e.pl/music/

Re: AY + Beeper

Hi abrimaal

welcome back to the forum smile

Love your hybrid and multi-engine / digital stuff. Also, great idea to use Beepola for the editor.

utz - wow, the buzzer effect sounds amazing over the Beeper big_smile

Re: AY + Beeper

utz wrote:

In case of doombass, perhaps FrankT could help unlock the extra drums? He's done quite a bit of patching in the Beepola code, so he might have an idea where the relevant parameter for the limit of drums is hidden. Frank, where are you man?

I'm here.  Been working on other non speccy stuff.

I don't have any idea about how to get Beepola to export drums above what's available for SFX engine.
The way I'd do it is make a binary song data to assembly listing converter in C.  Providing drums above 5 are written in the binary.  Like I did for converting bbsong's to Vortex Tracker text format.

13

Re: AY + Beeper

Working on speccy stuff? Blasphemy! big_smile

The problem is, drums > 5 can't be entered in Beepola iirc. I'd think that's a hard limit encoded with the engine somewhere, since with other engines Beepola quite happily accepts higher numbers. So, basically it just might be a question of finding that number and changing it. But yeah, chances to find it in the binary are probably not exactly great.

14 (edited by abrimaal 2016-08-13 22:01:10)

Re: AY + Beeper

In the SFX engine patterns bit 7 set (>=128) is a drum or a special command. The drums 1-5 in the music data are numbered 129-133.
When changing the drum numbers to higher, the engine is working normally. I have tried 134-137, what are drums 6-9.
But we must remember to define the extra drums here:

               DEFB  $21                   ; LD HL,nn
PERC_PATT:     DEFW  $0000                 ; Address of the percussion data
               LD    A,(HL)
               INC   HL
               LD    C,(HL)
               INC   HL
               LD    (PERC_PATT),HL        ; Point PERC_PATT at next datum
               AND   $7F
               CALL  JUMP_PERC_ADDR
               DEFW  DRUM00               
               DEFW  DRUM01               
               DEFW  DRUM02               
               DEFW  DRUM03               
               DEFW  DRUM04               
               DEFW  DRUM05               
            DEFW  DRUM06
        DEFW  DRUM07
        DEFW  DRUM08
        DEFW  DRUM09

How many "drums" can be used, I haven't tested yet, maybe up to 255, but the bit 7 is responsible also for such commands like sustain change, end of pattern.
Numbers > 128 in the note patterns have a different meaning than the same numbers in the drum patterns.

AYGOR and computer projects: http://abrimaal.pro-e.pl/zx/
Abrimaal music: http://abrimaal.pro-e.pl/music/