I was looking for a way to make some sounds for Encounter, and decided to give a shot at the SNDFX Gen program.
It has all the bases for something nice, but I think handling envelope differently would provide much larger possibilities
Let me explain:
The YM chip enveloppes are very basic, there is only one usable for the all three channels, and the worse is that you lose control on the volume, so personally I would not use the hardware enveloppes at all to do sound shaping, I would only use them (leave them for the music for example) to actually define the grittiness of a sound, the sound texture if you want, where you play it on auto repeat at a much higher frequency than you would normally change sound parameter.
Instead of using the enveloppe, I would just manually change the volume in the IRQ callback, like 50 or 100 times a second, which allows you to do things normally not doable with the AY, like:
- Start and end at any volume you want
- Possibility to have custom attack, decay, sustain and release values
- Possibility to interpolate volume cleanly from one sound to another
- Possibility to have different shapes for each of the three channels
When I worked on my entry for the CEO competition I wrote a small "virtual registers" implementation, which allows the main code to change all the registers easily and only update them when needed in the IRQ to avoid weird sound conflicts, not sure if that can help anyone but it's here if anyone is interested:
https://osdn.net/projects/oricsdk/scm/s ... Road/vbl.s
Little sound fx generator
- ibisum
- Wing Commander
- Posts: 1652
- Joined: Fri Apr 03, 2009 8:56 am
- Location: Vienna, Austria
- Contact:
Re: Little sound fx generator
Neat.
Last edited by ibisum on Tue Nov 30, 2021 9:15 pm, edited 1 time in total.
Re: Little sound fx generator
I fully agree. When I was developing Oricium I wanted a small, memory optimising, CPU-non-intensive sound engine for SFX and Music (small tunes) and I came up with the same conclusion. Avoid EG and add some kind of ADSR. I did something very very basic, but enough for my needs. They were stored as 8 byte lists, but they were extended for the duration of the note. I also added some kind of distortion for the note, using 8 byte lists too with variations over the frequency that were looped throughout the duration of each note.
Tunes played at 50Hz, and sfx at 25Hz.
That and a system to assign sounds to channels taking priority into account, so if you wanted something to sound, it looks for an empty channel, if not found, looks for a channel playing something with less priority and assign the new sound to it, removing the old one. That worked nicely for SFX, not intended for music using all the channels.
Code is available of course, but unfortunately is full of hacks and storing a tune is also quite a manual (and cumbersome) process.
Re: Little sound fx generator
I completely agree . Тhis program was created so i can see what sounds can be created this way.
I tried to use this type of sounds in COSMIC ARK, but the result is not very good. (Maybe I'll post this game in its current state, because of many reasons).
Some time ago I made an primitive player in BOCCO'S ADVENTURES based on AYFX generator. ISS continued this idea and made a good player, working together with the PT3 player. Maybe he'll talk about it when he's 100% ready.
I tried to use this type of sounds in COSMIC ARK, but the result is not very good. (Maybe I'll post this game in its current state, because of many reasons).
Some time ago I made an primitive player in BOCCO'S ADVENTURES based on AYFX generator. ISS continued this idea and made a good player, working together with the PT3 player. Maybe he'll talk about it when he's 100% ready.
Re: Little sound fx generator
Small program upgrade.
Now the sounds can be printed to a file (printer output).
To do this, use the P key and the following should appear in the printer_out.txt file:
Each bank is printed independently.
p.s. Due to lack of space in the roguelike game, I'm thinking of trying to make the sounds with this generator. I hope it works out.
Now the sounds can be printed to a file (printer output).
To do this, use the P key and the following should appear in the printer_out.txt file:
Code: Select all
Bank 0
$A8,$BF,$00,$03,$B8,$BF,$0E,$00,$00,$00,$A7,$C2,$4C,$B0
0xA8,0xBF,0x00,0x03,0xB8,0xBF,0x0E,0x00,0x00,0x00,0xA7,0xC2,0x4C,0xB0
Bank 1
$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
Bank 2
$0E,$88,$84,$0C,$8C,$00,$45,$AD,$00,$05,$D0,$04,$A9,$C0
0x0E,0x88,0x84,0x0C,0x8C,0x00,0x45,0xAD,0x00,0x05,0xD0,0x04,0xA9,0xC0
Bank 3
$CE,$6C,$E7,$24,$89,$70,$46,$B6,$AA,$EF,$53,$F6,$0C,$A5
0xCE,0x6C,0xE7,0x24,0x89,0x70,0x46,0xB6,0xAA,0xEF,0x53,0xF6,0x0C,0xA5
Bank 4
$00,$04,$00,$B8,$00,$03,$78,$BE,$0C,$00,$00,$00,$A7,$C2
0x00,0x04,0x00,0xB8,0x00,0x03,0x78,0xBE,0x0C,0x00,0x00,0x00,0xA7,0xC2
Bank 5
$01,$05,$C1,$07,$07,$08,$07,$08,$35,$97,$2F,$97,$00,$98
0x01,0x05,0xC1,0x07,0x07,0x08,0x07,0x08,0x35,0x97,0x2F,0x97,0x00,0x98
Bank 6
$00,$00,$00,$00,$00,$00,$1F,$07,$10,$10,$10,$00,$18,$00
0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x07,0x10,0x10,0x10,0x00,0x18,0x00
Bank 7
$20,$86,$FA,$60,$00,$00,$00,$00,$00,$00,$1F,$07,$10,$10
0x20,0x86,0xFA,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x07,0x10,0x10
Bank 8
$18,$00,$00,$00,$00,$00,$00,$3E,$10,$00,$00,$00,$0F,$00
0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x3E,0x10,0x00,0x00,0x00,0x0F,0x00
Bank 9
$00,$00,$00,$00,$00,$00,$0F,$07,$10,$10,$10,$00,$08,$00
0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x07,0x10,0x10,0x10,0x00,0x08,0x00
p.s. Due to lack of space in the roguelike game, I'm thinking of trying to make the sounds with this generator. I hope it works out.