Teijo Kinnunen Oksantie 19 FIN-86300 OULAINEN FINLAND (FidoNet 2:228/402) Feb 24 1994 Dear Ray, I hope the following will help in Mindscapes programers request for a routine that will help in creating sound effects using the player routine. Dear Mark, ( and all programers ) As regards producing SFX, OctaMED's synth sound language is a good way to create them. You can, as requested , program your own routines for changing the periods/waveforms/volumes of the effects. Whichever way you select, I've provided a slightly modified version of the OctaMED player routine. This version has a variable '_freech0'. When you set this variable, the player immediately stops touching channel 0 registers, so it can be used for SFX. (You should clear ch 0 DMA after setting this variable ). When it's cleared, the player continues using channel 0 as usual. Now, if you want to play synth sounds when channel 0 is unused, the easiest way is to call the routines in player. _PlayNote triggers a new note, you need to set some registers (see below) prior to calling it. 'synth_start' should be called on every player interrupt to update the sound. You should call these from the player routine itself (e.g. the place after label 'nonewnote' is good, as long as registers are kept intact, some of the registers below (A2, A4, A6) are even set for you). The method to trigger the effects from the game is up to you (e.g. a shared variable might do the job). Calling _PlayNote: registers: D7 = track number (= 0) D1 = note number (0 = C-1, 1 = C#1 etc.) D3 = instrument number (0 - 62) A2 = address of module A3 = instrument address in module (mod->song->sample[xx], xx = D3) A4 = song structure (mod->song) A5 = track data structure (t03d for track 0) A6 = data base (DB) Calling synth_start: registers: D0 = trk_synthptr(a5) A5 = as in _PlayNote Documentation on using the synth language is provided with OctaMED. I hope this is of help for those wishing to utilise an SFX channel. Teijo