From: dvlfrnd
Subject: writing a maxmsp-ish programming environment in lisp
Date: 
Message-ID: <1135103585.827867.259840@z14g2000cwz.googlegroups.com>
hi there, im very new to lisp and programming languages,
i chose lisp,coz i made a research and found it compatible with my
thinking style(?),seems natural to me (or just becuz i dont know
anythng about other languages)
im willing to spend serious time on improving my lisp skills because i
want to:
create a system for my personal use, where i can manipulate audio and
video together,
using custom tools and adding more as the need arises.
my first goal would be to write a visual programming environment,where
i can easily create functions in little boxes and connect
attributes/arguments etc.. together
an example would be maxmsp/jitter.
then using this environment,i wanna try to write a convenient program
for my specific needs, adding extras as the program needs to grow
larger.
i tried maxmsp for a while, which truely is amazing, but i'd rather
have my own tools.
i know this might take time and energy,to reinvent the wheel, but im
fed up with getting stuck in programs and saying "wish they had this
feature", or "wish i could get rid of these features that cripple my
tiny computer".
i created 2 little midi sequencing programs in maxmsp for my own
purposes which worked well (for my needs), and these babies pushed me
towards creating more, and more custom things.
i want from the final product too manipulate midi and video commands
that react to midi data in an "artificially intelligent" way.
this includes midi recording,editing, and sending midi in and
outs.video processing,and gui.
im already reading books on lisp, but i appreciate any
shortcuts(resources,code examples) to make this period faster.
so first step is to make something like maxmsp, where i can write down
functions,save them then bind them into little boxes,that are created
on my command, and connect these boxes together to write the code i
need instead of typing.
an example would be :
a bang command (maxmsp), which evaluates the function it's connected to
when it's clicked.

bang(eval command)---> function (+ x y) ---> result (printed output)

where this function receives its arguments from another function that
generated these and so forth..

i wanna connect all these functions with a mouse (just like maxmsp, you
can download the 30 day full functioning demo @ www.cycling74.com ,
would give an idea of what it looks like)

i also wanna add and or nor etc... gates with weights (instead of 0 and
1), to creaate logical structures, which trigger at given thresholds
and are interconnected (just like neural networks)
i wrote a very simple and basic lisp code that simulated this. there
are some animals, and they have attributes. like being wild, domestic,
land, four legs etc......
each attribute is a function that have numerical weights, and connect
to animalls who possess those attributes. so each time i type (wild),
say +25 points are given to the wolf entry and -25 to any domestic
animal.
then there is a comparator which after each step takes a look at these
animals and their total points.
whenever the animal exceeds a certain threshold, that animal is
printed.
this might be studip, or something experienced lispers might consider
useless,but im still learning and i figured out that i dont like if
then else stuff given at a top level. (like if wild then wolf,lion...
else cow cat dog...) , i think the previous one gives more flexibility.
anyways,long story short i need to write a gui, that helps me connect
the functions i wrote visually,
and create the code out of that system of connections, once i get that
done, i can focus on networks and more spesific midi/video needs.

any help will be appreciated, and please do tell me if im in the wrong
direction or wasting my time (im still very unexperienced, i might be
dreaming..)

thank you
dvlfrnd

From: Emre Sevinc
Subject: Re: writing a maxmsp-ish programming environment in lisp
Date: 
Message-ID: <87y82fowjb.fsf@ileriseviye.org>
>>>>> "dvlfrnd" == dvlfrnd  <·······@yahoo.com> writes:

    dvlfrnd> hi there, im very new to lisp and programming languages,
    dvlfrnd> i chose lisp,coz i made a research and found it
    dvlfrnd> compatible with my thinking style(?),seems natural to me
    dvlfrnd> (or just becuz i dont know anythng about other languages)
    dvlfrnd> im willing to spend serious time on improving my lisp
    dvlfrnd> skills because i want to: create a system for my personal
    dvlfrnd> use, where i can manipulate audio and video together,
    dvlfrnd> using custom tools and adding more as the need arises.
    dvlfrnd> my first goal would be to write a visual programming

If you're into music, programming and algorithmic composition
Common Music is definitely worth a look:

 http://commonmusic.sourceforge.net/doc/cm.html

