analmux Posted April 15, 2008 Share Posted April 15, 2008 Hello! I'm just wondering what would be the best way to combine music and sound effects on Pokey. For example for use in a game. I'm more thinking about a 4-voice tune, which is clipped at the moment a sound effect is needed. Did anyone already do such a thing? Or does anybody know a nice example of a prog or game that does this? Another question: Would it disturb the music too much? Would the music suffer from that? One of the problems I see is the following: Imagine a tune that uses at a certain moment some filter-combinations, f.e. voice 1&3. Now a sfx needs to be played. Let's say the sfx has already an allocated voice, f.e. voice 3. Now, let's first clip voice 3, and replace sound info of the voice3 registers by that of the sfx. This will in fact also disturb voice 1, by the filter setting. So, one choice for the programmer could be to also put voice 1 to silence, to cancel artefacts/unwanted effects. The downside is, that for playing a one-voice sfx, in fact 2 voices of the music must be cancelled. So, what to do? Quote Link to comment Share on other sites More sharing options...
emkay Posted April 15, 2008 Share Posted April 15, 2008 So, what to do? Actually, looking at Sheddy's Space Harrier Full Soundtrack with clear digi FX/Speech is to do ... Quote Link to comment Share on other sites More sharing options...
Rybags Posted April 15, 2008 Share Posted April 15, 2008 I think it would need an ordered approach, e.g. have 2 voices which you choose to use for SFX when needed, but also only use those two voices for stuff like drumbeat, minor instruments in the tune. Then, when they go missing, it's not too detrimental to the music. Personally, I'm not fussed about music in vintage system games. Where the option is available, I'll turn it off or choose SFX over music 95% of the time. Another thing? Have you experimented with 16-bit mode, but leaving volume enabled on both voices? Don't know if it would be useful, but you never know. Quote Link to comment Share on other sites More sharing options...
analmux Posted April 15, 2008 Author Share Posted April 15, 2008 I think it would need an ordered approach, e.g. have 2 voices which you choose to use for SFX when needed, but also only use those two voices for stuff like drumbeat, minor instruments in the tune. Sounds like a good solution in most cases. Problem is though, I'm also thinking about SFX that sometimes use filter, sometimes 16bit, sometimes another combination. When lead voice of the music is f.e. sawtooth, then voice 1,3 are occupied. You'd want to use voice 2,4 for SFX. Or, when SFX uses sawtooth, you have no choice other than voice 1 and 3. Voice 2 and 4 cannot play sawtooth. I especially worry about this non-symmetric build-up of pokey voices. Thus, I don't want to have any restriction on the settings, i.e. used voices and combinations, for SFX, but also not for the music. Possibly, when you have a specific project, it's best to look at which channels are used the most for SFX and for music. Another thing? Have you experimented with 16-bit mode, but leaving volume enabled on both voices? Don't know if it would be useful, but you never know. What do you mean? You mean in relation to the msx-sfx problem, or just in general? But, yes, independent of the problem I have experimented a lot with the 16bit mode. When combining f.e. voice 1 & 2 for 16bit, the 2nd voice is the traditional voice to use. The first can also be used, with 2nd voice silent. Even combinations are useful in many cases. This can give f.e. deeper bassnotes, with a lot more 'body'. The use of first instead of second voice gives rather non-trivial effects, at least for someone who first encounters it. I'd like to call it 16bit-filter. I've made a detailed analysis of the effects, and it has indeed a lot of hidden powers. In this context however, I think it's better to be careful using 16bit mode when playing sfx in music. When using both channels 1 & 2, there will for sure be artefacts. Quote Link to comment Share on other sites More sharing options...
Rybags Posted April 15, 2008 Share Posted April 15, 2008 The other alternative... Have "virtual voices". Then, the routine that stores the actual notes to POKEY has the job of assigning virtual to real, dependant on priorities and whether filtering is used etc. Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted April 15, 2008 Share Posted April 15, 2008 and what about writing the msx and the sound fx simply that it fits to the player & game logic??? Quote Link to comment Share on other sites More sharing options...
+MrFish Posted April 17, 2008 Share Posted April 17, 2008 (edited) Another question: Would it disturb the music too much? Would the music suffer from that? As a general example of its effectiveness, the Super Mario Bros series games did it often on the NES... also other games like Tetris and more I'm sure. You can clearly hear voices eliminated as you jump etc. They did a good job at pulling it off, obviously... just have to use good judgement in deciding which voice to eliminate during the effects. Edited April 17, 2008 by MrFish Quote Link to comment Share on other sites More sharing options...
miker Posted April 17, 2008 Share Posted April 17, 2008 Well... In productiuons like Yie Ar Kung Fu, Jetboy and (upcoming) BombJack i tried to sacrifice one channel for FX and play the music on remaining 3 voices. Here i found the arpeggios very useful. Also, the using of special POKEY effects like 16bit bass or synths are possible but very limited. And about putting FX/music on 2 voices each - well, it's possible but makes the background music even more limited... Quote Link to comment Share on other sites More sharing options...
peteym5 Posted April 18, 2008 Share Posted April 18, 2008 I am involved in a project that is currently using RMT music and there is some debate about adding some sound effects. My project is using DLIs to split up the player/missile graphics to have more sprites. I think adding digital sounds may crash because my VBI is already using 75% or more per frame. Thing might crash or the VBI may be incomplete before starting a new frame. One thing I am surprised in all this stuff with digital sound and music, no one mentions the ideal of using CONSOL ($D01F) as a 5th sound voice. That is the sounds you hear when you type on an Atari computer. On the XL/XE these are channeled with the main sound output. Some people believe that it is using one of the Pokey channels, but you can play tones on all found voices and still hear the keyboard (in Basic). I know the process probably be similar to the digital sound or a short loop to play a tone. However, there is little documentation on how this voice works. Quote Link to comment Share on other sites More sharing options...
Rybags Posted April 18, 2008 Share Posted April 18, 2008 See Night Mission Pinball for possibly the most effective use of CONSOL for SFX. The problem with using it is that it's even more timing critical than POKEY. Look up PWM re techniques for 1 bit audio. For effective SFX you need to toggle the bit over varying time periods, unlike forced AUDC volume levels where you just need to output a sample at a (preferably) constant time interval. All up, a lot of effort for something that's effectively inferior to using POKEY, with the added nuisance that it doesn't go to the TV on 400/800, and doesn't work at all on 5200. I think I posted some 1-bit CONSOL stuff here somewhere. I think it might have been a sample or 2 from Terminator. Quote Link to comment Share on other sites More sharing options...
analmux Posted April 20, 2008 Author Share Posted April 20, 2008 Another question: Would it disturb the music too much? Would the music suffer from that? As a general example of its effectiveness, the Super Mario Bros series games did it often on the NES... also other games like Tetris and more I'm sure. You can clearly hear voices eliminated as you jump etc. They did a good job at pulling it off, obviously... just have to use good judgement in deciding which voice to eliminate during the effects. You're actually right. I took a listen to these titles on the NES. There's indeed a clipping processing for sound effects. Thus, it should work. When digi is excluded, the NES has also just 4 channels (2 pulse, 1 triangle, 1 noise). I wonder if RMT can handle channel-clipping, so recuding from 4 to 3 or 2 channels isn't needed. Quote Link to comment Share on other sites More sharing options...
analmux Posted April 26, 2008 Author Share Posted April 26, 2008 Okay, I've got a new problem regarding combining MSX & SFX. What if on one voice you have chosen a pulsewave. This is obtained by setting the right timing. Now, suddenly a SFX is needed and it clips the pulse voice. After the end of the SFX we want to restore the sound settings like before the SFX. In fact now there's an uncertainty in the relative timing, caused by the SFX: it disturbs the wanted timing, that's directly related to the wanted pulsewidth. If you don't restore it somehow, the whole pulse-instrument is screwed up, giving audible artefacts. How would you restore the desired timing?? (emkay: any ideas?) Quote Link to comment Share on other sites More sharing options...
emkay Posted April 26, 2008 Share Posted April 26, 2008 (emkay: any ideas?) Well, using a "standard" A8 would result in using one pokey. So it is given to use 3 channel music, combining only 2 channels. If using either a mixed mode of both 16 bit and filter, always the 4th channel must not be interfered when playing FX there. Another possibility was to use one correction per pattern and build the music on this. Then to create FX that play long enough . If you decide to switch Music and FX, it always is better to switch high sounding FX with the Hi notes and to switch the Low sounding FX with the Low notes. Quote Link to comment Share on other sites More sharing options...
patjomki Posted April 27, 2008 Share Posted April 27, 2008 Well... In productiuons like Yie Ar Kung Fu, Jetboy and (upcoming) BombJack i tried to sacrifice one channel for FX and play the music on remaining 3 voices. Here i found the arpeggios very useful. Also, the using of special POKEY effects like 16bit bass or synths are possible but very limited. And about putting FX/music on 2 voices each - well, it's possible but makes the background music even more limited... Hmm, how about supporting dual POKEY in Bomb Jack? I know there are a lot of machines equipped in this way. So you can avoid the above mentioned limitations. Regards, patjomki Quote Link to comment Share on other sites More sharing options...
Oswald Posted April 28, 2008 Share Posted April 28, 2008 or simply use a sidcard like plus4 users do, then you can have filters+16bit frequencies+waveforms without all these problems on 3 channels. O:-) Quote Link to comment Share on other sites More sharing options...
miker Posted April 28, 2008 Share Posted April 28, 2008 @patjomki: well... i think that BombJack audio will probably remain mono. The sprite-engine eats too many CPU-cycles already. @Oswald: there IS sidcard planned from some time just the author of it needs to find enough time for finishing it and putting inside a cart case (some photos are here). Quote Link to comment Share on other sites More sharing options...
analmux Posted May 1, 2008 Author Share Posted May 1, 2008 or simply use a sidcard like plus4 users do, then you can have filters+16bit frequencies+waveforms without all these problems on 3 channels. O:-) Or a polyphonic Kurzweil K250 synth with midi-interface. Would be far better. pffff. Why should I use a SID with 3 channels, if I have 4 on pokey. When a SFX is played on one channel, there are still 3 left on pokey. On Sid only 2. Quote Link to comment Share on other sites More sharing options...
emkay Posted May 2, 2008 Share Posted May 2, 2008 or simply use a sidcard like plus4 users do, then you can have filters+16bit frequencies+waveforms without all these problems on 3 channels. O:-) Or a polyphonic Kurzweil K250 synth with midi-interface. Would be far better. What about making the Atari 800 playing all C64 Software (and more) aswell? http://www.mini-itx.com/projects/atari800/ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.