Csound Csound-dev Csound-tekno Search About

Re: AI using Csound was Re: a simple per

Date1998-07-02 15:47
FromPedro Batista
SubjectRe: AI using Csound was Re: a simple per
Jamie B wrote

>I'm certainly no expert on these matters, but is Csound really the right
>environment for this sort of programming?

Nope :)

>Looking at your code, and your
>comments, It seems as if you are going to great lengths to get Csound to do
>things which it isn't really that good at!

Nevertheless it was highly educative and most of all fun (ok, truth is I had 
a lot of time in my hands :))

> I'm *definitely* not saying
>that you shouldn't use CSound, I'm just interested in *why* you chose to 
use
>Csound rather than something which is more suited to the kind of work 
you're
>doing - Supercollider, Nyquist or working at a lower level with Lisp and/or
>C/C++.

You're right: it makes absolutely more sense to use C to do this; but thats 
something I already did (so the end result would be somewhat redundant), 
while Im still trying to grasp the csound programming intricacies
Besides I thought it would be fun to have some sort of neural prog in the 
musical field, and csound is already there, so its not like building it all 
from scratch in C
And there's another reason: it becomes a little frustrating to have so 
little knowledge of dsp and synthesis theory as I do (I'm waiting for my 
copy of "Elements..." :)), and be surrounded by so many knowledgeable people 
here, and altho this list and a variety of info I've been gathering has been 
VERY helpful, this gave me a chance to present some code in which I did knew 
what I was doing, for a change, instead of just ripping off from all you 
experts fine examples :)

>Good luck to you all the same, this could be the future of DSP :-)

The thing with csound, is that there's so much you can do! And one thing I 
do have its ideas, so I hope to be programming many things csound wasnt 
designed to do in the near future (with a little help from my friends)

pedro



Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa18716;
          2 Jul 98 16:58 BST
Received: from pat.bath.ac.uk by stork.maths.Bath.AC.UK id aa08911;
          2 Jul 98 16:58 BST
Received: (qmail 23793 invoked from network); 2 Jul 1998 15:58:52 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by pat.bath.ac.uk with SMTP; 2 Jul 1998 15:58:52 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (QAA08860); Thu, 2 Jul 1998 16:52:31 +0100 (BST)
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Thu, 2 Jul 98 16:52:02 +0100
Received: from howl.werewolf.net [206.103.224.20] by hermes via ESMTP (QAA00219); Thu, 2 Jul 1998 16:51:54 +0100 (BST)
Received: from hans7.cray.com (dial22.werewolf.net [206.103.225.32])
	by howl.werewolf.net (8.9.0/8.9.0) with SMTP id KAA02974
	for ; Thu, 2 Jul 1998 10:51:15 -0500 (CDT)
From: Hans Mikelson 
To: csound@maths.ex.ac.uk
MMDF-Warning:  Parse error in original version of preceding line at UK.AC.Bath.maths.stork
Subject: Re: AI using Csound was Re: a simple per
Date: Thu, 2 Jul 1998 10:53:32 -0500
Message-Id: <01bda5d1$90354500$20e167ce@hans7.cray.com>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-Msmail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.71.1712.3
X-Mimeole: Produced By Microsoft MimeOLE V4.71.1712.3
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Hi,

Awesome code!  Always nice to see something new and bizzare ported to
Csound.

It would seem to me that some of the musical applications of neural nets
would be:

1. Pitch tracking, identification of chords (major vs minor etc.)
2. Tempo, rhythm identification.
3. Formant corrected pitch shifting.
4. Extraction or removal of vocals from a track.
5. Removal of reverb from an audio track.

Prosoniq makes use of neural networks:

http://www.prosoniq.com/

These applications could be implemented as Csound opcodes or perhaps a more
flexible neural network implementation could be developed.  Maybe a
perceptron or neural network opcode could be implemented with weights
supplied in table form so different functions could be implemented with a
single opcode.

I have not actually worked much with neural networks but understand that
they are good at pattern recognition when there is a large diverse data set
available for training them.  Once they are trained they are fairly
efficient and very robust.

Bye,
Hans Mikelson




Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa18758;
          2 Jul 98 17:08 BST
Received: from pat.bath.ac.uk by stork.maths.Bath.AC.UK id aa09408;
          2 Jul 98 17:08 BST
