Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How do you put music into twine when you are using it online

I am trying to put music into twine using it online. I have tried many different ways but none of them seem to work! please help! Thank you.

Comments

  • You need to state which story format you are using, as answers can be different for each one.

    Basically you will need to upload your sound files to a file hosting site and access them on-line.

    This thread may help you, the hosting part is generic to any story format.

    The audio element example in Jud_Casper's question post is the code you use to play audio files in Harlowe.

    The later information from TheMadExile explains which macros to use to cache and play the audio files if you are using SugarCube.
  • Hi, what story format are you using? It it Harlow, SugarCube, Sugarcane etc? I use Sugarcube 2, which has a macro for audio.

    http://www.motoslave.net/sugarcube/2/docs/macros.html#macrocat-audio
  • edited December 2015
    greyelf wrote: »
    Basically you will need to upload your sound files to a file hosting site and access them on-line.
    While this is certainly correct, it's important to know, RNdizzle, that you need to find a host which allows hotlinking of the audio file. I discovered that these places are few and far between.

    I'm not sure why it's so difficult to find hosts that allow hotlinking of audio files - I don't see how it's any different to the countless sites that allow hotlinking of images - but I could only find one place, and even then, after registering, I was told that due to heavy traffic they were only allowing hotlinking for premium users at the moment.

    Point I'm making, is that you'll find plenty of places that host your file and provide you with a link, but this is just a link to your file at THEIR site, not the file itself.

    The link you'll need for your file needs to end with .mp3 (or whatever format you use)

    I had to get my brother to host mine on his own webspace.

  • edited December 2015
    I am using SugarCube 1.0.32
  • edited December 2015
    If you do manage to get your file hosted, here's what I did:

    Create a passage called StoryInit (unlesss you already have the passage) and add the following (replacing my file path with yours):
    <<cacheaudio "bgm_space" "http://***/***/***/waves.mp3">>;
    
    Then in the passage where you want the clip to play, add:
    <<audio "bgm_space" play>>
    
    NB: No idea where that semi-colon is coming from on the end of the first macro, but it shouldn't be there.
  • Jud_Casper wrote: »
    NB: No idea where that semi-colon is coming from on the end of the first macro, but it shouldn't be there.
    The forum's code tag adds it to lines that have a URL in them, if you need to supply an example with an URL then use the quote tag instead.
    <<cacheaudio "bgm_space" "http://***/***/***/waves.mp3">>;
    
    vs
    <<cacheaudio "bgm_space" "http://***/***/***/waves.mp3">>;
  • K. Thanks, greyelf.
Sign In or Register to comment.