[ecasound] the first python hack :)

New Message Reply Date view Thread view Subject view Author view Other groups

Subject: [ecasound] the first python hack :)
From: Kai Vehmanen (k@eca.cx)
Date: Fri Dec 01 2000 - 13:37:24 EET


Ok, here's a very bad example of both python coding and ECI usage,
but oh well, it works. :) You'll need the latest CVS-tree.

--cut--
#!/usr/local/bin/python
from time import sleep
from pyeca import *
e = ECA_CONTROL_INTERFACE()
e.command("cs-add test")
e.command("-i:/empty1/smile.mp3")
e.command("-o:/dev/dsp")
e.command("cop-add -ef3:0,0.75,0.9")
e.command("cop-add -ete:10,40,1")
e.command("cs-connect")
e.command("start")
for i in range(30, 1, -1):
    e.command("cop-set 2,1," + repr(i))
    e.command("cop-set 2,3," + repr(5 + i * 3))
    j = 800.0
    while(j < 5200):
        e.command("cop-set 1,1," + repr(j))
        j = j + 17 * i
        sleep(0.03)
    while(j > 800):
        e.command("cop-set 1,1," + repr(j))
        j = j - 16 * i
        sleep(0.02)
e.command("stop")
sleep(2)
e.command("cs-disconnect")
e.command("status")
--cut--

-- 
 . http://www.eca.cx ... [ audio software for linux ] /\ . 
 . http://www.eca.cx/aivastus ... [ aivastus net radio ] /\ . 

-- To unsubscribe send message 'unsubscribe' in the body of the message to <ecasound-list-request@wakkanet.fi>.


New Message Reply Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Fri Dec 01 2000 - 13:05:10 EET