Received: (qmail 24577 invoked from network); 2 Jul 1998 16:08:15 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by pat.bath.ac.uk with SMTP; 2 Jul 1998 16:08:15 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (RAA27849); Thu, 2 Jul 1998 17:03:06 +0100 (BST)
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Thu, 2 Jul 98 16:59:42 +0100
Received: from howl.werewolf.net [206.103.224.20] by hermes via ESMTP (QAA14487); Thu, 2 Jul 1998 16:59:06 +0100 (BST)
Received: from hans7.cray.com (dial22.werewolf.net [206.103.225.32])
	by howl.werewolf.net (8.9.0/8.9.0) with SMTP id KAA27500
	for ; Thu, 2 Jul 1998 10:58:27 -0500 (CDT)
From: Hans Mikelson 
To: Csound Mailing List 
Subject: Re: Problem Compiling Csound with MS Visual C++ 5.0 Learning Ed.
Date: Thu, 2 Jul 1998 11:00:44 -0500
Message-Id: <01bda5d2$9197c5c0$20e167ce@hans7.cray.com>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-Msmail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.71.1712.3
X-Mimeole: Produced By Microsoft MimeOLE V4.71.1712.3
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Hi,

Thanks to everyone for helping me get Csound compiled.

It turns out I had to have the source code in the directory d:\csound\ and
convert the consound project file.  Then it worked OK.  The mysterious
"nafxcw.lib" is only available with the learning edition as a dynamic link
library so the code needs to be modified in some way to make use of DLL's.

Apparently winsound uses "nafxcw.lib" in some way and I don't understand how
to convert it to use the DLL but since I have consound working it does not
matter to me much.

Bye,
Hans Mikelson






Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa19105;
          2 Jul 98 19:55 BST
Received: from pat.bath.ac.uk by stork.maths.Bath.AC.UK id aa15704;
          2 Jul 98 19:55 BST
Received: (qmail 4042 invoked from network); 2 Jul 1998 18:55:07 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by pat.bath.ac.uk with SMTP; 2 Jul 1998 18:55:07 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (TAA27780); Thu, 2 Jul 1998 19:49:47 +0100 (BST)
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Thu, 2 Jul 98 19:49:24 +0100
Received: from monsoon.dial.pipex.net [158.43.128.69] by hermes via SMTP (TAA27559); Thu, 2 Jul 1998 19:49:17 +0100 (BST)
Received: (qmail 9722 invoked from network); 2 Jul 1998 18:49:19 -0000
Received: from ao024.du.pipex.com (HELO default) (193.130.254.24)
  by smtp.dial.pipex.com with SMTP; 2 Jul 1998 18:49:19 -0000
Message-Id: <359BD508.309F@dial.pipex.com>
Date: Thu, 02 Jul 1998 19:44:24 +0100
From: p robinson 
Reply-To: project.x@dial.pipex.com
Organization: Project X
X-Mailer: Mozilla 3.01Gold (Win95; I)
Mime-Version: 1.0
To: csound@maths.ex.ac.uk
Subject: using zak space
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Hi there folks,

I've been experimenting with realtime midi control using csound, but i
have encountered a problem, which is:-

If i want to control a number of oscillators (or any other kind of
'unit') via midi, i quickly find myself running out of controllers, so i
was wondering if it is possible to define 1 controller as a type of
'shift' key, to select each generator and then use others to vary the
properties of the generator like so:

	cont 1	 cont 2
osc1	pitch	amplitude 	controller '0' selects which oscillator
osc2	pitch	amplitude  	controllers 1 and 2 control pitch/amp

would it be at all possible that i could patch the midi signal through
zak space, and then, when no midi signal is received the 'oscillator'
would read from the last values stored in zak space. This could allow
multiple uses for each controller (providing the min/max values are the
same)and so reducing the need for endless controllers. I'm equating this
with many harware synths that use this system to minimise the front
panel.

Apologies for the long winded explanation.

thanks,

P@



Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa19347;
          2 Jul 98 22:08 BST
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa20397;
          2 Jul 98 22:08 BST
