Space99 - Music and Sound Effect Forum

Want to talks about games you like, would like to see developed on the Oric, it's here.
User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte »

There are only a handful of cases where you will need to stop the effects.
Effects don't need to be stopped in order to call the next.

For example calling an effect on Channel C will simply override the current effect on channel C.
However you can detect whether an effect is still "sounding" by reading three registers corresponding to each of the channels.
I will provide a more detailed breakdown of these registers when the code works :P

Regards music, Sonix will always take priority over the channel, however if an effect is used on a channel currently being used for a Sonix track, the Effect may sound but may be interrupted by the song and totally depends on the Songs use of that channel.
For example

Code: Select all

Song   Effect   Output
B-4             Song
-               Song
-      C-4      Effect
-               Effect
B-3             Song
User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte »

Ok, i have started to test the complete module and have successfully finished testing of the Music and Key routine. Looking at the data it is quite conceivable that we may create further tune variations if Chema or Dbug dislike my choices or have better ideas.

The SFX is currently crashing my test environment so still have some work to do.

21:09 18/11
Have just cracked some more bugs and now have music running at the same time as effects. However their are still some bugs remaining.
For the time being i can supply this module. Not source therefore not implementable but shows progress. :P

The test kit consists a simple 3 line screen with 3 options of SFX number, Channel and Music Track.

Navigate these (the >) with ZX.
Modify value with -=
Play Music Track with M
Play Effect with B
T stops Music but in a strange way atm and ESC was intended to stop Effect but doesn't atm. :!:

The best configuration is to set Music to 02 and SFX Channel to B or C then move up to top option and move through each effect (-= then B)
8)
To boot..
CLOAD"S"

http://www.defence-force.org/ftp/forum/ ... usic/s.tap

Oooh forgot to mention, to the right of the SFX Number is sometimes shown a Letter A which reflects the current activity of the effect on the selected channel. This demonstrates the simplicity of reading from EffectNumber table to test whether an effect is still running(active). :)
User avatar
Chema
Game master
Posts: 3019
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Post by Chema »

Twilighte wrote:Ok, i have started to test the complete module and have successfully finished testing of the Music and Key routine. Looking at the data it is quite conceivable that we may create further tune variations if Chema or Dbug dislike my choices or have better ideas.
Hey man! I like it A LOT. Your music variations are GREAT!

I will need help here. I lack experience in game programming, so surely some brainstorming or ideas would help...

Basically I need Twilighte (who designed the music and SFX and has a good idea what they can be used for), DBug (as expert in gaming) and any other volunteer to test the effects and let us know what you think they could be suitable for...

From the Music tracks:
00 is the main theme, what should be heard at the intro, and whenever the game is at the main screen (about to start).
01 is the Reggae variation. I'd say this could be very suitable for a PAUSE mode (I would like to add it) or at Infopost and other menus.
02 Drums. This could fit perfectly for long speeches (where the user must press a key to continue, basically, or at certain game moments).
03 Slow, dark variation. This could fit perfectly after diying (just before the user presses a key and restarts the game) but also as background in speeches (alternatively to the preceeding). Also a perfect background at some places, if played at low volume.
04 This one is quite animating for the player. Maybe it could sound for some seconds after a partial success in the game (I have to figure out when, but shouldn't be a problem... I hope).

In fact when I heard 02 and 04 I imagined them sounding after when the player has just acomplished something successfully and 03 after new challenges...

Now with the SFX. Most of them are incredible, but I have difficulties selecting where to apply them properly.

There are some beeps like 00, 02, 04, 05 that could be used for menus (advance, selection...), picking/dropping objects, switching characters, interacting with objects (when names appear)...

There are some that could be used for messages (in commlocks for instance), such as 09. Some alarms (not continuous), such as 0A, 0E can be used for power failure messages and other alarming situations. Continuous sfx such as 14 or 15 can be used whenever the situation is *really* dangerous (one for whenever power has failed and emergency lights are on, and the other when the user opens the life-support systems, for instance).

I just noticed one that could be used for opening/closing doors (in opposition to the two-version in AT, where one was increasing pitch and the other decreasing pitch) which is 01. I did not found the sounds for steps.

The one for the lifts could be 07, even if it is quite different from the older version (which also were two different sound, IIRC).

08 is also an alarm sound, but has something strange at the end. Also I think it repeats in 0F and in 18, even if the latter includes just one alarm sound in the begining.

I need to identify one for each time a character collides with an energy ball and maybe one when one character dies (just before the music).

I think we could have a very nice discussion about this, but I repeat I lack the experience to imagine where they would work better when playing...

Any ideas?

Some other sfxs are a bit weird for me, even if they are indeed nice, such as 06, 11, 12, 13. Number 10 is the weirdest :)

