21 July 2010, 20:35 | #1 |
Registered User
Join Date: Sep 2004
Location: Brasil
Age: 50
Posts: 181
|
Playing Music and SFX
Well, i'm adding music at my game engine (OCS/ECS 1Mb), because it's time to make happy my ears
In the old times i was accustomed to reserve one or two channels for the SFX and made the songs using only the free channels. But it would be great if i could use the four channels for the music and when i need to play a sfx, i only would have to send it at one channel and would take priority over the music. I was thinking to use The Player or another fast protracker routine, but after the first look i can not find an easy way to add SFXs. Is there any protracker routine that support this? Or can anybody advise about the most sensible way to implement this? |
24 July 2010, 18:07 | #2 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,755
|
Games by talented guys, like Hybris/Battle Squadron, Turrican etc use clever techniques to "hide" the uhm lack of channels by having 3-4 channel music but putting parts of the composition "that the ear needs most to feel continuity in the music" in reserved channels. For example bass+drums in chan 0 and harmonies or chords in chan 1, and then have melody and "extras" for the music in two optional channels that get overridden by SFX.
You can rearrange the music to f.ex. 3 channels and set number of channels in The Player, then the unused channels won't be touched. I always feel I get more "into" the game if all 4 channels are used for an absorbing barrage of SFX only, I love that Music can be played as interludes, f.ex. "loading level" or "big ship landing" or "here comes a boss". The usual way to "hack" a module player is to put a "don't write to soundregisters if SFX is playing" conditional in the part that starts a sample put a "don't write to soundregisters if SFX is playing" conditional in the part that sets the samples' loops (look for a busy-wait or a CIA interrupt) put a "don't execute musiceffectcommand if SFX is playing" conditional in the 1 or 2 places that handle effects. A fail-safe quick hack method is to patch each and every single write to audio-registers with a conditional that checks if the SFX routine has "tagged" that channel and if so skips it. (The only thing you have to watch out is for code triggered by an audio-interrupt, but I haven't seen any in the normal .mod players.) If a soundeffect reserves a channel, you must have some kind of timing-value to release it back to the playroutine after "a while", of course. Edit: Jesus "Christ", that's a lot of "double quotes". Poor "post writing". Oh well |
25 July 2010, 17:43 | #3 | |
Registered User
Join Date: Sep 2004
Location: Brasil
Age: 50
Posts: 181
|
A lot of thanks, Photon!!!
Really Great Explanation!!! I see a few afternoons of The Player in my near future Quote:
Well, don't worry it was one of that rare case of "abuse" "of" "double" "quotes" nothing important, could be worst how a serious case of abuse of bold and smilies |
|
27 July 2010, 03:26 | #4 |
Registered User
Join Date: Feb 2007
Location: Melbourne, Australia
Age: 41
Posts: 3,773
|
The Turrican games I believe actually achieve 7 channels by software mixing. This could well be worth looking into.
|
27 July 2010, 10:08 | #5 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,571
|
AFAIK Turrican only uses software-mixing in the intro. During the game it would waste too many cycles. The music is in Chris Hülsbeck's TFMX format.
|
27 July 2010, 10:19 | #6 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,865
|
|
27 July 2010, 21:59 | #7 |
Registered User
Join Date: Sep 2004
Location: Brasil
Age: 50
Posts: 181
|
Also it's more easy to find a good protracker musician (i must try to recover at my old pal Rush ) that a musician that can use tfmx and Chris put the level in tfmx music too high
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
What are you playing? | Sensi | Retrogaming General Discussion | 5980 | Yesterday 18:00 |
Help needed for playing tactical music in UFO AGA | ancalimon | support.Games | 2 | 01 August 2020 00:13 |
[request] Separate music/sfx volume slider | Retro-Nerd | support.WinUAE | 3 | 07 August 2013 18:41 |
No SFX in IK+ | tim_calladine | support.Games | 21 | 25 October 2008 00:00 |
2-4 sec delay of music playing | Lord | support.Demos | 0 | 23 June 2002 23:27 |
|
|