English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 01 June 2012, 14:44   #1
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,500
MOD-player with external sound effects

I know there are some very good Protracker MOD-players out there. But is there also a version which permits a game to insert sound effects in the middle of the music?

At least it should be able to deactivate a pre-selected channel during the period when the effects sample is played.

Better would be when the player itself automatically selects an idle or least frequently used channel for this task.

Optimal would be when it mixes the effect somehow into the music.
phx is offline  
Old 11 June 2012, 10:58   #2
pintcat
Registered User
 
Join Date: Mar 2008
Location: Berlin/Germany
Posts: 226
Never heard of these things specifically, but isn't Pinball Dreams/Fantasies using common Protracker modules? Most of the sound effects are played with the music still running in background so if I'm not wrong this might use some real time mixing. Another interesting example is Jochen Hippel's 7-voice routine which doubles 3 of the 4 channels and maybe reserves the 4th for interactive stuff like sound effects (I'm not quite sure about this, infos are hard to find). Another interesting one is Deluxe Galaga by Edgar M. Vigdal where the user can decide himself which tracks are used for music or effects and also can add his own modules if he likes.
pintcat is offline  
Old 11 June 2012, 14:08   #3
Don_Adan
Registered User
 
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 1,975
Perhaps you can try to rip/use Dens Design Protracker replay routine from game Aladdin, it has support for SFX. WT's external Protracker replay for EaglePlayer is based on this version, but I don't know if you are able to understand my source.
Don_Adan is offline  
Old 12 June 2012, 10:48   #4
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,500
Quote:
Originally Posted by pintcat View Post
Never heard of these things specifically, but isn't Pinball Dreams/Fantasies using common Protracker modules? Most of the sound effects are played with the music still running in background so if I'm not wrong this might use some real time mixing.
I guess that mixing is no option for me, as it requires too much CPU power, which I desperately need for the game (I hope it will run at 25fps on a 7MHz 68000). Pinball certainly doesn't need that much power.


Quote:
Another interesting one is Deluxe Galaga by Edgar M. Vigdal where the user can decide himself which tracks are used for music or effects and also can add his own modules if he likes.
BTW, is the source of Deluxe Galage available for free now? I remember that he offered it against a registration fee many years ago.
phx is offline  
Old 12 June 2012, 10:51   #5
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,500
Quote:
Originally Posted by Don_Adan View Post
Perhaps you can try to rip/use Dens Design Protracker replay routine from game Aladdin, it has support for SFX.
You're sure about that? Reassembling and analyzing the game would take some time. I hoped there were easier options.

Quote:
WT's external Protracker replay for EaglePlayer is based on this version, but I don't know if you are able to understand my source.
Hm? What is your source? Aladdin or EaglePlayer?
phx is offline  
Old 12 June 2012, 13:09   #6
Codetapper
2 contact me: email only!
 
Codetapper's Avatar
 
Join Date: May 2001
Location: Auckland / New Zealand
Posts: 3,182
Quote:
Originally Posted by pintcat View Post
Never heard of these things specifically, but isn't Pinball Dreams/Fantasies using common Protracker modules? Most of the sound effects are played with the music still running in background so if I'm not wrong this might use some real time mixing. Another interesting example is Jochen Hippel's 7-voice routine which doubles 3 of the 4 channels and maybe reserves the 4th for interactive stuff like sound effects (I'm not quite sure about this, infos are hard to find). Another interesting one is Deluxe Galaga by Edgar M. Vigdal where the user can decide himself which tracks are used for music or effects and also can add his own modules if he likes.
I can't remember where I read it but I believe that 7 voice routine is actually mixing 4 channels into 1, plus the other 3 "normal" channels giving the 7. Presumably the modules use instruments and samples that mix well together for that 4th channel.
Codetapper is offline  
Old 12 June 2012, 14:33   #7
robinsonb5
Registered User
 
Join Date: Mar 2012
Location: Norfolk, UK
Posts: 1,153
Quote:
Originally Posted by Codetapper View Post
I can't remember where I read it but I believe that 7 voice routine is actually mixing 4 channels into 1, plus the other 3 "normal" channels giving the 7. Presumably the modules use instruments and samples that mix well together for that 4th channel.
If I had to guess, I'd say that the music's using three channels (or making one channel drop out when sound effects are playing), and the sound effects are being mixed in realtime to make the fourth.

Sound effects are easier to deal with than music because you don't have to worry about multiple pitches. If you make sure they all use the same sample rate, mixing them is relatively trivial.
robinsonb5 is offline  
Old 12 June 2012, 16:58   #8
Don_Adan
Registered User
 
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 1,975
Quote:
Originally Posted by phx View Post
You're sure about that? Reassembling and analyzing the game would take some time. I hoped there were easier options.

Hm? What is your source? Aladdin or EaglePlayer?
You can resource only the Protracker player, not full Aladdin game.
You can get resourced Protracker (Aladdin) replay from the WT page:

http://wt.exotica.org.uk

Players section.
Don_Adan is offline  
Old 12 June 2012, 17:01   #9
Don_Adan
Registered User
 
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 1,975
Quote:
Originally Posted by Codetapper View Post
I can't remember where I read it but I believe that 7 voice routine is actually mixing 4 channels into 1, plus the other 3 "normal" channels giving the 7. Presumably the modules use instruments and samples that mix well together for that 4th channel.
TFMX 7V, Hippel 7V or Mugician II, but you must have musician which create tune for these soundformats. These formats are not useful for ingame music and 68000, can be useful for 68020+.
Don_Adan is offline  
Old 13 June 2012, 03:22   #10
pintcat
Registered User
 
