[chuck-users] how is this "on the fly"?

Michal Seta mis at artengine.ca
Mon Sep 17 14:21:20 EDT 2007


Hi,

On 9/17/07, AlgoMantra <algomantra at gmail.com> wrote:
[snip]
> Allow me to restate my objective. I want "to read the sound of a live flute
> off the audio port in realtime, and analyse it using Python". Now...

What I don't understand is why do you learn CSound, SuperCollider,
ChucK if all you want to do is use Python?

>
> This is a reply to me from one of the main PySndObj developers:
>
> thinking a little more about this, I think there is no pitch  tracker
>  there (I need to add one...). So you can try csound:
>
> See that? at least he understood my question somewhat.

The question is a little vague so he pointed you in *one* direction.

> Now here's a response from the gentleman at Pymedia:
>
>
> Can you please check voice_recorder_player.py or voice_recorder.py
> from examples tar ball ?May be it will resolve most of the issues.
> He is answering a completely different question! I'm talking about
> intercepting data off a port, and he's talking of recording it.

I think you are misunderstanding.  He is telling you to look into the
recorder example so that you can see how to capture live audio.

> I had seen
> the example he's talking about but it made no sense in the context.

Which context?  The context of capturing real-time audio?  Or the
context of doing "an analysis" on the signal.  It certainly makes no
sense in the latter but a lot in the former.

> And I was kinda lucky in that I know what a tarball is

You mean you acquire knowledge through luck?  Or am I misunderstanding
something.

>- most artists
> who dabble in technology come from diverse background. ( I am one
> of the 2 or 3 new media artists in India). So I find it odd that when
> newbies
> ask questions, developers answer very sweetly, but in code.

All artists come from diverse backgrounds.  And regardless of what you
dabble at, you still have to follow the learning path, especially if
you want to become somewhat proficient at it.  If computers are your
thing, you have to learn some basics about the computer and operating
systems and how to use different applications.  If you are proficient
enough with computers to start coding audio applications in python and
you don't state your background but, instead, you ask a vague
question, it is understandable that developers assume that you know
what you're talking about.  If you need hand-holding, which all
newbies of the world need, you have say so and state your problem with
as much precision as possible so that those who would like to help you
do not need to do much guess work.

Now, do you mean there are only 2-3 new media artists in India?
Strange.   A random Google hit:
http://www.newmedia.sunderland.ac.uk/nmcr/india/ilinks.htm
suggests that there are a few more.

>
> Perhaps the truth really is that adc => FFT => dac, which is so simple
> for ChucK etc - has no analog in Python, and people are just too
>  ashamed to admit that they don't know how its done.

I never used Python for audio but I would assume that it, in fact, is
possible.  In any case, I find it hard to believe that after having
learned CSound and SuperCollider you have not been able to achieve you
goal of reading live flute and analysing it (I don't know what kind of
analysis you want to do and what you want to use the analysis data).
Have you looked at Pure data?  puredata.info.  Perhaps this is a
little more high-level than CSound or SC (or even chuck).  Also, there
are python wrappers for csound so you can script the csound shebang
with python, if you're so inclined.  So, if PySndObj doesn't cut if
for you, do it with pyCSound.

>To use Chuck to
> do this, I will need to learn YET ANOTHER LANGUAGE called OSC
> or something, which will talk to messages from Python (which are
> messages originating in my phone coming via Bluetooth) so I can
> pretty much give up on realtime.

OSC is a protocol.  It should not be needed for such simple task as
reading the audio port, analysing the signal and (insert your action
here).  However, if you intend to control your computer by messages
you type on your phone, you can certainly forget about realtime,
unless you're a hyper-fast phone-keypad-typist.

>
> I hate Python. Ugh, no! I love it, but I hate where I am with this
> damn project.

Whining is certainly not going to help you.  What will help, however,
is that you think about what you want to achieve, clearly state your
needs, problems and issues and then write to the appropriate mailing
list.

Regards,

./MiS

>
> *looks despondently at the wall picture of Lord Shiva,
> who has a familiar serpent tied around his neck like a
> scarf*
>
>
>  -------
> 1/f   )))
> -------
> http://www.algomantra.com
>
>
>
>
>
>
>
>
>
>
>
> On 9/17/07, robin.escalation <robin.escalation at acm.org> wrote:
> > --- AlgoMantra <algomantra at gmail.com> wrote:
> >
> > > If you prepare your files and code in advance and then just chuck
> > > the
> > > shreds in and out of the VM, it really is a a bit like sequencing,
> > > rather
> > > than livecoding. And if I change the code in the file, save it,
> > > then the
> > > effects don't appear live, do they?
> >
> > In my little free time that I am spending with ChucK I am trying to
> > figure this out as well! The best I get is editing one file while
> > another is playing. This feels more like batch programming than real
> > time.
> >
> > > Maybe i'm missing something freakin obvious, but I'm so frustrated
> > > having had to learn Csound, Chuck, SuperCollider and all sorts of
> > > new languages just because Python did not provide me with a simple
> > > audio processing module. All I wanted to do using Python was
> > > analyse the sound
> > > of a live flute playing and plot its frequency, and other
> > > characteristics,
> > > straight off the audio port.
> >
> > It is annoying that no-one has wrapped a decent library for Python.
> > But haver you checked out my article on this topic? It could be that
> > if you have simple needs PyMedia or one of the other mentioned tools
> > might do.
> >
> > Surf:
> >
> http://diagrammes-modernes.blogspot.com/2007/08/music-control-tools-python-based.html
> >
> > -- robin
> >
> > -----
> > Robin Parmar
> > robinparmar.com
> > _______________________________________________
> > chuck-users mailing list
> > chuck-users at lists.cs.princeton.edu
> >
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
> >
>
>
>
>
> _______________________________________________
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
>
>


More information about the chuck-users mailing list