Overview
Comment: | Some more fixes of sound effect including a few of documentation |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
45529d48c7e771e717cd9cf80cb8108a |
User & Date: | user on 2022-01-16 03:11:51 |
Other Links: | manifest | tags |
Context
2022-01-20
| ||
06:37 | Explain the "Attempt to use a nonexistent object" error when attempting to move a Sliding Door after one side has been destroyed. check-in: 1977494fc3 user: user tags: trunk | |
2022-01-16
| ||
03:11 | Some more fixes of sound effect including a few of documentation check-in: 45529d48c7 user: user tags: trunk | |
2022-01-15
| ||
05:59 | Implement the user sounds (uncompressed) and MML sounds; does not work in the game yet, and built-in sounds are not yet implemented. check-in: 5c902e7a3f user: user tags: trunk | |
Changes
Modified class.doc from [d18040badb] to [e20d997f8f].
︙ | |||
2717 2718 2719 2720 2721 2722 2723 | 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | treated as signed or unsigned according to the column type. * The stack contains one or more items, of which the first (bottom) one is a string: Concatenates all of them together, which can be strings, numbers (treated as unsigned), or classes. All formatting codes of strings will be stripped, so that the result will be a unformatted string. === MML sound effects === The MML sound effects are similar to ZZT and MegaZeux. It is a string consisting of the commands listed below (case-insensitive): A B C D E F G Play a note of the current length and octave; notes outside of the range of a 88-key piano are not valid, but the quarter tones are possible. It can be followed by zero or more of the following signs: ! flat , half flat ' half sharp # sharp X Play a silenced rest of the current note length. W H Q I S T Z Set the note length to one of the predefined note lengths, where W means a whole note, the other letters are successively half until Z which means a sixty-fourth note, which is the shortest possible note. . Multiply note length by 3/2. 0 1 2 3 4 5 6 7 Set the octave to a specified number. Note that notes lower than A are not valid for octave zero. - Low octave. + High octave. L Set note length to a following number of sixty-fourth notes. N Play a note with the following note number, and the current length. The note number 0 is the lowest piano note, and then each next key on the piano is 2 more than the previous one (odd numbers are used for quarter tones that are not on a standard piano). Numbers 190 and higher are used for overtone notes; subtract 188 for the overtone number (although note that overtone numbers 0 and 1 are not usable). (Note that this is not the same as standard MML.) |
Modified config.doc from [8852ef9b47] to [6c9a4775e5].
︙ | |||
26 27 28 29 30 31 32 | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | - + + - + + | work at all, this value must be set. .audio.mmlTempo Define the number of quarter notes per minute. The default is 120. .audio.mmlTuning The MML tuning of the A4 note, in Hz. The default is 440 Hz, but some |
︙ |
Modified puzzleset.doc from [33868fdaba] to [3c2ca8d4bf].
︙ | |||
39 40 41 42 43 44 45 | 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | - + + | picture; the loader will select one based on the user's criteria. The DEP lumps are dependent pictures; each one references one or more IMG lumps, and specifies how to modify them to produce the new picture (e.g. by rotating, mirroring, changing colours, etc). The WAV lumps are sound effects. Each is a RIFF WAVE file; it must be of |
︙ |
Modified sound.c from [045a5b4883] to [c480308e9b].
︙ | |||
16 17 18 19 20 21 22 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | - + | typedef struct { Uint8*data; Uint32 len; // length in bytes } WaveSound; static Uint8 sound_on; |
︙ | |||
257 258 259 260 261 262 263 | 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 | - + + | } if(mmlvolume) { mmltuning=malloc(256*sizeof(Uint32)); if(!mmltuning) fatal("Allocation failed\n"); optionquery[2]=Q_mmlTuning; if(v=xrm_get_resource(resourcedb,optionquery,optionquery,3)) f=strtod(v,0); else f=440.0; f*=0x80000000U/(double)spec.freq; |
︙ | |||
319 320 321 322 323 324 325 | 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 | - + - + + + + + | if(!m) return; if(m<511) mmlsound[m+1]=0; mmlpos=1; mmltime=mmlsound[1]*mmltempo; } void set_sound_effect(Value v1,Value v2) { |
︙ | |||
351 352 353 354 355 356 357 | 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 | - + | case TY_STRING: case TY_LEVELSTRING: if(!mmlvolume) break; if(s=value_string_ptr(v1)) set_mml(s); break; case TY_FOR: // (only used for the sound test) if(!mmlvolume) break; |
︙ | |||
385 386 387 388 389 390 391 | 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 | - + | char buf[256]; if(main_options['T'] && main_options['v']) { if(mmltuning) printf("mmltempo=%d; mmlvolume=%d; mmltuning[96]=%d\n",(int)mmltempo,(int)mmlvolume,(int)mmltuning[96]); for(i=0;i<nusersounds;i++) printf("%d: %s (ptr=%p, len=%d bytes)\n",i,user_sound_names[i],usersounds[i].data,usersounds[i].len); fflush(stdout); } if(!screen) return; |
︙ |