Re: [ecasound] Multiple little wav files, played when the user chooses

From: Joel Roth <joelz@email-addr-hidden>
Date: Sat Feb 04 2017 - 10:27:58 EET

Ahoy Peter,

Peter Billam wrote:
> Greetings.
>
> I'm a relative newbie to ecasound, but I've done several Perl and
> Lua modules, many of them music-realated, and I've just written
> a Lua interface to the functions in libecasoundc/ecasoundc.h

Fine that Lua programmers can use Ecasound! The process of
creating a foreign function interface has been unintellible
to me, working in perl 5, up to now. Perl 6 has a much
simpler FFI, but I was unable to get test script to speak to
libecasoundc. I used to depend on Audio::Ecasound, but all
that work can be elided by just talking to Ecasound through
a socket.

> I mean why should Perl and Python programmers have all the fun ?
> http://www.pjb.com.au/comp/lua/ecasound.html
> https://luarocks.org/modules/peterbillam/ecasound
> So now I'm dreaming of things I can do with it...
>
> man ecasound-iam says:
> ai-attach, ao-attach
> Attaches the currently selected audio object to all selected chains.
> So I can imagine a toy app which takes a dozen or so little .wav files
> each connected to its own chain, with a dozen little buttons that
> the user can push to play the corresponding .wav file.
> This means that after being played, that chain would have to rewind
> somehow, or its audio input could be disconnected and reconnected,
> or the chain would have to be liquidated and a new one created.
>
> But ai-rewind, c-add, ai-attach and c-clear all disconnect and
> reconnect the whole chainset, thus interrupting any other .wav
> files which happen to be playing at the time.
> Is there a way of playing a .wav file repeatedly, when desired,
> without invoking one of these chainset-disconnecting commands ?

Some Ecasound commands affect the ecasound audio processing
engine while it is running, for example adjusting a volume
level, while other commands configure the audio
processing network, which in Ecasound is called a chain setup.

Once the engine is configured (in Ecasound terminology, once
a chain setup is connected) you can run the engine and stop
at as you please, however if you want to play a file that was
not defined beforehand, you must halt and reconfigure the
engine. Only then can the data structures get all queued up
to begin streaming.

One nontrivial way around this limitation would be
to dispatch audio routes among multiple Ecasound engines
all patched together by JACK.

> Hope this makes sense :-)

Same here ;-)
 
btw, If you're interested using ecasound enhanced with
tracks, effects and other objects, you could do worse than
to look at nama (Audio::Nama) which can be found on cpan.
:-) It compiles on perl as recent as 5.22.

cheers,

--joel

Have fun
> Regards, Peter Billam
>
> http://www.pjb.com.au pj@email-addr-hidden (03) 6278 9410
> "Follow the charge, not the particle." -- Richard Feynman
> from The Theory of Positrons, Physical Review, 1949
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Ecasound-list mailing list
> Ecasound-list@email-addr-hidden
> https://lists.sourceforge.net/lists/listinfo/ecasound-list

-- 
Joel Roth
  
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Ecasound-list mailing list
Ecasound-list@email-addr-hidden
https://lists.sourceforge.net/lists/listinfo/ecasound-list
Received on Sat Feb 4 12:15:01 2017

This archive was generated by hypermail 2.1.8 : Sat Feb 04 2017 - 12:15:01 EET