• ANSI music / sound effects

    From Kirkman@VERT/GUARDIAN to All on Mon Jun 22 23:47:47 2015
    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@VERT/GUARDIAN to All on Sat Aug 8 19:46:45 2015
    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@VERT/SYNCNIX to Kirkman on Mon Aug 10 22:09:25 2015
    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@VERT/GUARDIAN to Deuce on Tue Aug 11 04:49:39 2015
    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@VERT/GUARDIAN to Deuce on Tue Aug 11 04:59:50 2015
    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@VERT/SYNCNIX to Kirkman on Wed Aug 12 08:37:22 2015
    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@VERT/SYNCNIX to Kirkman on Wed Aug 12 08:37:38 2015
    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@VERT/TECHQRY to Kirkman on Sat Nov 28 11:23:34 2015
    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@VERT/DIGDIST to Deavmi on Sat Nov 28 21:04:18 2015
    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@VERT/TRNTEST to Nightfox on Sun Nov 29 02:01:55 2015
    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@VERT to tracker1 on Sun Nov 29 05:21:31 2015
    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

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net