Received: (qmail 8682 invoked from network); 2 Jul 1998 21:08:47 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by mercury.bath.ac.uk with SMTP; 2 Jul 1998 21:08:47 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (WAA12280); Thu, 2 Jul 1998 22:05:26 +0100 (BST)
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Thu, 2 Jul 98 22:05:02 +0100
Received: from nmol.com [206.162.11.2] by hermes via SMTP (WAA08048); Thu, 2 Jul 1998 22:04:55 +0100 (BST)
X-Routed: Thu, 2 Jul 1998 15:14:46 -0600
X-Tcp-Identity: Mikeb
Received: from nmol.com [206.162.11.170] by nmol.com with smtp
	id APANDJFD ; Thu, 2 Jul 1998 15:13:58 -0600
Message-Id: <359BF727.33C0E945@nmol.com>
Date: Thu, 02 Jul 1998 15:10:00 -0600
From: Mike Berry 
X-Mailer: Mozilla 4.05 (Macintosh; I; PPC)
Mime-Version: 1.0
To: project.x@dial.pipex.com
Cc: csound@maths.ex.ac.uk
Subject: Re: using zak space
References: <359BD508.309F@dial.pipex.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

I don't think that you even need zak space.  Try something like this:

	instr 	1

kctl	init		1
kswitch	midictrl	1
		if			kswitch != 1 goto skip
kctl	midictrl	2

skip:
;	do your stuff

	endin

	Here, kctl will only be updated to a new value if controller 1 = 1. 
Otherwise, the old value will stay put.  The init makes sure that the value is
something if the note is initialized and controller 2 != 1.
-- 
Mike Berry
mikeb@nmol.com
http://www.nmol.com/users/mikeb





Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa19368;
          2 Jul 98 22:27 BST
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa20989;
          2 Jul 98 22:27 BST
Received: (qmail 9502 invoked from network); 2 Jul 1998 21:27:25 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by mercury.bath.ac.uk with SMTP; 2 Jul 1998 21:27:25 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (WAA16503); Thu, 2 Jul 1998 22:24:04 +0100 (BST)
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Thu, 2 Jul 98 22:23:50 +0100
Received: from GS160.SP.CS.CMU.EDU [128.2.203.172] by hermes via SMTP (WAA15057); Thu, 2 Jul 1998 22:23:44 +0100 (BST)
Message-Id: <199807022123.WAA15057@hermes>
Subject: Re: a simple perceptron
To: Csound mailing list 
Date: Thu, 2 Jul 1998 17:23:43 -0400 (EDT)
From: Eli Brandt 
In-Reply-To: <0899310173/1570639462/1*@mailpac.pt> from "Pedro Batista" at Jul 1, 98 05:22:00 pm
X-Portmanteau: pantryptaminergeticallysisterrainbowtie
Reply-To: eli+@cs.cmu.edu
X-Mailer: ELM [version 2.4 PL25-40]
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Pedro Batista wrote:
> yes, that was my first thought too. But recursive nets can hold AT MOST the 
> past six values, [...]

