Logic Pro 9 Dynamically triggering playback of changing external sound files

jpcote

Logician
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 ?

TIA.
 
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 ?

A.G
 
Upvote 0
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.
 
Upvote 0
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.
 
Upvote 0
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 ?
 
Upvote 0
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.
 
Upvote 0
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.
 
Upvote 0
Back
Top