Again, Twilighte, you just excell making Oric play sound... I am quite impressed indeed :)

Chema
User avatar
waskol
Flight Lieutenant
Posts: 415
Joined: Wed Jun 13, 2007 8:20 pm
Location: FRANCE, Paris

Post by waskol »

Twilighte, this music is amazing !
An idea like that : for sound FX, should it be possible to use some digitalized sounds ? Since all the game is on a diskette, that would be possible... but may be the memory consideration is critical here...
User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte »

waskol wrote:An idea like that : for sound FX, should it be possible to use some digitalized sounds ? Since all the game is on a diskette, that would be possible... but may be the memory consideration is critical here...
Yes, i believe the problem would be just that. Whilst disk space might well allow it, we have not yet mastered directly feeding disk data into Sound Sample output so are reliant on loading it into Oric memory and replaying it. However i think we won't have sufficient memory to allow this. :(
Chema wrote:Hey man! I like it A LOT. Your music variations are GREAT!
For the SFX side there was a bug that permitted the effect to exit prematurely which has now been fixed but which caused some sfx to sound weird. 8)
Example 06 and 07 which are lift moving, lift stopping & opening.

Also a bug still exists that resists enabling noise on a channel which is why you couldn't find the step sounds chema. :oops:
The code did not link into your RND function either so a further glitch for the step sound. :roll:

Effects on Channel C seem not to play at any other pitch than really high which is clearly a bug and will hopefully be sorted soon.
Switching the music between tracks seems ok but Stopping the Music seems to cause some issue with effects still holding onto the channels, but i will sort this too in due time. :P

All effects were directly taken from the same dataset that you referred to (a while ago) as really liking Chema although the code was rewritten to optimise memory usage. I believe i documented them, in fact just reviewed and on page 3 of this forum there is the complete list these sound effects should match to. However 6-7 match effects on channel C so i need to review the list again. :oops: However all effects should be found in this list though not neccesarily in the order shown :P

Code: Select all

Channel A: Player sounds, foot sounds, picking up things, moving things 
0 - Switching Sound 
1 - Door opening 
2 - Door closing 
3 - Object picking ("pic"-like sound) 
4 - Object dropping 
5 - Stepping sound #1 (two at different pitch, such as the two Oric's kbd clicks). 
6 - Stepping sound #2 
7 - Effect #1 for dialogue with other characters. (Maybe not needed) 

Channel B: Set Music like hifi music, Computer room blips and blops, Menu system event sounds. 
0 - New message through commlink. 
1 - Beep for information messages in text area. 
2 - Effect #1 for infopost menu system (selection changes and CTRL) 
3 - Effect #2 for infopost menu system (selection changes and CTRL) 
4 - Effect #3 for infopost menu system (selection changes and CTRL) 
5 - Effect #4 for infopost menu system (selection changes and CTRL) 
6 - Computer Room Blips #1 
7 - Computer Room Blips #2 