Why's that?  A bucket-brigade delay is a possible configuration of a
one-layer recurrent net.  Admittedly a rather specific one -- when I
played with recurrent nets for signal generation (using annealing and
Hinton's recurrent backprop; had better luck with the former) I had a
hard time training them to set enough weights to zero.  A quadrature
osc, for example, was hard: a net can do one sine osc just fine, but a
little interleakage entrains the two oscs together.

(Getting rather unCsoundy; transpose to music-dsp?)

-- 
     Eli Brandt  |  eli+@cs.cmu.edu  |  http://www.cs.cmu.edu/~eli/



Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa19392;
          2 Jul 98 22:55 BST
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa21900;
          2 Jul 98 22:55 BST
Received: (qmail 10890 invoked from network); 2 Jul 1998 21:55:25 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by mercury.bath.ac.uk with SMTP; 2 Jul 1998 21:55:25 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (WAA22949); Thu, 2 Jul 1998 22:50:58 +0100 (BST)
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Thu, 2 Jul 98 22:49:13 +0100
Received: from dewdrop2.mindspring.com [207.69.200.82] by hermes via ESMTP (WAA12522); Thu, 2 Jul 1998 22:49:07 +0100 (BST)
Received: from axe (user-38ld00i.dialup.mindspring.com [209.86.128.18])
	by dewdrop2.mindspring.com (8.8.5/8.8.5) with SMTP id RAA13712;
	Thu, 2 Jul 1998 17:49:06 -0400 (EDT)
Message-Id: <003401bda604$849cf200$128056d1@axe>
From: Michael Gogins 
To: Richard Dobson 
Cc: csound 
Subject: Re: compiler
Date: Thu, 2 Jul 1998 17:58:14 -0400
Mime-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-Msmail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.2106.4
X-Mimeole: Produced By Microsoft MimeOLE V4.72.2106.4
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

First, let me repeat: I am desperately searching or trying to make,
whichever works, a general-purpose software synthesizer that has the
academic computer goodies that Csound has, inside the standard
Microsoft-world COM interfaces so it works with COM clients, as a DSP
plugin, for writing tracks inside of hard disk recorders/editors, and so on.

To really be viable in the long term, the object must itself accept plugins
for its DSP blocks.

I've made several prototypes of such a system, and I always gave up after
getting some modest instruments to work, because I want to compose, not just
write music software. There is a LOT of work inside Csound and its ilk at
this point. I DON'T want to redo it.

Sooner or later, someone will produce such an object. I'm worried that it
will wedded to MIDI only, that it will be mainly a sample player, etc.
Getting some sharp heads to write the thing from scratch would be best, but
stuffing Csound inside a COM server would be MORE than adequate.

>Yes, I know about regsrv32; what I really meant was, in what categories?
>
>As I understand things so far, ActiveMovie plugins are identified as either
a
>source filter, or a transform filter, or a renderer filter. A source filter
has
>no input pins, a renderer filter has no output pins, and a transform filter
of
>course has both. from my understanding of the DirtectShow documentation, it
is
>the presence or otherwise of these pins which tells the ActiveMovie graph
>manager what sort of object the plugin is. If it has no input pin, it can
never
>be inserted as a transform filter, whereas if it has one or more, it cannot
be
>loaded as a source filter.  Is it therefore possible to make a single
plugin
>appear as either a source or a transform filter to ActiveMovie?

I suspect you may not be recalling that one COM class (e.g, "Csound") can
implement any number of different COM interfaces
(e.g., ActiveMovie plugin interfaces).

What is needed is for Csound to either implement, or better contain and
expose, several different interfaces. It would provide something like:

Csound.WaveInput
Csound.WaveOutput
Csound.WaveTransform

Csound.MidiInput
Csound.MidiOutput
Csound.MidiTransform

I'm just learning about this stuff myself, but I THINK (correct me if I'm
wrong) that once you have this much, you can use the Filter Graph Manager to
hook files, device ports, or whatever to these pins.

>I understand that Csound as an ActiveX control is effectively a full-blown
>application OLE-style (embed in a framework GUI, code, load, run), whereas
>Csound running as a DirectShow/ActiveMovie plugin is an instance of a
(possibly
>infinitely) running Csound orchestra. In ActiveMovie, the only way the user
can
>control a plugin is through the property page. It is certainly possible to
have
>plugins without property pages - this applies to utility plugins such as
tee
>splitters, file parsers, and so on, but I don't see how this could apply to
>Csound as a whole. Unless you do mean that each opcode could be coded as a
>self-sufficient plugin, Csound itself will have to become an ActiveMovie
plugin,
>somehow.


It can either itself implement several different kinds of ActiveMovie
plugin, or it can be a factory for them.

>My suspicion is that {Csound = ActiveX control}, and {Csound = ActiveMovie
>plugin} are separate entities, even if they do share a great deal of common
>code.

Just off the top of my head (C++ style, all returning HRESULT):

Csound.Opcode(long index, VARIANT *pOpcode)
Csound.FunctionTable(long index, VARIANT *pWavetable)
Csound.SetFlag(BSTR Flag, BSTR Value)
Csound.GetFlag(BSTR Flag, BSTR *pValue)
Csound.GetSamplingRateHz(long *pValue)
Csound.SetSamplingRateHz(long Value)
Csound.GetKontrolRatio(long *pValue)
Csound.SetKontrolRatio(long Value)
Csound.GetChannelCount(long *pValue)
Csound.SetChannelCount(long Value)
// As an alternative to the above suggestion....
// Some sort of access to get and set filters... Obviously this is wrong,
but you get the idea.
Csound.EnumerateFilters(long Index, VARIANT *pFilter)
Csound.Play()
Csound.Stop()
Csound.Pause()
Csound.Rewind()
Csound.SetCue(double Time)
Csound.GetCue(double *pTime)
Csound.GetFilterGraphManager(VARIANT *manager)
// Some utility functions for encapsulating setup of filters for writing
soundfiles, reading soundfiles, etc. by name)

