Little sound fx generator

This forum is about audio tools, including samplers, sound trackers, sound chip editors, how to do sound effects, etc...
User avatar
Dbug
Site Admin
Posts: 4144
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: Little sound fx generator

Post by Dbug »

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 :D

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
User avatar
ibisum
Wing Commander
Posts: 1544
Joined: Fri Apr 03, 2009 8:56 am
Location: Vienna, Austria
Contact:

Re: Little sound fx generator

Post by ibisum »

Neat.
Last edited by ibisum on Tue Nov 30, 2021 9:15 pm, edited 1 time in total.
User avatar
Chema
Game master
Posts: 2923
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: Little sound fx generator

Post by Chema »

Dbug wrote: Tue Nov 30, 2021 7:06 pm 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 :D

Let me explain:

<ZAP>
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.
User avatar
rax
Flying Officer
Posts: 152
Joined: Tue Jul 24, 2018 3:16 pm

Re: Little sound fx generator

Post by rax »

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.
Post Reply