Channel C: Other object sounds like robot shuffling and lift movement. 
0 - Alarm #1 for power low 
1 - Alarm #1 for life support low. (something continuous on the background or something to sound when the text messages appear?) 
2 - Robot Shuffle 
3 - Lift Door Open (swish) 
4 - Lift Door Shut (Swish Ding) 
5 - Lift Moving (Continuous) 
6 - Lift Stopping
Chema wrote:Now with the SFX. Most of them are incredible, but I have difficulties selecting where to apply them properly.
Lets not reinvent the wheel
Chema wrote:Again, Twilighte, you just excell making Oric play sound... I am quite impressed indeed
So the wait was worth it?
Lets get them in the game then congratulate me. :P

Man, work sucks today, impossible to do anything atm, everything is hindering me.
User avatar
Chema
Game master
Posts: 3019
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Post by Chema »

Twilighte wrote:
waskol wrote:An idea like that : for sound FX, should it be possible to use some digitalized sounds ? Since all the game is on a diskette, that would be possible... but may be the memory consideration is critical here...
Yes, i believe the problem would be just that. Whilst disk space might well allow it, we have not yet mastered directly feeding disk data into Sound Sample output so are reliant on loading it into Oric memory and replaying it. However i think we won't have sufficient memory to allow this. :(
I agree. We could try to gain some Kb to do something, but it will be difficult and, from my pov, not worth it.
For the SFX side there was a bug that permitted the effect to exit prematurely which has now been fixed but which caused some sfx to sound weird. 8)
I now understand a couple of things :wink:

All effects were directly taken from the same dataset that you referred to (a while ago) as really liking Chema although the code was rewritten to optimise memory usage. I believe i documented them, in fact just reviewed and on page 3 of this forum there is the complete list these sound effects should match to. However 6-7 match effects on channel C so i need to review the list again. :oops: However all effects should be found in this list though not neccesarily in the order shown :P
I almost forgot that list. Perfect then. I still think that some of these could be omitted (4 effects for infopost menu systems seem too many? maybe just one for slection changes and one for item choosing --CTRL--, only one stepping sound...). In addition I will need something for enemy hits :)
Chema wrote:Again, Twilighte, you just excell making Oric play sound... I am quite impressed indeed
So the wait was worth it?
Lets get them in the game then congratulate me. :P
Indeed it was worth it. Ok, I will put them inside the game as soon as possible, and then I will congratulate you.... again.. :)

Just as a note. For Dbug's intro, maybe your version of the title music running interrupt-driven could suffice.

And still some brainstorming for the Music could be done :)

Cheers.
User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte »

Ok, have identified these sound effects

Code: Select all

A  00  Switch
   01 Door Opening/Closing
   02 Pick up
   03 Drop
   04 Step #1
   05 Step #2
   06 Lift Start
   07 Lift End
   08 Alarm #1

B  09 Effect #1 (InfoPost)
   10 New Msg through Commlink
   11 Effect #2 (InfoPost)
   12 Computer Room #1
   13 Computer Room #2
   14 Beep for Info Messages in Text Area
   15 -
   16 Alarm #2

C  17 Alarm #3
   18 Alarm #4 (Low Power of 17)
   19 Alarm #5 (Receding low power)
   20 Alarm #6
   21 Alarm #6 End
   22 -
Please advise assignment of spare effects or amendments to existing.
Still a bug when playing on channel C with music playing at same time but on other channels but here is next release of module..

http://www.defence-force.org/ftp/forum/ ... sic/s2.tap

CLOAD"S2"

Also, i have uploaded the first source file. This does contain GetRand even though i never use it in sfx. Source file is zip below. Sorry for source name WorkArea.s
Please let me know if it conforms in your code Chema.

http://www.defence-force.org/ftp/forum/ ... rkarea.zip

This version still contains the test code.
User avatar
Chema
Game master
Posts: 3019
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Post by Chema »

Twilighte wrote:Ok, have identified these sound effects

...