Opcode.Initialize(ICsound *csound, VARIANT *pfields)
Opcode.OnAudioSample()
Opcode.OnKontrolSample()
Opcode.Finalize()

FunctionTable.Initialize(BSTR fStatement)
FunctionTable.GetTable(double **data)

CsoundX an ActiveX GUI that knows how to make and control a Csound object.






Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa19674;
          3 Jul 98 1:23 BST
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa27789;
          3 Jul 98 1:23 BST
Received: (qmail 14920 invoked from network); 3 Jul 1998 00:23:03 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by mercury.bath.ac.uk with SMTP; 3 Jul 1998 00:23:03 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (BAA13773); Fri, 3 Jul 1998 01:19:51 +0100 (BST)
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Fri, 3 Jul 98 01:19:32 +0100
Received: from howl.werewolf.net [206.103.224.20] by hermes via ESMTP (BAA04610); Fri, 3 Jul 1998 01:19:24 +0100 (BST)
Received: from hans7.cray.com (dial35.werewolf.net [206.103.225.45])
	by howl.werewolf.net (8.9.0/8.9.0) with SMTP id TAA16508
	for ; Thu, 2 Jul 1998 19:18:44 -0500 (CDT)
From: Hans Mikelson 
To: csound 
Subject: Mpeg4 was Re: compiler
Date: Thu, 2 Jul 1998 19:21:05 -0500
Message-Id: <01bda618$779c4d80$2de167ce@hans7.cray.com>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-Msmail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.71.1712.3
X-Mimeole: Produced By Microsoft MimeOLE V4.71.1712.3
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk



>First, let me repeat: I am desperately searching or trying to make,
>whichever works, a general-purpose software synthesizer that has the
>academic computer goodies that Csound has, inside the standard
>Microsoft-world COM interfaces so it works with COM clients, as a DSP
>plugin, for writing tracks inside of hard disk recorders/editors, and so
on.

I don't know if this helps at all:


http://sound.media.mit.edu/mpeg4/

Hans Mikelson




Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa20311;
          3 Jul 98 8:28 BST
Received: from pat.bath.ac.uk by stork.maths.Bath.AC.UK id aa13317;
          3 Jul 98 8:28 BST
Received: (qmail 24879 invoked from network); 3 Jul 1998 07:28:09 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by pat.bath.ac.uk with SMTP; 3 Jul 1998 07:28:09 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (IAA11999); Fri, 3 Jul 1998 08:24:40 +0100 (BST)
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Fri, 3 Jul 98 08:24:15 +0100
Received: from f54.hotmail.com [207.82.250.65] by hermes via SMTP (IAA06127); Fri, 3 Jul 1998 08:24:04 +0100 (BST)
Received: (qmail 29465 invoked by uid 0); 3 Jul 1998 07:23:32 -0000
Message-Id: <19980703072332.29464.qmail@hotmail.com>
Received: from 207.172.114.176 by www.hotmail.com with HTTP;
	Fri, 03 Jul 1998 00:23:32 PDT
X-Originating-Ip: [207.172.114.176]
From: Paul Winkler 
To: csound@maths.ex.ac.uk
Subject: Re: Pentium/Linux csound speed boost
Content-Type: text/plain
Date: Fri, 03 Jul 1998 00:23:32 PDT
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Simon K. wrote:
>Hey... You don't have like a binary of that? (pgcc compiled csound)
>I'm a bit hesitant to install pgcc right now (although there's a nice
>debian package of egcs),  heard there's troubles compiling kernels
>with it etc...

Well, the binary I have is dynamically linked against glibc. If you want 
static/libc5.x, I can try to make one... if dynamic/glibc is fine with 
you, I can just zip it with the compression of your choice (.Z, .zip, 
.gz, .bz2) and pop it in the mail (it's *small*, well under 100K 
uncompressed!).

>(BTW... re the recent pipe discussion... Thought you might be
>interested in an article (although you solved your problem)
>in the latest CScene, http://cscene.oftheinter.net/ ... called=20
>Pipes in Unix)

Thanks! That's a good resource there.

regards,

PW


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com



Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa20451;
          3 Jul 98 9:57 BST
