[PlanetCCRMA] ecasound control interface problem
francis keyes
fkeymo at gmail.com
Tue Sep 2 13:15:40 PDT 2008
Hi All,
Sorry for the cross/multiple posts. I have a C program that uses
libecasoundc to control 4 oscillators in ecasound. I took a break from
developing this for about a year. I have recently returned to it and I'm
finding that ecasound stops running very early in the program. A year ago
this code was working very well on a Fedora core 5 machine with Planet ccrma
kernel and ecasound 3.4.6.1. Now I am running Fedora 8 with ccrma but the
same code only runs for about 5 seconds before ecasound stops. I set the
ECASOUND_LOGFILE environment variable and found this after about 5 seconds
in operation:
[OBJECTS ] (eca-control) command: q <17850>
...after which there are a bunch of messages that indicate ecasound is
stoppng. I definitely haven't programmed in that command. Why would that
show up?
I've compiled the example c program from the ECI guide and found similar
behaviour. I have included at the end of this email a small test c program
that produces these results on my system.
Any help is greatly appreciated.
Thanks a lot,
Francis
Current system info:
Hardware: Pentium 4, 1.5 G RAM
OS: Fedora 8, ccrma
#rpm -qa | grep ecasound:
ecasound-2.4.6.1-1.fc8.ccrma
pyecasound-2.4.6.1-1.fc8.ccrma
libecasoundc-2.4.6.1-1.fc8. ccrma
TEST C PROGRAM:
#include <stdio.h>
#include <unistd.h>
#include <ecasoundc.h>
#include <unistd.h> /*sleep */
//COMPILE: gcc -g -o example example.c `libecasoundc-config --cflags --lib`
int
main (int argc, char *argv[])
{
//start jack
system ("jackd -R -dalsa -dhw:0 -r44100 -p1024 -n2 2>&1 &");
sleep (3);
//ecasound stuff
eci_init ();
eci_command ("cs-add waveup_cs");
//oscillator 1
eci_command ("c-add osc1");
eci_command ("ai-add null");
eci_command ("ao-add jack_generic,osc1");
eci_command ("cop-add -el:sine_fcac,0,0");
eci_command ("copp-select 1");
eci_command_float_arg ("copp-set", 440);
eci_command ("copp-select 2");
eci_command_float_arg ("copp-set", 5);
eci_command ("cop-add -ea:150");
eci_command ("ctrl-add -kos:1,25,50,1,0");
eci_command ("ctrlp-select 4");
eci_command_float_arg ("ctrlp-set", 1);
eci_command ("cs-connect");
eci_command ("start");
usleep (500000);
//connect jack outputs
system ("jack_connect ecasound:osc1_1 alsa_pcm:playback_1");
usleep (500000);
while (1)
{
int i;
for (i = 60; i <= 400; i++)
{
usleep(1000);
eci_command ("c-select osc1");
eci_command ("cop-select 1");
eci_command ("copp-select 1");
eci_command_float_arg ("copp-set", i);
}
for (i = 400; i >= 60;i--)
{
usleep(1000);
eci_command ("c-select osc1");
eci_command ("cop-select 1");
eci_command ("copp-select 1");
eci_command_float_arg ("copp-set", i);
}
eci_command ("engine-status");
if (strcmp (eci_last_string (), "running") != 0) {
puts ("ECASOUND STOPPED!");
//break;
}
}
eci_command ("stop");
eci_command ("cs-disconnect");
eci_command ("cop-status");
printf ("Chain operator status: %s", eci_last_string ());
eci_cleanup ();
return (0);
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cm-mail.stanford.edu/pipermail/planetccrma/attachments/20080902/a1b604ee/attachment.html>
More information about the PlanetCCRMA
mailing list