Page 1 of 1

HLDJ: Soundboard style

Posted: Fri Apr 09, 2010 3:34 pm
by Sinistar
So, I'm looking to make a set of keys act as a "soundboard" for a few canned responses I've got audio files for.
Example: Pressing F1 selects and plays file1. The same goes for F2::file2 F3::file3 and so on.

I have created an alias in console in an attempt to recreate this soundboard style: alias "play1" "bind = file1; hldjsf; hldj_playaudio;"
And of course, bound F1 to "play1".
When I press F1, it selects and plays file1. However, upon selecting a second file to play, it plays file1 again, instead of file2. If, after playing the file1 bind, I double-tap F2, it will play file2.

I'm not quite sure what is the cause of this. It seems to be queuing file1 after I've already played it once... Any help?

Re: HLDJ: Soundboard style

Posted: Fri Apr 09, 2010 9:44 pm
by Renegade
that behaviour is somewhat expected since hldj_playaudio works like a toggle (tap once for on, again for off); you might find it more convenient to use hldj_playaudio_on/off instead. So your alias might look like:

Code: Select all

alias "play1" "bind = file1; hldjsf; hldj_playaudio_off; hldj_playaudio_on"
which first stops whatever might be playing, then starts the loaded file. You may need to add a few waits before issuing hldj_playaudio_on but with the latest version of HLDJ it's usually not necessary.

Also, in case you haven't already, be sure to check out the sticky/tutorial in this forum on binding songs to keys.

Re: HLDJ: Soundboard style

Posted: Fri Apr 09, 2010 11:59 pm
by Sinistar
Bonus points for the quick reply.

Okay, cool. I figured it would involve something like that but I think I kept using the _off command in the wrong places.
I'll try to set it up using that advice and let you know how it works.

Re: HLDJ: Soundboard style

Posted: Sat Apr 10, 2010 7:38 pm
by Sinistar
No joy.

Putting the command in that spot doesn't appear to work. It seems like it's stopping the audio I just selected, leaving the current audio as none.

Re: HLDJ: Soundboard style

Posted: Sat Apr 10, 2010 10:37 pm
by Renegade
Seems I lied, a bit of a wait is necessary (though last time I tested, load times were near instantaneous).

Code: Select all

alias "play1" "bind = file1; hldjsf; wait 10; hldj_playaudio_off; hldj_playaudio_on"
If the game uses a pre-Source2007 engine, you'll need to replace "wait 10" with ten actual "wait"s or "hldjw" or however many you find is necessary.

Re: HLDJ: Soundboard style

Posted: Mon Apr 12, 2010 12:19 pm
by Game Zombie
Renegade wrote:Seems I lied, a bit of a wait is necessary (though last time I tested, load times were near instantaneous).

Code: Select all

alias "play1" "bind = file1; hldjsf; wait 10; hldj_playaudio_off; hldj_playaudio_on"
If the game uses a pre-Source2007 engine, you'll need to replace "wait 10" with ten actual "wait"s or "hldjw" or however many you find is necessary.
Actually if your using hldj with a older Source game you can just put into your autoexec.cfg

Code: Select all

 alias "wait 10" "wait; wait; wait; wait; wait; wait; wait; wait; wait; wait" 

Re: HLDJ: Soundboard style

Posted: Mon Apr 12, 2010 4:32 pm
by Renegade
To add to that, "hldjw" / "hldj_wait" is aliased to about 70 waits.