Received: from pat.bath.ac.uk by stork.maths.Bath.AC.UK id aa16865;
          3 Jul 98 9:57 BST
Received: (qmail 29722 invoked from network); 3 Jul 1998 08:57:40 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by pat.bath.ac.uk with SMTP; 3 Jul 1998 08:57:40 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (JAA15183); Fri, 3 Jul 1998 09:50:12 +0100 (BST)
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Fri, 3 Jul 98 09:49:53 +0100
Received: from renoir.mailpac.pt [194.65.21.2] by hermes via SMTP (JAA25903); Fri, 3 Jul 1998 09:49:46 +0100 (BST)
Received: by renoir (5.x/SMI-SVR4)
	id AA13722; Fri, 3 Jul 1998 09:47:46 +0100
Date: 3  Jul 98 09:47 GMT+0100
X400-Received: by /ADMD=mailpac/C=pt/; 
	Relayed; 3  Jul 98 09:47 GMT+0100
X400-Received: by /PRMD=gtw-ms/ADMD=mailpac/C=pt/; 
	Relayed; 3  Jul 98 09:47 GMT+0100
Priority: normal
P1-Message-Id: pt*mailpac*gtw-ms;0899455665/0016042966/1
Original-Encoded-Information-Types: IA5-Text
Mime-Version: 1.0
From: Pedro Batista 
To: csound@maths.ex.ac.uk
Message-Id: <0899455665/0836954943/1*@mailpac.pt>
Subject: Re: AI using Csound was Re: a simple per
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk


>Awesome code!

youre being too kind :) it wasnt my algorithm; I just ported it; its nothing 
like your excellent examples which have been a huge source of learning and 
inspiration

>Always nice to see something new and bizzare ported to
>Csound.

new, I'm not so sure, but bizarre I hope so!
(this is already in the instruments-to-keep-perfectening-ad-eternum shelf)

>It would seem to me that some of the musical applications of neural nets
>would be:
>
>1. Pitch tracking, identification of chords (major vs minor etc.)
>2. Tempo, rhythm identification.
>3. Formant corrected pitch shifting.
>4. Extraction or removal of vocals from a track.
>5. Removal of reverb from an audio track.

one other aplication I've seen mentioned on the net would be physical 
modelling, and modelling of analogue circuits; maybe one day we'll have 
neural moog's?

>These applications could be implemented as Csound opcodes or perhaps a more
>flexible neural network implementation could be developed.  Maybe a
>perceptron or neural network opcode could be implemented with weights
>supplied in table form so different functions could be implemented with a
>single opcode.

thats a very good sugestion, and I might venture into that with a little 
help from you guys; to be really useful, a neural ugen would have to be 
fully flexible in structure, and data independent, so that it could be used 
to learn about anything, allowing to implement all the above applications; 
problem is still the slowness of the back-prop algo; some faster algorithms 
exist, and when coding in C some reduction to integer math could help 
speeding things up;
there should also be a way of saving the connection weights to a file after 
the net had learned, so that the net could then be used with minimum 
calculation in a real-time instrument, thus separating the learning and 
playing parts

>I have not actually worked much with neural networks but understand that
>they are good at pattern recognition when there is a large diverse data set
>available for training them.  Once they are trained they are fairly
>efficient and very robust.

its all about training; if one finds the perfect set of weights, then you 
can have flawless performance

my imediate goal in this line of instr is to port it to sonic domain more 
effectively; I think it would probably be much more effective to train the 
net in terms of amp and freq (I've been studying the pv utilities and ugens, 
but I still aint certain thats the way to go), even maybe two nets, one for 
each, whose response would be controlling an oscilator (or several :)); I 
also want to introduce some recursiveness (maybe with delay lines) to have 
also some learning of the signal behaviour over time;

but I'm still figuring how to best describe a sound signal... do you think 
the pv utilities are the best way to do this? I cant see other way of 
knowing the frequency of a signal...

I'm also considering a different approach, in which very simple nets are 
used to control oscilators, doing some kind of aditive neural synthesis; 
training oscilators could be done once again by providing aditive 
resynthesis data from the csound utilities

so many ways, so little time :)

pedro



Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa20481;
          3 Jul 98 10:19 BST
Received: from pat.bath.ac.uk by stork.maths.Bath.AC.UK id aa17718;
          3 Jul 98 10:19 BST