Join Date: Mar 2008
Location: Berlin/Germany
Posts: 226
Quote:
Originally Posted by Don_Adan View Post
TFMX 7V, Hippel 7V or Mugician II, but you must have musician which create tune for these soundformats. These formats are not useful for ingame music and 68000, can be useful for 68020+.
Interesting. I never noticed this before, but you're right. I just opened DeliTracker's ModuleInfo for Turrican II & III and - voilà - they use the 7 voice technique only for the title, end-part and other menu related stuff while the in-game soundtrack uses a simple 4 channel player. During the game the music uses mostly 3 channels. The 4th is either playing sporadic samples or remains completely unused. This is how they got the sound effects into the game without destroying the music.
I remember a similar example - I think it was the Outrun Europe soundtrack on the C64 by Jeroen Tel - where the whole music only occupies 2 channels (and still sounds awesome). Regarding this kind of channel "economy", chip music might offer a few more options, because you can create interesting mixtures of bass sounds or short strings with percussions in one sample - and in realtime.
pintcat is offline  
Old 13 June 2012, 09:27   #11
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,500
Quote:
Originally Posted by Don_Adan View Post
You can get resourced Protracker (Aladdin) replay from the WT page:

http://wt.exotica.org.uk

Players section.
There is a single Protracker player on this page. Is it what you mean?
phx is offline  
Old 13 June 2012, 12:24   #12
daxb
Registered User
 
Join Date: Oct 2009
Location: Germany
Posts: 3,304
As I already wrote in the other thread. BabeAnoid (Amos game but the best breakout clone for Amiga ever) from Richard Fhager (DawnBringer) used two (1,2) channels for effect samples and two (3,4) for music. Nothing special but effect samples just overwrite the current samples that might be played on the first two channels. So you (as musican) can use still all four channels for music. If you know this you can make music that sounds great in both situations. Hence, it is good for games.

Check out: http://hem.fyristorg.com/dawnbringer
daxb is offline  
Old 13 June 2012, 14:44   #13
Don_Adan
Registered User
 
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 1,975
Quote:
Originally Posted by phx View Post
There is a single Protracker player on this page. Is it what you mean?
Yes, but this version (based on Aladdin replay) has some/many changes, f.e. I removed SFX support. BTW. You can also use Team 17's version of The Player 4.1A replay (Superfrog, Qwak, Alien Breed etc), it has support for SFX too and is PC relative, if I remember right.
Don_Adan is offline  
Old 15 June 2012, 21:11   #14
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,604
From experience it's quite a job to make sfx/music share 4 channels, to make it not cut off notes. For the gameplay (in action games), you absolutely need to start the sfx exactly when they're triggered and not skip a single one, or the player will wonder if he jumped or picked up something etc. At the same time with this "absolute priority", you don't want the music to cut off randomly

You can have a sfx/music toggle, this is what I always like best in games. Because after a while you've heard the music a few times before...

A simple solution is to have 3-channel music of which 1 is a shared, low-priority-music channel (melody). In this channel, low-priority-sfx (shots, environment) win over music. The 4th channel is reserved for normal-priority-sfx only, so the important sounds like rewards and feedback sounds like thuds are always heard.

Since it is per-channel priority, you don't need a priority scheme, really. Important sounds are simply played in 4th chan, all others in chan 3 (simply play them there, it's ok if music in this chan is cut off), and don't touch chan 1-2.
Photon is offline  
Old 18 June 2012, 10:41   #15
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,500
The suggestion to restrict the music on 3 channels is good, but in many cases it cannot be done easily, because the MODs already existed before the game and it is hard to convert them to 3 channels.

Isn't it possible to use the audio interrupt for inserting effects?

I'm thinking about the following:

As far as I know the player will set a channel to a two-bytes null-sample shortly after starting a one-shot (non-looped) note. This can be used as an indicator that the channel is free for the next sample, as soon as it got an audio interrupt.

This channel can be used to play a sound effect now, which blocks the music on the channel, until the next audio interrupt happens (the sound effect is finished).

When there is no free channel for a sound effect, the player could decide to cut the music on the channel, which didn't play a new note for the longest time. Or just take a default channel, when the priority of the effect is high enough.

Using audio interrupts will have the disadvantage that a lot of additional cpu time will be needed to process the interrupts for all four channels (especially when all channels are running the null-sample). So I'm not sure if it makes sense...

EDIT:
Maybe I don't need to enable audio interrupts at all, but just clear the channel's audio interrupt flag when the pointer to the null sample is set. When the channel is still playing the null sample and the channel interrupt flag got set, then it is free?

Last edited by phx; 18 June 2012 at 10:47. Reason: Another idea
phx is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Protracker player with support for external sound fx phx Coders. Releases 172 15 January 2024 19:44
Sound Effects in IK+ noel411 support.Games 3 07 September 2007 03:12
IK+ sound effects not working andreas support.WinUAE 4 26 July 2005 20:21
How to rip sound / effects wlcina support.Games 16 18 April 2005 03:09
Goblins 3 sound effects Bernhardt support.Games 6 25 July 2003 03:47

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:07.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.08770 seconds with 13 queries