Page 1 of 1

Little sound fx generator

Posted: Tue Jun 08, 2021 12:04 pm
by rax
Hi all :),

For the "jetpac" game I decided to make a small sound effects editor. Unfortunately the capabilities of this type of sound are limited, and I'm not sure if it will work for me.

I haven't tested it completely, and there may be a bug I missed. I'm not even sure the interface is intuitive enough.

Тhe editor is not finished and functionalities like "save", "load", "print" are not done. I don't know when I will be able to finish it, given that I don't think it will work for me, so I'm publishing it as it is now.

But I think editor would help to better understand AY-3.


sfxgen-beta02.tap
(10.97 KiB) Downloaded 217 times

Re: Little sound fx generator

Posted: Tue Jun 08, 2021 10:04 pm
by Chema
Nice. You remind me of Twiligthe... making your own Oric tools such as this :)

Re: Little sound fx generator

Posted: Wed Jun 09, 2021 6:00 am
by coco.oric
i've looked at youtube your tool
Nice one, to make some experiments

Re: Little sound fx generator

Posted: Wed Jun 09, 2021 8:19 am
by ibisum
Its cool! Are you going to add a "scan ROM for synth values" feature, like Twilighte added to his all those years ago? That was fun, stepping through the ROM binary, using it to seed the synth chip with values ..

Re: Little sound fx generator

Posted: Wed Jun 09, 2021 10:18 am
by jbperin
I downloaded and tried this tool and I must say that it is, IMHO, the most convenient way to experiment with the AY chip. :o :shock:
Thank you very much for sharing it with us. :D :D

I'm a bit surprised by:
- some channel volume values in some provided sound fx (values higher than 31 should not be relevant)
- envelop numbering strategy

But I find the interface is very ergonomic and handy. It clearly makes this tool a "must have" for sound designers on Oric.

PS: as for the capabilities of this type of sound, I'm currently working on a way to produce high quality PCM sample encoding/replayer based on viterbi algorithm.
It is based on the one provided here : https://www.msx.org/forum/development/m ... s-poor-psg
I'm almost done with the encoder and now need to write the replayer.
But as I'm very slow at work .. it might takes time before I finish it and then not sure it will be on time for the JetPac Game

Re: Little sound fx generator

Posted: Wed Jun 09, 2021 1:34 pm
by Chema
It looks a lot like an advanced version of this, which I used to create the SFX in 1337, btw.

For anything more complex, you'll need a kind of a sound engine. I made a simple (even naive) approach for Oricium which I reused for Blake's 7. Maybe that could bring you ideas for something more advanced or usable... :D

Re: Little sound fx generator

Posted: Thu Jun 10, 2021 8:53 am
by rax
Thanks! :)
ibisum wrote: Wed Jun 09, 2021 8:19 am Its cool! Are you going to add a "scan ROM for synth values" feature, like Twilighte added to his all those years ago? That was fun, stepping through the ROM binary, using it to seed the synth chip with values ..
No problem:). Show me this feature.
jbperin wrote: Wed Jun 09, 2021 10:18 am I'm a bit surprised by:
- some channel volume values in some provided sound fx (values higher than 31 should not be relevant)
- envelop numbering strategy
I don't know. I guess even if the value is greater, only the bits ones that matter are taken.
I hope to see your sound engine soon :)

Chema wrote: Wed Jun 09, 2021 1:34 pm It looks a lot like an advanced version of this, which I used to create the SFX in 1337, btw.

For anything more complex, you'll need a kind of a sound engine. I made a simple (even naive) approach for Oricium which I reused for Blake's 7. Maybe that could bring you ideas for something more advanced or usable... :D
Yes, this is really an improved version of SDES2.dsk :). I tried to work with it, but when I tried to activate the sound and noise channel, it always took me a while to calculate the value.

Indeed, these sounds that are generated are quite simple. A more complex sound engine is needed for me.

I looked at Oricium and Blake's 7 and saw the engine, but I couldn't figure out how values could be generated for it.

I'm working on another engine, but I don't know what will come out and whether something useful will happen.

Re: Little sound fx generator