Received: (qmail 1389 invoked from network); 3 Jul 1998 09:19:11 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by pat.bath.ac.uk with SMTP; 3 Jul 1998 09:19:11 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (KAA19931); Fri, 3 Jul 1998 10:11:48 +0100 (BST)
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Fri, 3 Jul 98 10:11:21 +0100
Received: from root@huitzilo.tezcat.com [204.128.247.17] by hermes via ESMTP (KAA14240); Fri, 3 Jul 1998 10:11:14 +0100 (BST)
Received: from [204.248.80.120] (antiorp.tezcat.com [204.248.80.120])
	by huitzilo.tezcat.com (8.8.5/8.8.5/tezcat-96091001) with SMTP id EAA21437
	for ; Fri, 3 Jul 1998 04:11:12 -0500 (CDT)
Message-Id: <199807030911.EAA21437@huitzilo.tezcat.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Date: Fri, 3 Jul 1998 04:21:59 -0600
To: csound@maths.ex.ac.uk
From: =cw4t7abs 
Subject: Re: AI using Csound was Re: a simple per
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk


>>It would seem to me that some of the musical applications of neural nets
>>would be:
>>
>>1. Pitch tracking, identification of chords (major vs minor etc.)

akompl!shd

>>2. Tempo, rhythm identification.

akompl!shd

>>3. Formant corrected pitch shifting.

akompl!shd

>>4. Extraction or removal of vocals from a track.

akompl!shd

>>5. Removal of reverb from an audio track.

akompl!shd

>>5. the ecztrakt!on ov mean!ng 4rom !nkomplete no!sz

akompl!shd

>>5. Removal of humanz 4rom dze sentr ov de un!versz

!n progresz.


>one other aplication I've seen mentioned on the net would be physical
>modelling, and modelling of analogue circuits; maybe one day we'll have
>neural moog's?

!llog!kl konzept.


It would seem to me that some of the musical applications of neural nets
would be:

dze term!nat!on ov human persept!on ov mu.s!k
+ human thought !n generl = dze beg ov s!lensz






Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa20678;
          3 Jul 98 12:30 BST
Received: from pat.bath.ac.uk by stork.maths.Bath.AC.UK id aa23937;
          3 Jul 98 12:30 BST
Received: (qmail 13178 invoked from network); 3 Jul 1998 11:30:10 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by pat.bath.ac.uk with SMTP; 3 Jul 1998 11:30:10 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (MAA27153); Fri, 3 Jul 1998 12:27:12 +0100 (BST)
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Fri, 3 Jul 98 12:26:50 +0100
Received: from eos.arc.nasa.gov [128.102.118.20] by hermes via ESMTP (MAA13349); Fri, 3 Jul 1998 12:26:42 +0100 (BST)
Received: (from jims@localhost)
          by eos.arc.nasa.gov (8.8.4/8.8.4)
	  id EAA03511; Fri, 3 Jul 1998 04:26:39 -0700
Date: Fri, 3 Jul 1998 04:26:39 -0700
From: Jim Stevenson 
Message-Id: <199807031126.EAA03511@eos.arc.nasa.gov>
To: RWD@cableinet.co.uk, gogins@nyc.pipeline.com
Subject: Re: compiler
Cc: csound@maths.ex.ac.uk
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Oh arg!

Please don't limit such promising development tools to M$,
and please do include commands to do * ALL * the mouse functions.

If you quote me, please put your comments first.
I have already listened to my questions.

Thanks.




Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa20702;
          3 Jul 98 12:49 BST
Received: from pat.bath.ac.uk by stork.maths.Bath.AC.UK id aa24776;
          3 Jul 98 12:49 BST
Received: (qmail 14663 invoked from network); 3 Jul 1998 11:49:29 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by pat.bath.ac.uk with SMTP; 3 Jul 1998 11:49:29 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (MAA18706); Fri, 3 Jul 1998 12:46:30 +0100 (BST)
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Fri, 3 Jul 98 12:45:47 +0100
Received: from jaguars-int.cableinet.net [193.38.113.9] by hermes via SMTP (MAA01450); Fri, 3 Jul 1998 12:45:36 +0100 (BST)
Received: (qmail 23029 invoked from network); 3 Jul 1998 11:45:35 -0000
Received: from unknown (HELO cableinet.co.uk) (194.117.146.127)
  by jaguars with SMTP; 3 Jul 1998 11:45:35 -0000
