1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Logic 9 Dynamically triggering playback of changing external sound files

Discussion in 'Logic 9' started by jpcote, Nov 28, 2011.

  1. jpcote

    jpcote New Member

    I'm working on an interactive music performance. So far, I have a custom application triggering audio playback in Logic via MIDI. This works great and gives me a lot of flexibility sound-wise.

    However, I am now stumbling on a problem. I am dynamically synthesizing speech excerpts and saving them as wav files onto disk (during the live performance). I need a way for my custom application to tell Logic to play those files. I haven't found a way (in Logic or with a plugin) to do that. I though I could get away with creating an EXS24 instrument with a bunch of placeholder audio files and overwriting the audio files during the performance but it does not work. I guess EXS24 loads all samples into RAM at the beginning and doesn't reload the files until relaunched.

    Can you guys think of a way to achieve this. I guess my best bet would be to find a sample player audio unit that would play the sounds from disk instead of from RAM. Does such a thing exist ? Or perhaps you guys can think of another solution ?

  3. Tangra

    Tangra Senior member

    Could you give more information about:
    1. Which is your "Custom" application triggering audio playback in Logic via MIDI ?
    2. How this application triggers the audio in Logic.
    - Mutes, unmutes, solo track(s) etc, while Logic is in a Cycle mode ?
    - Forces Logic to jump from one Marker to another using Meta event 51 ?
    - something other ?
    3. According to your description you want to have a real time audio FX processing, live recording of that processing and live triggering of the final file right ? What are the Pros & Cons of the live recording triggering.
    4. What about if there is a scenario where you have assigned different Logic Channel Strips with a given FX processing chain and just change (bypass) the plugins of that Channel Strip or to toggle pre-loaded FX Channel Strips etc ?

  4. jpcote

    jpcote New Member

    My "custom" application is simply PHP code run in command-line mode. It talks to Logic via MIDI messages. Basically, it triggers virtual instruments by simply sending MIDI messages to Logic. Nothing fancy there.

    The problem is that the sounds that I want Logic to play back within EXS24 are synthesized on the fly by a speech synthesizer.
  5. Tangra

    Tangra Senior member

    To my opinion there is no way to make EXS24 samples and trigger them on the fly. So if you want to get any workaround support you must think about how to automate this "speech synthesizer" on the fly or how to change presets of this synthesizer in real time, use pre loaded instrument instances etc. Which is this "Speech Synth" ...? More info is welcome.
  6. jpcote

    jpcote New Member

    Thank you for taking time to reply. The speech synthesizer I am using is called "Flinger" (http://www.cslu.ogi.edu/tts/flinger/). Basically, it takes text as input and spits out audio files. I could potentially play those files using a number of tools but I would have preferred to use Logic. This would've allowed me to use pitch shifting (and other) plugins to process the speech audio files.

    A possible avenue would be to know how to create .exs files myself. The thing is that it's a proprietary binary format for which I can't seem to find any documentation...

    Maybe somebody has another idea ?
  7. Peter Ostry

    Peter Ostry Administrator Staff Member

    The only program I know that can load audio files with known names on demand is Max/MSP. This may be the best application for this kind of experiments anyway. For playback via Logic you could route from Max/MSP through an application that provides virtual audio ports (i.e. Soundflower or Jack Server).

    Another method would be to send the audio you generated either to your audio interface or via virtual audio ports to Logic.

    A weird idea:
    apTrigga is a sound replacer and can trigger sample files based on filter settings. It does not copy the files, however, it has to load them somehow. Maybe you can prepare apTrigga to play files with given names and change the files on the fly by writing new files with the same names to disk? You would trigger them by tones with different frequencies. I haven't tried this yet, maybe it works.
  8. jpcote

    jpcote New Member

    Thank you Peter for your response. As it turns out, I started my projetct in Max/MSP but I eventually abandonned it. While it's very good at certain things, I found it to be a little tedious when programming became a bit more involved.

    However, your suggestion to route a sample playing app (such as Max/MSP or other) back into Logic via Jack Server is a very good idea I had not though of. Perhaps I can find some simple command-line sample playback application that I could easily trigger with my code...

    apTrigga looks promising too. The documentation states that samples can be selected with MIDI CC70 which would be even better than using tones. It is not clear whether I can overwrite the sound files though. I guess I will have to try.

    In any case, you've given me options. Thanks a lot for your time. It's really appreciated.

Share This Page