• ANSI music / sound effects

    From Kirkman@GUARDIAN to All on Monday, June 22, 2015 16:47:47
    I'm playing around with using ANSI music code to make sound effects. Has anyone played around with this? What's the best way to integrated music routines into drawing routines?

    For example, I'm using frames and .cycle(). After a cycle, if something has happened that should trigger a sound effect, I play the appropriate ANSI music by calling console.write().

    But it does seem like the game hangs a bit until the (three-note) music is finished playing. Not sure if there's a better way.

    --Josh

    ---
    ■ Synchronet
  • From Kirkman@GUARDIAN to All on Saturday, August 08, 2015 12:46:45
    Re: ANSI music / sound effects
    By: Kirkman to All on Mon Jun 22 2015 04:47 pm

    I'm playing around with using ANSI music code to make sound effects. Has anyone played around with this? What's the best way to integrated music routines into drawing routines?

    For example, I'm using frames and .cycle(). After a cycle, if something has happened that should trigger a sound effect, I play the appropriate ANSI music by calling console.write().

    But it does seem like the game hangs a bit until the (three-note) music is finished playing. Not sure if there's a better way.

    Just wanted to bump this topic.

    In my experiments, if I play a sound effect using console.write(), the game will not respond to player input until the entire sound effect has finished playing.


    Would this be a problem on the BBS/code side, or is this a SyncTerm issue with playing ANSI music?


    --Josh

    ////--------------------------------------------------
    BiC -=- http://breakintochat.com -=- bbs wiki and blog

    ---
    ■ Synchronet
  • From Deuce@SYNCNIX to Kirkman on Monday, August 10, 2015 15:09:25
    Re: ANSI music / sound effects
    By: Kirkman to All on Sat Aug 08 2015 12:46 pm

    Would this be a problem on the BBS/code side, or is this a SyncTerm issue with playing ANSI music?

    Unless the ANSI music is explicitly played in the background, it plays in the foreground which will prevent anything else from being displayed until the music finishes.

    ---
    http://DuckDuckGo.com/ a better search engine that respects your privacy.
    Mro is an idiot. Please ignore him, we keep hoping he'll go away.
    ■ Synchronet ■ My Brand-New BBS (All the cool SysOps run STOCK!)
  • From Kirkman@GUARDIAN to Deuce on Monday, August 10, 2015 21:49:39
    Unless the ANSI music is explicitly played in the background, it plays in the foreground which will prevent anything else from being displayed until the music finishes.

    How can I make the ANSI music play in the background?

    --Josh

    ---
    ■ Synchronet
  • From Kirkman@GUARDIAN to Deuce on Monday, August 10, 2015 21:59:50
    Re: ANSI music / sound effects
    By: Deuce to Kirkman on Mon Aug 10 2015 03:09 pm

    Unless the ANSI music is explicitly played in the background, it plays in the foreground which will prevent anything else from being displayed until the music finishes.

    Wait, are you talking about the "MB" / "MF" options? I'm just looking up the specs and trying to understand how it works.

    --Josh

    ////--------------------------------------------------
    BiC -=- http://breakintochat.com -=- bbs wiki and blog

    ---
    ■ Synchronet
  • From Deuce@SYNCNIX to Kirkman on Wednesday, August 12, 2015 01:37:22
    Re: ANSI music / sound effects
    By: Kirkman to Deuce on Mon Aug 10 2015 09:49 pm

    Unless the ANSI music is explicitly played in the background, it plays in the foreground which will prevent anything else from being displayed until the music finishes.

    How can I make the ANSI music play in the background?

    It's documented here: http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/src/conio/cterm.txt?revis ion=1.34

    The last section in the document ``"ANSI" Music''

    So, if I assume you use the "CSI N" method (ie: ESC[N), it would be "ESC", "[", "N", "M", "B", followed by the notes etc.

    An "MB" in the music string with switch to background music. If the introducer is CSI M, the initial 'M' can be implied, but it can also be explicit. It really depends on what other terminal programs you want to be compatible with.

    ---
    http://DuckDuckGo.com/ a better search engine that respects your privacy.
    Mro is an idiot. Please ignore him, we keep hoping he'll go away.
    ■ Synchronet ■ My Brand-New BBS (All the cool SysOps run STOCK!)
  • From Deuce@SYNCNIX to Kirkman on Wednesday, August 12, 2015 01:37:38
    Re: ANSI music / sound effects
    By: Kirkman to Deuce on Mon Aug 10 2015 09:59 pm

    Wait, are you talking about the "MB" / "MF" options? I'm just looking up the specs and trying to understand how it works.

    Yep, those are the ones.

    ---
    http://DuckDuckGo.com/ a better search engine that respects your privacy.
    Mro is an idiot. Please ignore him, we keep hoping he'll go away.
    ■ Synchronet ■ My Brand-New BBS (All the cool SysOps run STOCK!)
  • From Deavmi@TECHQRY to Kirkman on Saturday, November 28, 2015 03:23:34
    Re: ANSI music / sound effects
    By: Kirkman to All on Mon Jun 22 2015 04:47 pm

    I'm playing around with using ANSI music code to make sound effects. Has any

    For example, I'm using frames and .cycle(). After a cycle, if something has

    But it does seem like the game hangs a bit until the (three-note) music is f

    --Josh

    Multi-threading?

    ---
    ■ Synchronet ■ TechnoQuarry BBS
  • From Nightfox@DIGDIST to Deavmi on Saturday, November 28, 2015 13:04:18
    Re: ANSI music / sound effects
    By: Deavmi to Kirkman on Sat Nov 28 2015 03:23:34

    But it does seem like the game hangs a bit until the (three-note)
    music is f

    Multi-threading?

    I don't think JavaScript supports multi-threading - At least, not unless someone has a library that can be called from JavaScript that supports multi-threading.

    Nightfox

    ---
    ■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com
  • From tracker1@TRNTEST to Nightfox on Saturday, November 28, 2015 18:01:55
    But it does seem like the game hangs a bit until the (three-note)
    music is f

    Multi-threading?

    I don't think JavaScript supports multi-threading - At least, not unless someone has a library that can be called from JavaScript that supports multi-threading.

    The JS in SBBS is definitely linear execution... short of implementing an event-
    loop with callback system, similar to node.js, I don't know it's going to improve. Also, it may be a limitation of how ansi-music works on the client. --
    Michael J. Ryan
    tracker1(at)gmail.com
    +o Roughneck BBS

    ---
    ■ Synchronet ■ RoughneckBBS - http://www.roughneckbbs.com/
  • From Digital Man to tracker1 on Saturday, November 28, 2015 21:21:31
    Re: Re: ANSI music / sound effects
    By: tracker1 to Nightfox on Sat Nov 28 2015 06:01 pm

    But it does seem like the game hangs a bit until the (three-note)
    music is f

    Multi-threading?

    I don't think JavaScript supports multi-threading - At least, not unless someone has a library that can be called from JavaScript that supports multi-threading.

    The JS in SBBS is definitely linear execution... short of implementing an event-
    loop with callback system, similar to node.js, I don't know it's going to improve. Also, it may be a limitation of how ansi-music works on the client. --

    Synchronet does support multi-threaded JavaScript (background load'ed scripts with inter-thread communication via message queue) and has for many years.

    digital man

    Synchronet "Real Fact" #75:
    Michael Swindell still has the "Synchronet Blimp" in his possession.
    Norco, CA WX: 52.1°F, 30.0% humidity, 4 mph W wind, 0.00 inches rain/24hrs