Please advise assignment of spare effects or amendments to existing.
Still a bug when playing on channel C with music playing at same time but on other channels but here is next release of module..
Perfect. Still think there are too many alarm sounds. I love the effect of #6 and #6 end and those should go for life-support circuit open. Alarm #3 sounds like police to me, even if the fading effect in #5 is great. I don't like alarm #4 much.

Either Alarm #3 + #5 or Alarm #1 are great for power down, when emergency lights are lit and when vital systems start failing...

We also need something for contact with enemy (fireballs) and maybe something for dying :)

Any more ideas?

One question. Do we need too Stepping sounds?
Also, i have uploaded the first source file. This does contain GetRand even though i never use it in sfx. Source file is zip below. Sorry for source name WorkArea.s
Please let me know if it conforms in your code Chema.
Just took a quick view. Seems ok. I will have to compile it into overlay and see how to include the calls correctly in the sources (I think that with .bss sections or #defines, but you also reference page 0 variables). Also noticed that, even if you end up using GetRand, I don't see how to tell the compiler where it is in normal memory...

Up to now I just compiled data statements separately into overlay and loaded them in runtime...

Another question is if it would be possible to split code into normal memory and data into overlay... that would be much easier.

Also need to figure out how to integrate the new IRQ routine, but seems that nearly cuy&paste could do :)

Cheers.
User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte »

Ok, have taken your advice Chema and reviewed the effects, removing some alarms, adding some new sounds and sorting the order a little.

The new effects are this, the channel Assignment is only a guide and not fixed.

Code: Select all

A  00  Switch
   01 Door Opening/Closing
   02 Pick up
   03 Drop
   04 Step #1 (Hard Floor)
   05 Step #2 (Soft Floor)
   06 Lift Start
   07 Lift End
   08 Alarm #1 (Power Down)

B  09 Effect #1 (InfoPost)
   10 New Msg through Commlink
   11 Effect #2 (InfoPost)
   12 Computer Room #1
   13 Computer Room #2
   14 Beep for Info Messages in Text Area
   15 Robot Shuffle
   16 Alarm #2

C  17 Dying
   18 Not Sure
   19 Contact with Enemy
   20 Alarm #3 (Life Support Circuit Open)
   21 Alarm #3 End
Effect 18 is the same as 19 except at much lower note. I cannot spare anymore effects so cannot make this anymore unique :(
Not sorted channel C or code areas yet. Meeting up with Fabrice tomorrow morning so need to tidy this place :P

http://www.defence-force.org/ftp/forum/ ... sic/s3.tap

Update, i've just updated the Stepping sounds, still two but both now generate random noise pitch linking into getrand routine.
The two are distinguishable so may be used without any loss of additional bytes. :)
User avatar
Chema
Game master
Posts: 3019
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Post by Chema »

Twilighte wrote:Ok, have taken your advice Chema and reviewed the effects, removing some alarms, adding some new sounds and sorting the order a little.

The new effects are this, the channel Assignment is only a guide and not fixed.
Great. Will take a look at them asap.
Effect 18 is the same as 19 except at much lower note. I cannot spare anymore effects so cannot make this anymore unique :(
No problem. If I can I wanted to add more dangers around, so two enemy contact sounds could be useful. About the stepping sounds, if we have them, I can put different sounds for John and Helena :)
Not sorted channel C or code areas yet. Meeting up with Fabrice tomorrow morning so need to tidy this place :P
Please send him my best regards... It allways happen to me that I never end up meeting in person people I met in the Internet.

On my side I was able to introduce your code in Space 1999. It is not as difficult as I expected, but took me some time to figure out how to make everything compile properly.

Now all music and sfx data are loaded into overlay, but the playing routines are not. I thought that would be easier, but now that I have it working I think I can move everything into overlay... just need to correctly setup zero page variables, as automatic assignment with .zero directive is no more valid (all is compiled separately).