Message-Id: <359CC304.82251D30@cableinet.co.uk>
Date: Fri, 03 Jul 1998 12:39:48 +0100
From: Richard Dobson 
Organization: Composers Desktop project
X-Mailer: Mozilla 4.04 [en] (Win95; I)
Mime-Version: 1.0
To: Michael Gogins , csound@maths.ex.ac.uk
Subject: Re: compiler
References: <003401bda604$849cf200$128056d1@axe>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Mmm, one begins to see the potential power of such a system, given such a list
of interfaces!   

Prompted by all this, I have done some more browsing through the DirectShow v5
docs, and gleaned the following:

There is a special mechanism for registering ActiveMovie filters (using the
IFilterMapper2 interface), which places a filter in one or more of the defined
filter categories - it IS possible to register as both a source and a transform
filter. It is even possible to create  a new category - there is a method on
that interface to do just that; I need to find more information. 

The Filter Graph Builder interface IGraphBuilder is NOT implemented as a dual
interface (though most other DirectShow interfaces are), so one cannot
manipulate it directly using automation. I presume this means you would need to
implement your own proxy interfaces (perhaps by setting up Csound as a PlugIn
Distributor?) if you need that facility.

While you are looking at Csound primarily as a COM server, accessed through
automation, I am especially interested in the possibilities of it as a
main-category ActiveMovie plugin, which means that it must be registered as
such, so that applications such as Sound Forge can find it, without needing to
know about Csound. So, just as CsoundX can implement and/or use DirectShow
interfaces, the obverse may also need to be true, one way or another.

One technical issue I think needs looking at: ActiveMovie expects more
flexibility regarding sample rate than Csound currently offers. In Extended
Csound, they get round this problem by resampling audio data on the host to the
orchestra srate (which is currently 32KHz 'for historical reasons'). It is done
very well, but it is a pity it has to be done at all. Ideally, when Csound is
acting as a transform filter, it should accept and use the srate of the input
stream, and preferably, deal with different channel-counts in a tolerant way as
well. This will become a more pressing issue as multi-channel formats become
more commonplace.

I am very intrigued by your suggestion of Csound as a factory for plugins. Could
you elaborate?

And, realistically, there is still a way to go to get Csound
re-entrant...faster...


Richard Dobson

Michael Gogins wrote:
[snip]
> 
> 
> What is needed is for Csound to either implement, or better contain and
> expose, several different interfaces. It would provide something like:
> 
> Csound.WaveInput
> Csound.WaveOutput
> Csound.WaveTransform
> 
> Csound.MidiInput
> Csound.MidiOutput
> Csound.MidiTransform
> 
> Just off the top of my head (C++ style, all returning HRESULT):
> 
> Csound.Opcode(long index, VARIANT *pOpcode)
> Csound.FunctionTable(long index, VARIANT *pWavetable)
> Csound.SetFlag(BSTR Flag, BSTR Value)
> Csound.GetFlag(BSTR Flag, BSTR *pValue)
> Csound.GetSamplingRateHz(long *pValue)
> Csound.SetSamplingRateHz(long Value)
> Csound.GetKontrolRatio(long *pValue)
> Csound.SetKontrolRatio(long Value)
> Csound.GetChannelCount(long *pValue)
> Csound.SetChannelCount(long Value)
> // As an alternative to the above suggestion....
> // Some sort of access to get and set filters... Obviously this is wrong,
> but you get the idea.
> Csound.EnumerateFilters(long Index, VARIANT *pFilter)
> Csound.Play()
> Csound.Stop()
> Csound.Pause()
> Csound.Rewind()
> Csound.SetCue(double Time)
> Csound.GetCue(double *pTime)
> Csound.GetFilterGraphManager(VARIANT *manager)
> // Some utility functions for encapsulating setup of filters for writing
> soundfiles, reading soundfiles, etc. by name)
> 
> Opcode.Initialize(ICsound *csound, VARIANT *pfields)
> Opcode.OnAudioSample()
> Opcode.OnKontrolSample()
> Opcode.Finalize()
> 
> FunctionTable.Initialize(BSTR fStatement)
> FunctionTable.GetTable(double **data)
> 
> CsoundX an ActiveX GUI that knows how to make and control a Csound object.