Posted: Thu Jun 10, 2021 2:28 pm
by Chema
rax wrote: Thu Jun 10, 2021 8:53 am I looked at Oricium and Blake's 7 and saw the engine, but I couldn't figure out how values could be generated for it.
That is probably because I made it for my own usage, and it is dirty indeed :oops:

I encoded all the values in .byt statements and used #defnies to ease things a bit, but I did that by hand... In fact it is not as hard as it seems, both the data format and the engine itself. The engine is, I admit that, full of kludges and patches and, most probably, bugs. My only intention was to have something simple and compact in memory (I needed that), sacrificing generality and features. But it can play small tunes which are a few hundred bytes in data, and also plays sound effects with priorities, so whenever you want to play an effect, the engine tries to find an empty channel and, if it does not exist, will take one with lowest priority or simply won't be played.

I know how rewarding is to walk a path by oneself, but if you are interested I can provide any information you want.

Cheers!

Re: Little sound fx generator

Posted: Fri Jun 11, 2021 10:26 am
by Dom
Downloaded and tried.
Very nice tool which should be very useful to games developpers.
The interface is , for me, enough intuitive :)
The AY ship offers so many possibilities of parmameters combination that introducing parameters only by hasard is not a good method imho.
That's why I found the "O" option very usefull to start from known noises to investigate the effect of slight changes in parametters around these.
Thanks a lot for this tool Rax :) !

Re: Little sound fx generator

Posted: Sat Jun 12, 2021 8:18 pm
by rax
Chema wrote: Thu Jun 10, 2021 2:28 pm
I know how rewarding is to walk a path by oneself, but if you are interested I can provide any information you want.
Thanks Chema,
Yes, indeed the path we follow is interesting and rewarding.

Thanks for the suggestion. A little extra information would be good to have. New ideas may appear, and someone else may be inspired to do something alternative :)

I have a few ideas, but I haven't realized anything yet.

Re: Little sound fx generator

Posted: Sat Jun 12, 2021 8:23 pm
by rax
Dom wrote: Fri Jun 11, 2021 10:26 am ...
Thanks Dom,

I hope this little program is really useful to someone :)

Re: Little sound fx generator

Posted: Tue Jun 29, 2021 6:57 pm
by goyo
I made a smaller tool like Rax's sound tool few years ago.
'r' key to make sound randomly
'd' to view data
gensound.tap
(16.97 KiB) Downloaded 219 times

Re: Little sound fx generator

Posted: Wed Oct 06, 2021 8:58 pm
by rax
goyo wrote: Tue Jun 29, 2021 6:57 pm I made a smaller tool like Rax's sound tool few years ago.
'r' key to make sound randomly
'd' to view data
gensound.tap
Good sound generator. If I knew her, I wouldn't do mine :).
I think channel A (low byte) is not working properly in your generator.

Re: Little sound fx generator

Posted: Thu Oct 07, 2021 6:06 am
by ibisum
rax/goyo: The idea of the "ROM sound collection" is that you scan the ROM for bytes, and use those bytes as values to be sent to the AY. Twilighte did this in one of his early sound tools, and it was delightful to go through the ROM and find strange and interesting sounds. If I recall correctly this was suggested as a technique for squeezing nearly-infinite sound effects into as few bytes as possible, since everyone had the sound-set (the ROM itself) already available.

I'll see if I can find his implementation, its been a while and I have tons of .TAP's to go through in my oric/synth/ folder ..

Re: Little sound fx generator

Posted: Thu Oct 07, 2021 7:03 am
by iss
ibisum wrote: Thu Oct 07, 2021 6:06 am...since everyone had the sound-set (the ROM itself) already available.
This is great idea but has a drawback in regard of compatibility i.e. Oric-1/Atmos have different ROMs ;).

Re: Little sound fx generator

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

Re: Little sound fx generator

Posted: Tue Nov 30, 2021 8:43 pm
by ibisum
Neat.

Re: Little sound fx generator

Posted: Tue Nov 30, 2021 8:59 pm
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.

Re: Little sound fx generator

Posted: Wed Dec 01, 2021 10:13 am
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.

Re: Little sound fx generator

Posted: Tue Jan 17, 2023 3:52 pm
by rax
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:

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
Each bank is printed independently.

sfxgen-beta03.tap
(12.44 KiB) Downloaded 113 times


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.