Or maybe you'd like to have mind-bending box full of
music apps:

 http://ccrma.stanford.edu/planetccrma/software/

Which includes these:

 http://ccrma.stanford.edu/software/

Or maybe you're more into that kind of stuff:

 http://www.pawfal.org/Software/SSM/

 http://www.pawfal.org/Software/fluxus/

 http://www.pawfal.org/Software/wigwamjam/

In addition to these, right now I'm reading and practicing
a book:

 Notes from the Metalevel - Introduction to 
 Algorithmic Music Composition by Heinrich K. Taube

Hope above URLs will be interesting, exciting and useful.
Let us know.

Happy hacking,

-- 
Emre Sevinc

eMBA Software Developer         Actively engaged in:
http:www.bilgi.edu.tr           http://ileriseviye.org
http://www.bilgi.edu.tr         http://fazlamesai.net
Cognitive Science Student       http://cazci.com
http://www.cogsci.boun.edu.tr
From: dvlfrnd
Subject: Re: writing a maxmsp-ish programming environment in lisp
Date: 
Message-ID: <1135713104.612093.146980@o13g2000cwo.googlegroups.com>
those are really attractive links,
i found this,
http://audacity.sourceforge.net/help/nyquist
so how do you synthesize a sine wave??? using common lisp?
how do you manipulate paramters of frequency,amplitudes etc...
say i want to write a very basic function in commonlisp, making a 440hz
sinewave,how do i get my computer make this sound?
thanks
From: Frank Buss
Subject: Re: writing a maxmsp-ish programming environment in lisp
Date: 
Message-ID: <tt9z81vrhg9y.1m8rs3hrk7drr$.dlg@40tude.net>
dvlfrnd wrote:

> those are really attractive links,
> i found this,
> http://audacity.sourceforge.net/help/nyquist
> so how do you synthesize a sine wave??? using common lisp?
> how do you manipulate paramters of frequency,amplitudes etc...
> say i want to write a very basic function in commonlisp, making a 440hz
> sinewave,how do i get my computer make this sound?

there is no way in Common Lisp to output a sound, but synthesizing a sine
wave and writing a WAV-file is possible, see e.g.
http://groups.google.de/group/comp.lang.lisp/browse_frm/thread/86817d8951bba4c8

Then the only line which needs to be ported to your Lisp version and
operating system is 
(sys:call-system "sndrec32.exe /play c:/tmp/test.wav")

-- 
Frank Bu�, ··@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de
From: David R. Sky
Subject: Re: writing a maxmsp-ish programming environment in lisp
Date: 
Message-ID: <Pine.LNX.4.61.0512280056020.5431@viper.wapvi.bc.ca>
you wrote: those are really attractive links,
i found this,
http://audacity.sourceforge.net/help/nyquist
so how do you synthesize a sine wave??? using common lisp?
how do you manipulate paramters of frequency,amplitudes etc...
say i want to write a very basic function in commonlisp, making a
440hz sinewave,how do i get my computer make this sound?

David: I didn't see your original post; Frank answered your question re 
Common LISP.

Using Nyquist on its own is somewhat different than using Nyquist
inside the sound editor Audacity. In the stand-alone version of
Nyquist (available freely from
http://www.cs.cmu.edu/~music/music.software.html ),

(play (osc 69))
or
(play (osc (hz-to-step 440)))

which plays a 1-second duration 440Hz sinewave tone through your
sound card (69 is the MIDI equivalent of 440Hz, middle C is 60).
You can increase or decrease duration and add a simple scaling
factor:

(play (scale 0.5 (osc 69 5)))

which would play a 440Hz sinewave tone for 5 seconds scaled to 1/2
full amplitude.

As for Audacity (freely available from
http://audacity.sourceforge.net ), there are several Nyquist
generator and sound effedct plug-ins available at
http://audacity.sourceforge.net/download/nyquistplugins

David
From: dvlfrnd
Subject: Re: writing a maxmsp-ish programming environment in lisp
Date: 
Message-ID: <1135713200.308986.152560@o13g2000cwo.googlegroups.com>
http://audacity.sourceforge.net/help/nyquist