Also, in that case, we might end up using a different random routine :oops: because I can use .bss in the main code to indicate where everything is in overlay, but cannot (at least don't know how to) do something similar the other way round...

I only tested if everything loaded correctly in overlay and started the main theme with PlayAudio at game start, and it works perfectly :)

Regards,
User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte »

Thats great.
Not sure what is wrong with channel C.
Has anyone else found the same bug as me?

The scenario: Play Tune 01 or 02 then try playing an effect on Channel C

Do you want the source code again as it stands today or just modifications to the last code posted?
User avatar
Chema
Game master
Posts: 3019
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Post by Chema »

Twilighte wrote:Thats great.
Not sure what is wrong with channel C.
Has anyone else found the same bug as me?

The scenario: Play Tune 01 or 02 then try playing an effect on Channel C

Do you want the source code again as it stands today or just modifications to the last code posted?
I noticed the problem in one of your first test taps... Does it occur also in channel B (or A) when music plays in A (or B)?

I will be quite busy until mid next week, so no need to rush.
It would be better to have the complete sources... if there are too many changes.

Obviously if changes are few, just send them, but maybe it would be better to wait a bit and see if you can fix the problem with channel C, as it is quite vital for everything to work properly :)

It is quite nice to play around while the main theme is playing in the background... a good feeling of what it would look like in the end :)

Cheers
User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte »

Chema wrote:I noticed the problem in one of your first test taps... Does it occur also in channel B (or A) when music plays in A (or B)?
No, and stranger still i cannot see the problem at all. Infact if i go to debug mode the sound remains, like it is an emulator issue.
I just need to know if anyone else gets the same probs with channel C as i have found with latest tap above or whether it is a problem with my machine only?
User avatar
Chema
Game master
Posts: 3019
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Post by Chema »

Twilighte wrote:No, and stranger still i cannot see the problem at all. Infact if i go to debug mode the sound remains, like it is an emulator issue.
I just need to know if anyone else gets the same probs with channel C as i have found with latest tap above or whether it is a problem with my machine only?
Well I have the same problem clearly... sfx in channel C just make some "beeps" and "quircks"... sometimes then continue doing strange sounds while the music keeps playing.

I thought it was a bug in Sonix, as if it was toying with channel C even if not using it for playing a track...

The easiest way is load it into a real Oric... well if that is easy at all... Fabrice can do so. IIRC he tested one of the game alphas in the real machine...

Mmmm... maybe using another emulator? Surely some Oricians out there are using Macs or Unix and can test! Perhaps they do not read this thread often, so maybe we can drop them a private message or something...

Anyone else can try this please?
User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte »

ok, have fixed channel C issue.
Chema wrote:I thought it was a bug in Sonix, as if it was toying with channel C even if not using it for playing a track...
Exactly!
The problem with channel C was that when the music starts it sets up the ornament and sample (volume sequence) for the music on channel C so it gets into a phase where both sfx and music is vying access to channel C regardless what sfx does. This also meant it was nye impossible to see in debug mode since as soon as i broke into it sfx had corrected the setting. :evil:

Note, this code is not the most efficient usage of the system. I have merged to some extent Sonix music with AudioTracker sfx but a fully integrated version (with potential saving on footprint and increased speed) could be possible by scrapping Ornaments and Effects and using SFX style effects instead, but that would require alot of code changes and alot more time (like a month extra maybe).
However i am very happy with what this engine can do now.

have also modified the second stepping effect so plays at very high pitch, sounding more girly :wink:

I provide below the source file workarea.s and the exec s4.tap
Please advise if u need anything else. 8)

Twi

http://www.defence-force.org/ftp/forum/ ... workarea.s

http://www.defence-force.org/ftp/forum/ ... sic/s4.tap

btw, you mentioned ages ago an issue with the graphics, moreover the scoreboard where some colour changes in the game area got carried into the scoreboard.. is this still something i need to correct?
Post Reply