1 (edited by Shiru 2021-02-07 01:25:28)

Topic: Faulty Robots - Commodore PET music album

Long story short, I made a 8-song album for Commodore PET. It works kinda like PC Speaker music, just a single channel, but with wave shaping capabilities (different bit patterns) instead of regular square wave. No multichannel synthesis there, although it is sure possible on this beast.

https://www.youtube.com/watch?v=JEhGa5avUKM

website - 1bit music - other music - youtube - bandcamp - patreon - twitter (latest news there)

Re: Faulty Robots - Commodore PET music album

Ahh yes! Fantastic work. Still blows my mind that monophonic stuff can sound so great.

So he didn't use your music in the game after all?

Re: Faulty Robots - Commodore PET music album

nice :-)

I don't know why but I like the 5th, even though it's the most conservative ...

Re: Faulty Robots - Commodore PET music album

I did finish code for PET, VIC, and C64, but integration failed on the last mile - something conflicted or glitched, and my code didn't work in PET and C64 versions inside actual game by reasons unknown. As the integration was done on binary level (not source level), and I don't have a real PET or C64, and available debuggers leave a lot to be desired, and the game was already released anyways (first copies were done without sound), we're ended up with only using VIC-20 part for sound effects. David opted to do his own sound code and even a native tracker for PET instead.

As for music, initially it was supposed that I'll compose it all, to the strengths of my sound code, but as its development was lagging behind a lot, it was decided that Noelle will do SID music in goattracker, and I'll have to convert it for PET/VIC, which didn't work well, of course. So none of my music was used, and that's why I decided to release it as a standalone album.

I covered up the story in my Patreon blog, there is a few posts, you can follow it up by the 'pet robots' tag. Planning to do two more, one on the music editing process (1tracker this time) and data format (pretty compact, the songs 1000-1500 bytes large each), and another one on making of the album itself.

website - 1bit music - other music - youtube - bandcamp - patreon - twitter (latest news there)

Re: Faulty Robots - Commodore PET music album

That's a pity. Well, at least we're getting this excellent music release. Anyway, thanks for the good read. Looking forward to the upcoming ones, especially the data format one. I'm also curious about your experiences with VIC. Writing a player with support for "viznut" waveforms has been on my bucket list for a long time. Sounds like I might be in for some nasty surprises, though.

6 (edited by Shiru 2021-02-07 20:27:10)

Re: Faulty Robots - Commodore PET music album

I did implement the viznut waveforms for the VIC-20. It was full of nasty surprises for sure, given the difficulty of making well timed 6502 code (added cycles here and there depending on code/vars locations), and really lacking debug tools. Even worse, VICE has some weird audio filtering going on, and MAME does not support expanded RAM for VIC (5K default model only), so I was not able to hear the sound properly, and my test code didn't fit to run in MAME.

It worked in the end, however, it wasn't much suitable for music. The thing is that these waveforms always contains 8 zeroes and 8 ones, just arranged in different ways. So it can't do the usual 50-25-12-7 duty cycle, or arbitrary bit patterns of PET, it just adds high pitched harmonics into square wave. So a special arrangement for music is a must, that would mostly rely of square wave and emphasize some parts using waveforms.

Here is the key part of the code (waveform_table there is to attempt to arrange waveforms in order from regular bold square to the thinest one):

set_pitch_and_wave:

    pha    
    tya
    bne :+
    
    sta <PV_WAVE_PREV,x
    lda #$7e
    sta VIC20_LOW,x
    pla
    rts
:
    
    asl a
    tay
        
    lda waveform_table,y
    iny
    
    cmp PV_WAVE_PREV,x
    beq @skip_wave
    
    sta PV_WAVE_PREV,x
    sta PV_WAVE_PTN
    
    lda #$7e
    sta VIC20_LOW,x
    
    lda waveform_table,y
    
    ldy #100/5                ;delay t-states/5
:
    dey
    bne :-

    tay

