On Wed, Oct 20, 2004 at 07:23:24PM -0300, Martin Rocamora wrote: > Hi! I need some help on looping a sound using ecasound. > I use the GNU/Linux system as an effect processor (reverb and eq) for a live > show. Some of the list members point my attention to ecasound to do that, and > is working great. > Now I need to play some sounds in loop while doing the effect processing. > Particullary, it would be great to press a key to start playing a sound in > loop, until another key is pressed and that starts playing a second sound in > loop, and so on. > So I tried a simple bash script to do that (using aplay), but it didn't work > as I get a sound interrupt for each loop. Then I made a program in C (using > ncurses and sndlib) to do the job, that's almost finished and seems to work > ok. > And now the questions: > ?Is there a "natural" way of doing sound loops (in the way I discribed) using > ecasound? ?How can I "connect" the C program to ecasound (without using jack) > while using it as a real-time effect processor? > Thanks a lot and sorry for the long description. Check out the ecasound .ewf file format. It allows you to loop an input file. You can then attach an amplify effect to the loop's chain and attach a midi controller to the amplify effect. This will get you close, but won't be the same as having a trigger that starts the loop, since the loop will run continuously with the midi cc giving you volume control. If you know before hand when you want the loops to start and stop you can specify this in the .ewf file. As far as I know ecasound doesn't have any sense of an event based system that can react in realtime to you hitting a key to say "start this loop now". But, you can fade a loop in or toggle it's muted/unmuted state. -Eric Rz.