LYD EFFEKT EDITOR V4.1 by GRG/SHAPE (SOUND EFFECT EDITOR V4.1) ----------------------------------------------------------- WHATS NEW: ---------- * Fixed V4.0 stack bug. If you switched programs 120 times or so during one session the computer would crash. * Optimized the player with a couple of bytes. * Fixed filter bug. * There's no final player for MULTISPEED sfx yet. ----------------------------------------------------------- ? Help page * Switch device 8/9 N Name SFX +/- Select SFX F1 Play SFX F3 Stop SFX/Mixer SFX F5 Step SFX/Mixer SFX F7 Lock automatic cursor move SPACE Play mixers soundeffects S SFX setup M Mixer W Waveform table V Vibrato table Z Filter table P Pulse table SHIFT+M Mark SFX SHIFT+C Copy marked SFX SHIFT+X Swap marked SFX with current SHIFT+L Load SFX SHIFT+Z Save SFX CBM+Z Dump SFX RETURN Put program into setup SHIFT+RETURN Remove program from setup C/HOME Goto program line SHIFT+C/HOME Home SHIFT++/- Select speed ----------------------------------------------------------- Clearing memory: SHIFT+L and load the file "clear 4.x/shape" (You can load sfx made in v4.0 into this edtior) ----------------------------------------------------------- SFX PROGRAM: You can create 254 sound effects. 00 Waveprg Pointer to waveform program. $FF = bridge waveform 00 Attack/Decay 00 Sustain/Release 00 Gate 00 = gate on, 01-7F delay before gate goes off. 80+81-FF bridged gate (the actual bridge check) 00 Vibrato Pointer to vibrato program, 00 = vibrato off. $FF = bridged vibrato 00 Pulse Pointer to pulse program, 00 = pulse off, 81-8f = direct pulse. $FF bridge pulse 00 Filter Pointer to filter program, 00 = filter off. $FF bridge filter. 00 Band/Resonance Must be set when using filter. 00 Frequence To be used in conjunction with soft waveform frequencies and (see) the vibrato program. 00 Length Length of sfx before it is removed from the sfx player. This HAS to be set properly in conjunction with the release parameter and gate parameter. 00 = Forever. Direct pulse are marked with light grey colors. Any bridged parameters are marked with dark grey colors. GATE parameter is multiplied with 2 to equalize the Length Parameter. ----------------------------------------------------------- WAVEFORM PROGRAM: Always start a waveformprogram with a waveform. FF XX = Jump pointer. FE XX = Delay value. FD XX = Repeat the following FF jump XX times. Make sure the FF jump doesnt hit the Repeat parameter, that will be a infinite loop. When reached zero it will branch down to the line below the FF jump. Can be combined with the delay parameter and the jsr waveform parameter. FC XX = Jsr Waveform. XX points to a waveform line in the waveform program. Exits back to "waveform stack" when a $ff jump is triggered. Can be combined with the delay parameter. Valid waveforms: 11,21,31,41,51,61,81 ($d404 wf gate on) 10,20,30,40,50,60,80 ($d404 wf gate off) (Gate off is normally set by the gate parameter in the sfx setup, but you can set it here also.) Valid frequencies parameters: 00-5F Soft frequencies 80-DF Hard frequencies (only useful if you are using the Frequence parameter in the sfx program). Special keys: RETURN = Move waveform program to sfx. CLR/HOME = Move cursor to start of current waveform program. SH+CLR/HOME = Top of waveform program. INST/DEL = Delete line SH+INST/DEL = Insert line Valid combinations of waveform paramaters: We start with the easy stuff first, and do remember - a sfx has to start with a valid waveform. WAVEFORM 00:81 5F 01:FF 00 WAVEFORM 00:81 5F 01:FE 08 -+--Delay next wf line 8 frames 02:81 5E -+ 03:21 5D 04:FF 03 WAVEFORM 00:81 5F 01:FD 08 -+- Repeat this area 8 times 02:41 38 | 03:41 32 | 04:41 30 | 05:FF 02 -+ 06:80 5D --- After 8 repeats we jump here. 07:FF 06 WAVEFORM 00:81 5F 01:FD 08 -+- Repeat this area 8 times 02:FE 08 -+- Delay line $03 8 frames (This delay is performed as many times as the repeat parameter) 03:11 44 | 04:11 45 | 05:11 46 | 06:FF 02 -+ 07:10 46 --- After 8 repeats we end up here. 08:FF 07 WAVEFORM 00:81 5F 01:FC 08 --- Jsr wavform line $08 (notice you can do a delay parameter after a jsr) 02:80 5F ----- Return here after jsr 03:FF 02 .. .. .. 08:FE 08 -- Delay 8 frames on line $09 09:11 44 0A:11 45 0B:11 46 0C:FF 09 -- Always end a jsr waveform with a $ff xx (Doesnt matter what the xx value is, it will exit when hitting $FF) WAVEFORM 00:81 5F 01:FD 08 -+- Repeat this area 8 times 02:FE 08 -+- This delay will start on the following jsr wavform only. +-+ 03:FC 32 | Jsr waveform line $32 (but with delay 8) <----+ 04:FC 47 | Jsr waveform line $47 (Now the delay is no more) 05:FC 59 | Jsr waveform line $59 06:FF 02 -+ 07:10 46 --- After 8 repeats we end up here. 08:FF 07 ----------------------------------------------------------- VIBRATO PROGRAM: First of all the vibrato routine is concentrated around the FREQUENCE parameter in the sound setup. It will use this parameter to generate the vibrato frequency output. A high value will result in a fast vibrato. A low value will result in a slower vibrato. After this the note frequences from the waveformprogram are simply added to the output. Maybe you would say it is a silly approach, but starting from scratch on each new note triggered will not result in a decent vibrato. 08 XX YY - 08 = Delay, XX = range, YY = Width/Crazy Comet anding FF XX YY - FF = Loop forever, XX = range, YY = Width/Cracy Comet anding XX range : 00-40 Begin with frequency up addition XX range : 80-C0 Begin with frequency down subtraction XX range : 41-7F or C1-FF will result in a infinite addition/subtraction. YY width : 00-7f Normal width mode YY width : 80-ff Width mode with Crazy Comet anding NB! Cracy comet anding with low nybbles 0,4,8 and C will result in nothing. Special keys: RETURN = Move vibrato program to sfx. SH+RETURN = Remove vibrato program from sfx. CLR/HOME = Move cursor to current vibrato program. SH+CLR/HOME = Top of vibrato program. ----------------------------------------------------------- PULSE PROGRAM: 01:1F 08 Loop from 1 to F with speed 8 02:F1 08 Loop from F to 1 with speed 8 03:00 01 Jump to program line 01 (00 is the jump command) NB! Program line 00 cannot be used. It will result in no pulse output. Special keys: RETURN = Move pulse program to sfx. SH+RETURN = Remove pulse program from sfx. CLR/HOME = Move cursor to current pulse program. SH+CLR/HOME = Top of pulse program. ----------------------------------------------------------- FILTER PROGRAM: 00:00 00 00 00 --- Jump mode 01:|| || +--------- Sweep speed 02:|| |+----------- Loop value high 2 03:|| +------------ Loop value high 1 04:|+-------------- Start value low 05:+--------------- Start value high | +--- Filter program number Jump mode: 00 + program number : Will cut to start value after a loop sweep. 80 + program number : Will cut to start value after a loop sweep (reverse). 40 + program number : Continuous sweep between loop values + programs. C0 + program number : Continuous sweep between loop values + programs (reverse). Special keys: RETURN = Move filter program to sfx. SH+RETURN = Remove filter program from sfx. CLR/HOME = Move cursor to current filter program. SH+CLR/HOME = Top of filter program. ----------------------------------------------------------- MIXER PROGRAM: The mixer can generate 127 multiple voices sound effects (mixersfx) 00:00 00 00 ---Channel 3 01:| +--------Channel 2 | +-----------Channel 1 +--------------Mixer sound effect number Input parameters: 00-FE = Sound effect number FF = Mark channel as available MIXER: 00:00 01 FF -This will play sfx 00 and 01 on channel 1 and 2. Channel3 is available for normal sfx calls. MIXER: 00:00 01 02 -This will play sfx 00,01,02 on all three channels MIXER: 00:03 FF FF -This will play sfx 03 on channel 1. This is probably waste of memory, use the sfx call instead! (unless... look below) You can use the MIXER for a general setup of the sfx, this way the user dont have to worry about what sfx to be played on which channel. But thats up to you to decide... Special keys: RETURN = Move mixersfx to play buffer and play. CLR/HOME = Move cursor to current mixersfx SH+CLR/HOME = Top of Mixer INST/DEL = Delete line SH+INST/DEL = Insert line ----------------------------------------------------------- BRIDGE EFFECTS: Let's say you want to create a sound effect for a elevator scene. The elevator is supposed to go up or down, but you have no idea how far and how long the sound effect should be. The solution is to use the bridge technique in this player. First you should make a sfx that loops forever: "elevator moving" 00 wf -> 81 30 01 ad ff 00 8a sr 00 gate 00 vibrato 00 pulse 01 filter -> 11 46 0f 41 2f bandres 00 freq 00 length Then a sfx for stopping: "elevator ends" ff wf (dont change waveform program) 00 ad 00 sr 87 gate 04 vibrato -> ff b0 30 00 pulse 02 filter -> 60 23 0f 42 2f bandres 00 freq 3f length THE IMPORTANT THING HERE IS THE GATE PARAMETER. Values above 80 tells the player this is a bridged effect. You will not get a bridged effect unless you set the GATE parameter to bridge. You cannot simply set the GATE parameter to bridge, in addition you can/have to set bridge parameters on waveform, vibrato, pulse and filter. What happens on a bridged effect is: * Hard restart is ignored. * ADSR values from the previous sound (elevator moving) is used. * The gate parameter works as normal its value is anded with #$7f. * Waveform program is set. Unless you bridge with $FF Tells the player to continue on the current waveform program. * Vibrato program is set. Unless you bridge with $FF. Tells the player to continue on the current vibrato program. * Pulse program is set. Unless you bridge with $FF. Tells the player to continue on the current pulse program. If, however, you use direct pulse you will have to set the same value. * Filter program is set. Unless you bridge with $FF. A value of $ff tells the player to continue on the current filter sweep. While a new value between 01-40 tells the player to start a new sweep. You also have to set bandres if a new sweep is supposed to be triggered. (Like the "elevator ends" example above) * Freq is set. * Length is set. OK, Let's sum up the bridged effect: 1) GATE has to be set to a value of 81 - FF for a timeout. A value of 80 is toggled as infinite but then Length must be FF. 2) WAVEFORM can be a new waveform program 00-FE. A value of FF will bridge. 3) VIBRATO program can be a value of 00-55. A value of FF will bridge. 4) PULSE can be a value of 00-7f. To bridge a direct pulse 81-8F command simply use the same value. To bridge a pulse program use FF. 5) Filter can be a value of 00-40 A value of FF will bridge. Bridged effects are marked with dark grey colors. -------------------------------------------------------------------------- TIPS AND THINGS: ---------------- 1) If you hear some nasty sound clicking then this might be the problem: A) Your Length parameter is cutting off way to early the sid-chip has to Release properly before shutting down the channel. Adjust length parameter or Release parameter. B) Running filter sfx and then changing to a non-filter sfx will cause filter clicks on old sid-chips. C) You have to start a sfx with a valid waveform. D) If my memory is correct : filter values between 00-10 will result in no sound on new sid-chips. 2) I suggest you always run filter sfx on channel 1. 3) I have never used the Pulse routine in my sfx as of yet. I use the directpulse thing, then I can remove the pulse routine from the sfxplayer and gain more free memory. The same goes for the vibrato routine, the filter routine, the wavform delay routine, the waveform repeat routine and the waveform jsr routine. All are removable from the sfxplayer if wanted - and you should - if you know you havent used them. 4) Compared to other sfx players/editors this one use a musical approach. The note table allows you to create small 1-3 voice jingles. Most sfx editor simply has a starting frequency and a ending frequency. 5) An ERROR occurs only when your FREQ + waveform frequency is larger than note $60. Always correct this!! Your sfx might sound totally different in the final player. The note table is only $5f bytes long. (8 octaves (C-0 to H-7)) If you use note $5f and have vibrato on you might get a frequency output that is larger than the top of note table scale ($fd2e). This is allowed as the vibrato freqs are added to the note freqs. This allows for crossing top and bottom of the sid chips max/min frequency ($ffff/$0000). Only do this with vibrato. 6) It's possible to have the editor + turboassembler + source in memory at the same time. Just make sure you dont overwrite memory $0800-$5300 when you assemble. $080D restart editor.