@loop:

    lda <PV_WAVE_PTN        ;3
    and #$80                ;2
    ora wavecnt_table,x        ;4+
    sta VIC20_LOW,x            ;4+
    asl <PV_WAVE_PTN        ;5
    lda <PV_WAVE_PTN        ;3
    nop                        ;2
    nop                        ;2
    nop                        ;2
    dey                        ;2
    bne @loop                ;2/3=32t

@skip_wave:

    pla
    tay
    lda (PV_NOTE_TABLE),y
    sta VIC20_LOW,x
    
    rts

wavecnt_table:

    .byte $7d,$7b,$79
    
waveform_table:

    .byte %11000000,3    ;00
    .byte %10010000,6    ;14
    .byte %10100000,5    ;09
    .byte %10100000,4    ;12
    .byte %10110000,6    ;11
    .byte %10110000,5    ;07
    .byte %10000000,2    ;01
    .byte %10000000,3    ;04
    .byte %11010000,5    ;08
    .byte %10101000,6    ;13
    .byte %10010000,5    ;06
    .byte %11100000,4    ;03
    .byte %10110000,4    ;02
    .byte %11000000,5    ;10
    .byte %10000000,4    ;05
    .byte %00000000,0    ;15

In fact, I think I'll release the whole sound code sometime later. Released album code contains most of it anyways, it only missing VIC-20, C64 and NES dependent parts.

website - 1bit music - other music - youtube - bandcamp - patreon - twitter (latest news there)

Re: Faulty Robots - Commodore PET music album

Released the whole source code for PeskyTone, the music player with VIC-20, C64, and NES support. I also have a half-working Plus/4 support, but there is another mysterious issue that I couldn't figure out yet, so it is omitted for now.

website - 1bit music - other music - youtube - bandcamp - patreon - twitter (latest news there)

Re: Faulty Robots - Commodore PET music album

Great!

Too bad it's not available for Atari sad

Re: Faulty Robots - Commodore PET music album

I was thinking to get it working on the 2600, too, using a trick to get a reasonably well tuned notes, but left it out for possible future updates, otherwise it could stay in the unreleased limbo for even longer.

website - 1bit music - other music - youtube - bandcamp - patreon - twitter (latest news there)

10

Re: Faulty Robots - Commodore PET music album

I meant the Atari 800XL ...

Re: Faulty Robots - Commodore PET music album

Making of Faulty Robots article is finally available in English.

website - 1bit music - other music - youtube - bandcamp - patreon - twitter (latest news there)

Re: Faulty Robots - Commodore PET music album

Very interesting read.

Just downloaded the album from bandcamp, love listening to these tunes (I still listen to system beeps in the car on my daily commute).
Something very appealing about this type of sound smile

Will there be any recordings of the Speccy versions of these tracks or the engine included in 1tracker ?

Re: Faulty Robots - Commodore PET music album

I don't have an authentic Speccy, it does not make much sense to make recordings of the Speccy versions on my end - it would be a basic recording from an emulator. I do have a ZX Evo, but it is not too far from an emulator.

As for making the ZX engine available. Well, it is a kinda tricky thing. The music authoring system is based on 1tracker, and I released the corresponding plug-in and 6502 code. However, it sounds not exactly the same as the actual PET player, or the player from ZX Faulty Robots album. To make ZX port of the album, I did a converter that takes the data in the original 6502 format (a pattern based module), plays it virtually (with a C version of the player), and records down the resulting pitch/waveform stream, putting all the pattern parsing calculations offline. I guess I just need to turn this converter into another 1tracker plugin, so the resulting sound would be most authentic, and the music data would not require any processing before putting it into a ZX program. In short, it isn't directly available yet, but I'll think on how to make it properly.

website - 1bit music - other music - youtube - bandcamp - patreon - twitter (latest news there)

Re: Faulty Robots - Commodore PET music album

Took a while, but I implemented the above as PeskySoundZX engine for 1tracker. The downside is that music data pretty large compared to the 6502 original engine, but it is not too bad, and the sound is all clean.

website - 1bit music - other music - youtube - bandcamp - patreon - twitter (latest news there)