Splay » History » Version 9
Paul Janson, 10/13/2021 01:18 PM
1 | 6 | Per Amundsen | _Added in 1.9.0_ |
---|---|---|---|
2 | 1 | Per Amundsen | _ |
3 | */splay -cmpqw [filename | stop | pause | resume | seek | skip] [pos]* |
||
4 | |||
5 | Plays the specified sound, which can be a .wav, .mid, or .mp3 file. |
||
6 | |||
7 | 7 | Per Amundsen | When a sound finishes playing, it triggers a [[On SONGEND|sound event]]. |
8 | |||
9 | 5 | Per Amundsen | _Playing mp3 files with large "ID3 tags":https://en.wikipedia.org/wiki/ID3 and/or album art, may not work._ |
10 | |||
11 | 9 | Paul Janson | _See also [[on SONGEND]], [[on MP3END]], [[on WAVEEND]], [[on MIDIEND]], [[$filename]], [[$sound]], [[$mp3dir]], [[$wavedir]], [[$mididir]], [[$insong]] , [[/vol]], [[$vol]]._ |
12 | 8 | Per Amundsen | |
13 | 1 | Per Amundsen | *Switches* |
14 | |||
15 | -c - Clears the song queue. |
||
16 | -m - Midi. |
||
17 | -p - Mp3. |
||
18 | -q - Queue song to play after current song. |
||
19 | -w - Wave. |
||
20 | |||
21 | *Parameters* |
||
22 | |||
23 | [filename | stop | pause | resume | seek | skip] - File to play or operation to perform on current song. |
||
24 | 7 | Per Amundsen | [pos] - If pos is defined, file will start playing at position pos. |
25 | 4 | Per Amundsen | |
26 | *Example* |
||
27 | |||
28 | <pre> |
||
29 | ; Match on "play a song" then play "mysong.mp3" |
||
30 | 1 | Per Amundsen | on *:TEXT:play a song:*:splay c:\mysong.mp3 |
31 | 9 | Paul Janson | |
32 | |||
33 | </pre> |
||
34 | |||
35 | *Note:* The -q switch allows adding the sound to the queue instead of interrupting the currently playing sound. However each type of sound file has a different response to using/not-using the -q switch as it interacts with other filetypes. |
||
36 | |||
37 | If an MP3 is already playing, and you use "/splay filename.mp3" without using the -q switch, the current MP3 stops playing in order to play your new MP3, and when it finishes, the original MP3 does NOT play, and instead you'll hear whatever is the next file in the queue, if any. |
||
38 | |||
39 | However, if an MP3 is currently playing and you play a MIDI or WAV without using the -q switch, the new sound plays without stopping the existing MP3. While this seems strange to allow playing 3 different songs at the same time, this is important because it can allow you to hear an alert.wav immediately without waiting for the existing MP3 to finish. It's also used in scripting arcade games where you have 3 kinds of sounds playing together to complement each other. Even though the current sound is interrupted when you use /splay without the -q switch, the queue remains unaffected, and those sounds will play next. |
||
40 | |||
41 | Using the -q switch will put a sound file into the queue, even if the currently playing sound is of a different filetype. MP3 MIDI and WAV all share the same queue, so sounds will play in the order in which they were added to the queue, and the queue'ed sounds play 1 at a time, so you won't have a WAV and an MP3 coming out of the que to play at the same time, like can happen without using the -q switch. |
||
42 | |||
43 | *Troubleshooting Sound:* the default install of AdiIRC does not have sound enabled, so you will not hear any sound file you play until you check the "enable sounds" box in options/sounds. |
||
44 | |||
45 | By default, AdiIRC looks for sound files in the 'sounds' subfolder beneath the folder where config.ini is located. If you wish to change that location, see options/sounds/"sound folders" where you can optionally create subfolders for each type of sound file. Either as brother folders to 'sound' or subfolders beneath it. |
||
46 | |||
47 | Also, by default all your sound files will be downloaded by DCC GET into the same "downloads" subfolder where all other files get downloaded. If you wish to have them downloaded into the same folder where /splay looks for them, you will also need to go to options/DCC/"dcc get folders" and create an entry there for *.mp3 which matches the options/Sounds folder where it's looking for mp3 filetypes. If you have done this correctly, these will point to the same folder: |
||
48 | <pre> |
||
49 | //echo -a $getdir(*.mp3) and $mp3dir |
||
50 | //echo -a $getdir(*.wav) and $wavedir |
||
51 | </pre> |
||
52 | If you STILL cannot hear sounds, be aware that AdiIRC uses the master sound settings for the computer, so if the volume level is turned down, or mute is enabled then you won't hear anything. To troubleshoot, paste the next comand into an editbox. The first number is the loudness on a scale of 0 to 65535, with 65535 being 100%. If the 2nd word is $true then your computer itself has the sounds muted. |
||
53 | <pre> |
||
54 | //echo -a $vol(master) $vol(master).mute |
||
55 | </pre> |
||
56 | If the volume is too low or is muted, you can use your computer's speaker icon near the bottom pc taskbar's clock to change the volume or to un-mute it. If you STILL cannot hear the sound, make sure your speakers themselves are turned on and have the volume turned up too. |
||
57 | |||
58 | In summary, the loudness of the song you hear, or whether you even hear it at all - is affected by 4 things - Whether sound is enabled in AdiIRC, the volume level the file itself was recorded at, the volume setting in the computer's speaker icon and whether the mute it set there, and whether the speaker itself is turn on and turned up. |
||
59 | |||
60 | You can also change your mute-state and the volume from within AdiIRC: |
||
61 | <pre> |
||
62 | Turns mute ON so you cannot hear: |
||
63 | /vol -vu1 |
||
64 | Turns mute OFF so you can hear: |
||
65 | /vol -vu2 |
||
66 | Turn the volume to 100% max: |
||
67 | /vol -v 65535 |
||
68 | 4 | Per Amundsen | </pre> |