From taube at uiuc.edu Thu Jan 2 08:58:28 2003 From: taube at uiuc.edu (Rick Taube) Date: Thu, 2 Jan 2003 10:58:28 -0600 Subject: [CM] new chapters available Message-ID: Ive got another batch of chapters ready and I would be grateful for any feedback -- typos, suggestions, errata etc. I'm releasing three of the new chapters today, they are: 09. Parameterized Sound Description http://www-camil.music.uiuc.edu/faculty/taube/nm/09/sound.html 14. Microtonality, Tuning and Modes http://www-camil.music.uiuc.edu/faculty/taube/nm/14/scales.html 15. Scaling and Offsetting http://www-camil.music.uiuc.edu/faculty/taube/nm/15/mapping.html I have another three almost ready and will release them on sat. or sunday at the latest. If you use the Up navagation on the pages you will get to the contents pages. Ive disable all links to part 1 until I have a moment to regenerate them in the new doc formats. Please note also that I have not had time to test the examples yet, i will do this weekend. I will also be adding MIDI files to the pages so readers can listen to examples without having to generate them. the tunings chapter forced me to fix a few bugs -- you will need the new cm-2.4.0 tarball if you want to try the examples. but as i said, i havent had time yet to test them and make sure they work. i hope you like the new color coded examples, courtesy of tobas kunze's emacs settings. all of the plots were generaed in plotter, a couple of them are really pretty if i say so myself! -rick From bil at ccrma.Stanford.EDU Fri Jan 3 03:13:25 2003 From: bil at ccrma.Stanford.EDU (Bill Schottstaedt) Date: Fri, 3 Jan 2003 03:13:25 -0800 Subject: [CM] DC Blocking? In-Reply-To: References: Message-ID: <200301031113.DAA27295@cmn14.stanford.edu> > Does CLM have a DC-block generator built in? Not as one of the basic generators, but it's easy to do with a simple filter -- see prc95.scm. From bil at ccrma.Stanford.EDU Fri Jan 3 03:16:29 2003 From: bil at ccrma.Stanford.EDU (Bill Schottstaedt) Date: Fri, 3 Jan 2003 03:16:29 -0800 Subject: [CM] Fixed(?) :CMN key signature, bar lines, and accidentals In-Reply-To: <3E0E213C.A55A7BDC@westnet.com> References: <3E012E7A.DD964DFC@westnet.com> <200212201109.DAA15792@cmn14.stanford.edu> <3E03C733.B57C4F92@westnet.com> <3E0D30AD.E188531@westnet.com> <3E0E213C.A55A7BDC@westnet.com> Message-ID: <200301031116.DAA27314@cmn14.stanford.edu> > I think I got this thing working - here's a modified CMN function that > seems to work for me, Thanks very much! I'll merge that bugfix into my version. From bil at ccrma.Stanford.EDU Fri Jan 3 03:17:18 2003 From: bil at ccrma.Stanford.EDU (Bill Schottstaedt) Date: Fri, 3 Jan 2003 03:17:18 -0800 Subject: [CM] Minor nitpick - tab chars in CMN source In-Reply-To: <3E0611CF.CF84D6A6@westnet.com> References: <3E0611CF.CF84D6A6@westnet.com> Message-ID: <200301031117.DAA27317@cmn14.stanford.edu> > The CMN source code seems to have hard tabs in it, which makes the > indentation all strange. I don't know what this means -- I use only emacs, and type tab all the time. The various emacs modes differ in how they respond to a tab -- are you reading the code in Lisp mode? From bil at ccrma.Stanford.EDU Fri Jan 3 03:53:37 2003 From: bil at ccrma.Stanford.EDU (Bill Schottstaedt) Date: Fri, 3 Jan 2003 03:53:37 -0800 Subject: [CM] new snd user: questions Message-ID: <200301031153.DAA27346@cmn14.stanford.edu> > Apart from the issue with long files, snd is perfectly usable (better > than that). Support for files longer than 2^31 bytes was added in version 5.10. If possible, get the current version (6.4 or 6.5). > - Apart from the gui-based keyboard commands (e.g. Alt-O), the keys > don't work. > Gtk+ 1.2.10, Glib 1.2.10 This is probably the source of most of the problems -- I think the current version works much better in Gtk (but you need Gtk version 2). You may also have to click in the Snd window to activate it -- this is partly dependent on the window manager. > - there was no ~/.snd file and I couldn't find a default config anywhere > (e.g. /etc/snd, etc/defaults/snd, ...). See grfsnd.html or Dave Phillips' tutorial. > - Long files (e.g. more than a few minutes) don't seem to be fully > loaded - only about the first quarter. I'd like to edit audio files up > to around 20mins (maybe longer - presumably there's a limit?) Only a small window onto the file is ever loaded into memory; 20 min sounds are no problem in any version of Snd; if you want to edit sounds that are several hours long, get a more recent version. From lt at westnet.com Fri Jan 3 17:41:18 2003 From: lt at westnet.com (Larry Troxler) Date: Fri, 03 Jan 2003 20:41:18 -0500 Subject: [CM] Fixed(?) :CMN key signature, bar lines, and accidentals References: <3E012E7A.DD964DFC@westnet.com> <200212201109.DAA15792@cmn14.stanford.edu> <3E03C733.B57C4F92@westnet.com> <3E0D30AD.E188531@westnet.com> <3E0E213C.A55A7BDC@westnet.com> <200301031116.DAA27314@cmn14.stanford.edu> Message-ID: <3E163BBE.48818F41@westnet.com> Bill Schottstaedt wrote: > > > I think I got this thing working - here's a modified CMN function that > > seems to work for me, > > Thanks very much! I'll merge that bugfix into my version. Your welcome, except that I'm not sure the correct solution is really this simple. Or maybe it is, but I'm not sure because I'm not sure what the semantics of all the accidental-related options are. They're listed in cmn.html but only briefly described. For example, I can see that if the behavior I want is the only choice (although it seems to be what most people would want if they are using CM to feed CMN), then that would prevent somebody from using CMN by specifiying notes to be exactly how they are to be notated. IOW, I can see the point of having a note be notated strictly based on whether an accidental or natural sign is specified - this would allow someone to have complete control over the choice of when an accidental is actually notated. Hope I've explained this clear enough (tired right now) Larry Troxler From lt at westnet.com Fri Jan 3 17:46:57 2003 From: lt at westnet.com (Larry Troxler) Date: Fri, 03 Jan 2003 20:46:57 -0500 Subject: [CM] Minor nitpick - tab chars in CMN source References: <3E0611CF.CF84D6A6@westnet.com> <200301031117.DAA27317@cmn14.stanford.edu> Message-ID: <3E163D11.F09318C2@westnet.com> Bill Schottstaedt wrote: > > > The CMN source code seems to have hard tabs in it, which makes the > > indentation all strange. > > I don't know what this means -- I use only emacs, and type tab all the > time. The various emacs modes differ in how they respond to a tab -- > are you reading the code in Lisp mode? What I meant was that the files in the CMN distribution use ASCII tab characters ( 0x09 ). This is what I meant by hard tabs. So, this issue is independent of any editor - I'm talking about the actual bytes in the source files. Personally, I think this ancient thing should just go away, because it means that whenever you load such a file, you have to know what the expected tab spacing is for that file. However, I recognize that this is not a universal opinion, so I asked if this was intentional or not. Larry Troxler From bil at ccrma.Stanford.EDU Sat Jan 4 03:01:51 2003 From: bil at ccrma.Stanford.EDU (Bill Schottstaedt) Date: Sat, 4 Jan 2003 03:01:51 -0800 Subject: [CM] loop-samples Message-ID: <200301041101.DAA28062@cmn14.stanford.edu> I'd like to remove loop-samples from Snd -- it has been superseded by the run macro and the ladspa connection -- would this be a big problem for anyone? From cewing at u.washington.edu Sat Jan 4 17:01:32 2003 From: cewing at u.washington.edu (cristopher pierson ewing) Date: Sat, 4 Jan 2003 17:01:32 -0800 (PST) Subject: [CM] Phase Quadtrature Message-ID: I need to implement phase quadrature for a few applications in CLM and wonder if anyone has already done so. I'd love not to have to datart from scratch. What I'm looking for is something similar to CSound's Hilbert opcode, which shifts all frequencies in a source sound by 90 degrees. Anyone got such a beast that they'd be willing to share? C ******************************** Cris Ewing CARTAH Assistant University of Washington Home Phone: (206) 365-3413 E-mail: cewing at u.washington.edu ******************************* From lt at westnet.com Sat Jan 4 20:40:43 2003 From: lt at westnet.com (Larry Troxler) Date: Sat, 04 Jan 2003 23:40:43 -0500 Subject: [CM] Can Stella be grafted onto CM 2.4.x? Message-ID: <3E17B74B.57565FD0@westnet.com> I guess this is directed mostly to Rick, since he obviously would be the most knowledgeable about this. How difficult would it be to adapt Stella (from the old CM sources) to work with the current CM 2.4? The reason I ask is because, without Stella, I am getting quite tired of all the typing involved to edit CM threads. In the process, I find that I am filling up my startup file with a bunch of shortcut functions, and it makes me wonder if it wouldn't be easier to port the Stella code to the current CM, rather than doing what amounts to re-inventing the wheel. Of course to some degree this is a lazy question, since I can dig into the relevant sources myself and figure it out. But I thought that Rick (or someone else who has tried it) might have a quick answer to save me some time. Larry Troxler From tdumont2 at wanadoo.fr Sun Jan 5 08:59:07 2003 From: tdumont2 at wanadoo.fr (Thierry Dumont) Date: Sun, 05 Jan 2003 17:59:07 +0100 Subject: [CM] cannot record wav at 44100. Message-ID: <3E18645B.8020406@wanadoo.fr> Hello, I am new to snd; I hope these questions are not too stupid. I want to digitalize my connection of vinyls disks, and to make audio cd's. To do this, I think I must make "raw" or "wav" files, 16 bits, at 44100, something like that: "RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 44100 Hz" But, I can only record at 22050Hz...and the cds I make are not correct: Elisabeth Scwrtzkopf sings too fast :-) If I try to record at 44100, snd crashes (segfault). I am using a linux machine, debian woody, with the "snd" package of the distribution (snd 5.8-1). My sound card is a sound blaster SB Live! ( lspci says: 00:0b.0 Multimedia audio controller: Creative Labs SB Live! EMU10k1 (rev 07) 00:0b.1 Input device controller: Creative Labs SB Live! (rev 07) ) Thank you in advance... -- Thierry Dumont. Villeurbanne - France. http://maply.univ-lyon1.fr/~tdumont From alistbox at bellsouth.net Sun Jan 5 11:08:35 2003 From: alistbox at bellsouth.net (Mark Miller) Date: Sun, 5 Jan 2003 13:08:35 -0600 Subject: [CM] cannot record wav at 44100. In-Reply-To: <3E18645B.8020406@wanadoo.fr> References: <3E18645B.8020406@wanadoo.fr> Message-ID: <200301051308.35923.alistbox@bellsouth.net> On Sunday 05 January 2003 10:59 am, Thierry Dumont wrote: > But, I can only record at 22050Hz...and the cds I make are not correct: > Elisabeth Scwrtzkopf sings too fast :-) > > If I try to record at 44100, snd crashes (segfault). Hi. I have the very same experience on my machine (although I have not tried to record Elisabeth Scwrtzkopf ;-) > I am using a linux machine, debian woody, with the "snd" package of the > distribution (snd 5.8-1). I am using Slackware Linux 8.1, and snd compiled from source: $ snd --version This is Snd version 6.5 of 19-Dec-02: > My sound card is a sound blaster SB Live! > ( > lspci says: > 00:0b.0 Multimedia audio controller: Creative Labs SB Live! EMU10k1 (rev > 07) 00:0b.1 Input device controller: Creative Labs SB Live! (rev 07) > ) Mine is a sound blaster PCI512: # lspci 00:11.0 Multimedia audio controller: Creative Labs SB Live! EMU10k1 (rev 08) 00:11.1 Input device controller: Creative Labs SB Live! MIDI/Game Port (rev 08) I did look into starting snd with a variable set to the right bitrate, but as I read through the docs my head got swimmy before I found the answer :-) -- EOM From cewing at u.washington.edu Sun Jan 5 11:53:41 2003 From: cewing at u.washington.edu (cristopher pierson ewing) Date: Sun, 5 Jan 2003 11:53:41 -0800 (PST) Subject: [CM] Mea Culpa, re: phase quadrature. Message-ID: Oooops. Just found the spot in the CLM manual that covers this. Sorry for wasting time and brain resources. C ******************************** Cris Ewing CARTAH Assistant University of Washington Home Phone: (206) 365-3413 E-mail: cewing at u.washington.edu ******************************* From dlphilp at bright.net Sun Jan 5 11:59:20 2003 From: dlphilp at bright.net (Dave Phillips) Date: Sun, 05 Jan 2003 14:59:20 -0500 Subject: [CM] cannot record wav at 44100. References: <3E18645B.8020406@wanadoo.fr> <200301051308.35923.alistbox@bellsouth.net> Message-ID: <3E188E98.E9AF1781@bright.net> Mark Miller wrote: > On Sunday 05 January 2003 10:59 am, Thierry Dumont wrote: > > > But, I can only record at 22050Hz...and the cds I make are not correct: > > Elisabeth Scwrtzkopf sings too fast :-) > > > > If I try to record at 44100, snd crashes (segfault). > > Hi. I have the very same experience on my machine (although I have not tried > to record Elisabeth Scwrtzkopf ;-) IIRC, there are significant problems with the SBLive and Snd. I haven't even tried recording anything in Snd for quite a while because of its problem with this card (I have an SBLive Value). Perhaps Fernando can give us an update on the SBLive/Snd celebrity death match ? ;) Best regards, == Dave Phillips The Book Of Linux Music & Sound at http://www.nostarch.com/lms.htm The Linux Soundapps Site at http://linux-sound.org From set at pobox.com Sun Jan 5 23:10:29 2003 From: set at pobox.com (Paul) Date: Mon, 6 Jan 2003 02:10:29 -0500 Subject: [CM] Re: cannot record wav at 44100. In-Reply-To: <3E18645B.8020406@wanadoo.fr> References: <3E18645B.8020406@wanadoo.fr> Message-ID: <20030106071029.GB16611@squish.home.loc> Thierry Dumont , on Sun Jan 05, 2003 [05:59:07 PM] said: > Hello, > > I am new to snd; I hope these questions are not too stupid. > > I want to digitalize my connection of vinyls disks, and > to make audio cd's. > > To do this, I think I must make "raw" or "wav" files, 16 bits, > at 44100, something like that: > > "RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo > 44100 Hz" > > But, I can only record at 22050Hz...and the cds I make are not correct: > Elisabeth Scwrtzkopf sings too fast :-) > > If I try to record at 44100, snd crashes (segfault). > Hi; I dont know about your snd problems. But if you are moving vinal to cd, you may want to look into gramofile: http://panic.et.tudelft.nl/~costar/gramofile/ Also, for noise removal, you can look at gwc: (its somewhat flakey, but when it works, it works good) http://gwc.sourceforge.net/ Personally, I dont think recording is what snd does best, lots of people like ecasound: (the vu meters in snd give me warm fuzzies though:) http://eca.cx/ Finally, if you cannot get anything to record at 44.1k, you could try resampling:) Sox, can do it if you know the right magic. How well does/can snd resample? Paul set at pobox.com From bil at ccrma.Stanford.EDU Tue Jan 7 02:51:36 2003 From: bil at ccrma.Stanford.EDU (Bill Schottstaedt) Date: Tue, 7 Jan 2003 02:51:36 -0800 Subject: [CM] hilbert transformer and other FIR filter stuff Message-ID: <200301071051.CAA00835@cmn14.stanford.edu> Speaking of the CLM Hilbert transformer -- the code looks broken to me -- I think a crucial line got lost at some point. Just for lafs I conjured up this Scheme version: (define* (make-hilbert-transform #:optional (len 30)) (let* ((arrlen (1+ (* 2 len))) (arr (make-vct arrlen))) (do ((i (- len) (1+ i))) ((= i len)) (let* ((k (+ i len)) (denom (* pi i)) (num (- 1.0 (cos (* pi i))))) (if (= i 0) (vct-set! arr k 0.0) (vct-set! arr k (/ num denom))))) (make-fir-filter arrlen arr))) (define (hilbert-transform f in) (fir-filter f in)) #! (let ((h (make-hilbert-transform 15))) (map-channel (lambda (y) (* 8.0 (hilbert-transform h y))))) !# I'll replace the CLM version with a translation of this code. As long as I was typing in FIR filter code, I figured I might as well add lowpass, highpass, bandstop, bandpass, and differentiators of any order -- see dsp.scm. From rm at fabula.de Tue Jan 7 06:33:01 2003 From: rm at fabula.de (rm at fabula.de) Date: Tue, 7 Jan 2003 15:33:01 +0100 Subject: [CM] Bug in cm-2.4.0 In-Reply-To: References: <3C1B4C8D.3000609@sci.fi> Message-ID: <20030107143301.GD25134@www> Hello, i just downloaded the latest version of cm from the ftp server. When i try to load src/cm.scm form guile i get the following error: ERROR: cm-2.4.0/src/midi2.scm:63:52: unexpected ")" It seems like your emacs got confused and inserted two extra ")" in line 63 :-) Ralf Mattes From cewing at u.washington.edu Tue Jan 7 09:18:13 2003 From: cewing at u.washington.edu (cristopher pierson ewing) Date: Tue, 7 Jan 2003 09:18:13 -0800 (PST) Subject: [CM] hilbert transformer and other FIR filter stuff In-Reply-To: <200301071051.CAA00835@cmn14.stanford.edu> Message-ID: Actually, Bill. I' was just about to write you to point that out. I'll try the new code today. I've also created a structure and macro to run it that are derived from Sean Costello's Hilbert opcode in Csound. As soon as I am finished testing it, Ill send it along to you for your perusal. Thanks for all, C ******************************** Cris Ewing CARTAH Assistant University of Washington Home Phone: (206) 365-3413 E-mail: cewing at u.washington.edu ******************************* On Tue, 7 Jan 2003, Bill Schottstaedt wrote: > Speaking of the CLM Hilbert transformer -- the code looks > broken to me -- I think a crucial line got lost at some > point. Just for lafs I conjured up this Scheme version: > > (define* (make-hilbert-transform #:optional (len 30)) > (let* ((arrlen (1+ (* 2 len))) > (arr (make-vct arrlen))) > (do ((i (- len) (1+ i))) > ((= i len)) > (let* ((k (+ i len)) > (denom (* pi i)) > (num (- 1.0 (cos (* pi i))))) > (if (= i 0) > (vct-set! arr k 0.0) > (vct-set! arr k (/ num denom))))) > (make-fir-filter arrlen arr))) > > (define (hilbert-transform f in) > (fir-filter f in)) > > #! > (let ((h (make-hilbert-transform 15))) > (map-channel (lambda (y) > (* 8.0 (hilbert-transform h y))))) > !# > > I'll replace the CLM version with a translation > of this code. As long as I was typing in FIR filter > code, I figured I might as well add lowpass, highpass, > bandstop, bandpass, and differentiators of any order -- > see dsp.scm. > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist > From taube at uiuc.edu Tue Jan 7 10:32:05 2003 From: taube at uiuc.edu (Rick Taube) Date: Tue, 7 Jan 2003 12:32:05 -0600 Subject: [CM] new chapters available Message-ID: Ive got the next chapter ready for anyone interested: 17. Randomness and Chance Composition http://www-camil.music.uiuc.edu/faculty/taube/nm/17/chance.html ill try to add Markov (18) and chaos (16) tomorrow. I still havent had time to get examples tested and debugged in cm-2.4.0, ill try to start this process tonight... Ive also updated the earlier three new chapters with type reports that have been sent. thank you! 09. Parameterized Sound Description http://www-camil.music.uiuc.edu/faculty/taube/nm/09/sound.html 14. Microtonality, Tuning and Modes http://www-camil.music.uiuc.edu/faculty/taube/nm/14/scales.html 15. Scaling and Offsetting http://www-camil.music.uiuc.edu/faculty/taube/nm/15/mapping.html From rm at fabula.de Tue Jan 7 11:16:54 2003 From: rm at fabula.de (rm at fabula.de) Date: Tue, 7 Jan 2003 20:16:54 +0100 Subject: [CM] new chapters available In-Reply-To: References: Message-ID: <20030107191654.GB26279@www> On Tue, Jan 07, 2003 at 12:32:05PM -0600, Rick Taube wrote: > Ive got the next chapter ready for anyone interested: > > 17. Randomness and Chance Composition > http://www-camil.music.uiuc.edu/faculty/taube/nm/17/chance.html Example 2 / Playing continuous and ... cm> (events (play-ran :uniform 100 .1 20 100) "uniform.midi" channel-tuning ct9) should be: cm> (events (play-ran :uniform 100 .1 20 100) "uniform.midi" :channel-tuning ct9) (missing ':'). > Ive also updated the earlier three new chapters with type reports that have been sent. thank you! > Thank you! Ralf Mattes From rm at fabula.de Tue Jan 7 11:53:05 2003 From: rm at fabula.de (rm at fabula.de) Date: Tue, 7 Jan 2003 20:53:05 +0100 Subject: [CM] new chapters available In-Reply-To: <20030107191654.GB26279@www> References: <20030107191654.GB26279@www> Message-ID: <20030107195305.GC26279@www> On Tue, Jan 07, 2003 at 08:16:54PM +0100, rm at fabula.de wrote: > cm> (events (play-ran :uniform 100 .1 20 100) "uniform.midi" > :channel-tuning ct9) > > (missing ':'). Same for later examples ... Example 7: Playing exponential distributions 'nil' doesn't work for the guile version. The example does work when #f is used. Example 8: A Gaussian distribution. Something looks very strange in the function calls to play-gauss: the file name seems to be missing and the function gets called with 5 params even so play-gauss was defined with arity 4. Example 11: Sampling without replacement. The variable 'rate' doesn't seem to be bound within 'sampling'. Example 15: The tapping process. Doesn't work in guile. I think the problem is burried in '(vary .1 v)' Calling it directly doesn't seem to work either -- hmm, looking at the code it seems like there should be parens arround :above and :below in the case statement ... Example 22: Calling masker. tri-env isn't defined .... Examples 23/24: 24 fails since it seems to expand into an invocation of make-ptable where s => #f and hence (/ s total) fails. Example 29: in the call to arpeggiate-exprhy notes only 9 params are provided while the function has arity 10. Hth Ralf Mattes > > Ive also updated the earlier three new chapters with type reports that have been sent. thank you! > > > > > Thank you! > > Ralf Mattes > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist From taube at uiuc.edu Wed Jan 8 10:22:30 2003 From: taube at uiuc.edu (Rick Taube) Date: Wed, 8 Jan 2003 12:22:30 -0600 Subject: [CM] import, typos, midi example links Message-ID: Ive made a new tar of 2.4.0 with bug fixes and the import-events function added back for midi (ill do csound and clm when i get a chance). to import data without meta events do: (import-events "foo.midi" :meta-exclude true) i tested in guile and cmu and importing works but i havent tried a level 1 file yet... ftp://ftp-ccrma.stanford.edu/pub/Lisp/cm/sources/cm-2.4.0.tar.gz ive also fixed whatever bugs/typos with the Chance chapter AND Ive added MIDI file examples directly on the page. look for my new spiffy midi icon just under each Interaction example. 17. Randomness and Chance Composition http://www-camil.music.uiuc.edu/faculty/taube/nm/17/chance.html by the way does anybody know how to get a browser to play the midi file witout going to a blank page? if so, please tell me! right now my quicktime plugin plays in a new blank page and so i have to hit "back" each time, this is very annoying!.... From rm at fabula.de Wed Jan 8 12:19:47 2003 From: rm at fabula.de (rm at fabula.de) Date: Wed, 8 Jan 2003 21:19:47 +0100 Subject: [CM] import, typos, midi example links In-Reply-To: References: Message-ID: <20030108201947.GD30090@www> On Wed, Jan 08, 2003 at 12:22:30PM -0600, Rick Taube wrote: > Ive made a new tar of 2.4.0 with bug fixes and the import-events function added back for midi (ill do csound and clm when i get a chance). to import data without meta events do: > > (import-events "foo.midi" :meta-exclude true) > > i tested in guile and cmu and importing works but i havent tried a level 1 file yet... > > ftp://ftp-ccrma.stanford.edu/pub/Lisp/cm/sources/cm-2.4.0.tar.gz > Oh, sorry, i forgot to report one little bug/feature that has been bugging me for quite some time now: the intial load of cm for guile (the one that's supposed to create the final script) odesn't work when guile is given a relative path: | | bash-2.05b$ guile -l src/cm.scm | ... | | ; Loading: ssrc/scales.scm | ; Loading: ssrc/patterns.scm | ; Help! Can't copy "ssrc/cminit.lisp" -> "sbin/cminit.lisp".Backtrace: | In unknown file: | ?: 0* [primitive-load "src/cm.scm"] | | The porblem is in file src/cm.scm, line 17: (set! cm-directory (substring curfile 0 (1+ parent-slash))) which ends up in a call to (set! cm-directory (substring curfile 0 1)) for relative filenames .... I've modified the code to use guile's 'dirname' and a more schemish way of proccessing the files, the relevant bit is here (i modified quite a bit more, so this is only a "backported" sample): ;; ..... (let ((srcdir (dirname (port-filename (current-load-port))))) ;; fix relative path (if (not (char=? (string-ref srcdir 0) #\/)) (set! cm-directory (string-append (getcwd) "/" srcdir)) (set! cm-directory srcdir)) ;; ..... BTW, what's the reason for not making the '*.scm' files into true Guile modules. This would really ease loading. Another (not too serious) problem i encountered (but wasn't yet able to hunt down): reloading of some of the startup files (io.scm i think) makes guile segfault. > [...] > > by the way does anybody know how to get a browser to play the midi file witout going to a blank page? if so, please tell me! right now my quicktime plugin plays in a new blank page and so i have to hit "back" each time, this is very annoying!.... > What browser do you use? It works fine on my box (Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.0.0) Gecko/20020615 Debian/1.0.0-3) Thanks for all that great work Ralf Mattes > > > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist From taube at uiuc.edu Wed Jan 8 15:29:52 2003 From: taube at uiuc.edu (Rick Taube) Date: Wed, 8 Jan 2003 15:29:52 -0800 Subject: [CM] import, typos, midi example links References: <20030108201947.GD30090@www> Message-ID: <000701c2b76d$d9783fd0$a8197e82@music.uiuc.edu> > I've modified the code to use guile's 'dirname' and a more schemish way of proccessing > the files, the relevant bit is here (i modified quite a bit more, so this is only > a "backported" sample): if you send me your version of cm.scm ill replace the current version with yours. > BTW, what's the reason for not making the '*.scm' files into true Guile > modules. This would really ease loading. yes but i dont know anything about the module system yet -- when i did the scheme port the module system seemed like it was getting redesigned so i decided to stay away from it. if you adapted cm.scm to use a module i would be happy to use your version. > Another (not too serious) problem i encountered (but wasn't yet able to hunt down): > reloading of some of the startup files (io.scm i think) makes guile segfault. yes - im almost positive this is a guile/goops bug having to do with redefining(reloading) metaclass definitions. redefining regluar classes are ok it seems except if they use metaclasses (as my io-class does) anyway im sure that the segfault has SOMETHING to do with redefining metaclasses but its not 100%consistent. From taube at uiuc.edu Fri Jan 10 09:38:28 2003 From: taube at uiuc.edu (Rick Taube) Date: Fri, 10 Jan 2003 11:38:28 -0600 Subject: [CM] New chapter: 18. Markov Processes Message-ID: A new chapter for those intererested. As always, comments, typos and errors welcome! 18. Markov Processes http://www-camil.music.uiuc.edu/faculty/taube/nm/18/markov.html does anyone know if there is a way in html to make a browser play examples "inline", ie without switching to a useless blank page? right now im just using to link to the midi or mp3 files... From bil at ccrma.Stanford.EDU Mon Jan 13 02:54:41 2003 From: bil at ccrma.Stanford.EDU (Bill Schottstaedt) Date: Mon, 13 Jan 2003 02:54:41 -0800 Subject: [CM] snd 6.5 Message-ID: <200301131054.CAA08486@cmn14.stanford.edu> Snd 6.5: inf-snd.el and examp.rb improvements from Michael Scholz (including a translation of nb.scm) virtual ops extended to cover more envelopes and channel swap cases xramp-channel underlying exponential envs as virtual ops new last arg to ptree-channel to fallback on a general evaluation as the virtual op -- anything as a virtual op, but not very fast orientation-hook and color-hook. start/stop-waterfall in snd-gl.scm (OpenGL "waterfall" spectrum of incoming audio data). loop-samples and c-channel removed. channel-amp-envs now returns vcts, not vectors. added various simple FIR filters to dsp.scm. added remove-local-hook! (hooks.scm) Paul Kirk figured out how to get CLM to compile/load in ACL 6.2 in Windows. Larry Troxler contributed CMN accidental fixup code. Checked: Guile 1.6.1 gmeteor-0.93 gtkglext-0.6.0 final Ruby 1.6.8 and preview 1.8.0 gtk 2.2 gsl 1.3 autoconf 2.57 With much help from: Dave Phillips, Michael Scholz, Paul Kirk, Larry Troxler, Stefan Schwandter From taube at uiuc.edu Mon Jan 13 09:08:52 2003 From: taube at uiuc.edu (Rick Taube) Date: Mon, 13 Jan 2003 11:08:52 -0600 Subject: [CM] New chapter: 16. Sonification and Listening to Chaos Message-ID: A new Etude chapter for those intererested. Please send comments, typos and errors! 16. Sonification an Listening to Chaos http://www-camil.music.uiuc.edu/faculty/taube/nm/16/chaos.html From rm at fabula.de Tue Jan 14 09:48:44 2003 From: rm at fabula.de (rm at fabula.de) Date: Tue, 14 Jan 2003 18:48:44 +0100 Subject: [CM] CMN->CM Message-ID: <20030114174844.GF6810@www> Hello list, just a short question: i have a set of CMN files that i need to convert to midi (or, even better, to CM) -- what's the best way to do that. tia Ralf Mattes From cewing at u.washington.edu Tue Jan 14 11:04:06 2003 From: cewing at u.washington.edu (cristopher pierson ewing) Date: Tue, 14 Jan 2003 11:04:06 -0800 (PST) Subject: [CM] a with-sound question Message-ID: I have a set of objects which store potential information for calls to clm instruments. I have a macro which takes any of these objects and the data held within, and writes out the call to the instrument for use within a call to (with-sound). When I call with-sound using the method on an object, it writes an empty soundfile, but if i use with-sound with (eval (method object)), then it works. I guess this means that although my method is writing the call to the instrument properly, it is not getting evaluated once it is written. I have been told by a master (thanks Rick!) that using eval means that something isn't right. Any ideas on how this might ba made to work? I will include the relevant bits of code below. Thanks, Cris ******************************** Code: ******************************** ;;;;;;;;;;;;;;;;;;;; ;;;First, a few parameters for the sampler's environment: (defconstant +sample-root+ "SND/samples/"); here's where samples live (defconstant +home-dir+ (namestring (user-homedir-pathname))) ;;;;;;;;;;;;;;;;;;;; ;;;classes and methods to support the use of samples ;;;;;;;;;; ;;sample-class. Holds the information about a single sample (defclass sample () ;holds information needed to call on a sample ((name :accessor sample-name :initarg :name :initform nil) (path :accessor sample-path :initarg :path :initform "") (pitch :accessor sample-pitch :initarg :pitch :initform 'x))) ;gets the path-name info from a sample object: (defmethod get-path ((obj sample)) (concatenate 'string +home-dir+ +sample-root+ (sample-path obj))) ; prints an object well (defmethod print-object ((obj sample) stream) (format stream "" (sample-path obj))) ;;;;;;;;;; ;;Basic, changing-srate input instrument. Srt-env could be a flat rate, a ;; linear env, or a set of breakpoints. Allows for skipping a percent of ;; the start of the file or of the end or of both (definstrument src-player (filename start-time srt-env &optional (amp 1.0) (width 40) (skip-percent 0) (trim-percent 0)) (let* ((f (open-input* filename)) ;open input file (base-dur (sound-duration filename)) ;find old duration (base-frames (sound-frames filename));find num frames (skip-frames (if (not (= 0 skip-percent));do we skip any? (percent-scaler base-frames skip-percent);set skip-frames 0)) (dur ;figure new duration (dur-o-matic base-dur srt-env (+ skip-percent trim-percent))) (srt (if (listp srt-env) ;is srt-env an env? 0 ;yes? set srt to zero srt-env)) ;no? set srt to srt-env (senv (if (listp srt-env) ;is srt-env an env? (make-env :envelope srt-env :duration dur);make an instance (make-env :envelope '(0 0 1 0) :duration dur)));make a default (src-gen (make-src :input f :srate srt :width 40)));make src instance (multiple-value-bind (beg end) (times->samples start-time dur) (setf (mus-location src-gen) ;set start-location (if (< srt 0) ;if reverse play (- base-frames skip-frames) ;end - skip skip-frames)) ;start + skip (run (loop for i from beg below end do (outa i (* amp (src src-gen (env senv))))));output sound (close-input f)))) ;close input file ;;;;;;;;;;;;;;;;;;;; ;;;Functions which are playback related. These support ;;; functionality in the playback instruments of the clm-sampler. ;;;;;;;;;; ;;Playback-avg takes an envelope for playback rate and determines the ;; average playback speed for that envelope. (defun playback-avg (env) (let ((ox (car env)) (oy (cadr env))) (loop for x in env by #'cddr for y in (cdr env) by #'cddr sum (+ (- (* (abs x) (abs y))(* (abs ox) (abs y))) (- (* (abs x) (abs oy))(* (abs ox) (abs oy)))) into s do (setf ox x oy y) finally (return (/ s 2.0 x))))) ;;;;;;;;;; ;;Dur-o-matic takes the original duration of a soundfile, and the playback ;; rate (or envelope of playback rates) at which the soundfile is to be ;; played, and returns the duration of the soundfile at that rate. It ;; figures in skiptime. (defun dur-o-matic (base-dur pbrate skip-percent) (let ((dur (if (not (= 0 skip-percent));scale original dur (- base-dur (percent-scaler base-dur skip-percent)) base-dur)) (rate 0.0)) (setf rate (if (listp pbrate);if it's a list, then its an envelope. (playback-avg pbrate);find the average of the envelope pbrate)) ;or return the numeric rate (abs (/ dur rate))));figure newdur = olddur/rate (abs for reverse) ;;;;;;;;;; ;;percent-scaler takes n number and x percentage and returns the value that is ;; x percent of n (defun percent-scaler (num perc) (* num (/ perc 100.0))) ;;;;;;;;;; ;;Get-item is designed to parse values in object slots. If slot value is ;; a number, that number is returned, if it is a list, then index(0-1) is ;; required and the list is treated as an envelope for interpolation. If ;; the slot value is a pattern, then the next value in that pattern is ;; returned. (defun get-item (input &optional (index 0)) (typecase input (number input) (symbol input) (list (interpl index input)) (pattern (next input)) (sample input) (string input))) ;;;;;;;;;; ;;;Control the src-player instrument with this object: ;;;;;;;;;; ;;ins class. A super-class for all instruments (defclass sampler-ins () ((time :accessor ins-time :initarg :time :initform 0))) ;;;;;;;;;; ;;input class. A super-class for all input intruments (defclass input (sampler-ins) ((sample :accessor ins-sample :initarg :sample :initform nil))) ;;;;;;;;;; ;;src-player class. holds info to create calls to the src-player instrument (defclass src-player-gen (input) ((rate :accessor ins-rate :initarg :rate :initform 1) (amplitude :accessor ins-amp :initarg :amp :initform 1) (width :accessor ins-width :initarg :width :initform 40) (skip :accessor ins-skip :initarg :skip :initform 0) (trim :accessor ins-trim :initarg :trim :initform 0))) (defmethod write-ins ((obj src-player-gen)) (let ((time (ins-time obj)) (sample-path (get-path (typecase (ins-sample obj) (pattern (eval (next (ins-sample obj)))) (t (ins-sample obj))))) (rate (get-item (ins-rate obj))) (amplitude (get-item (ins-amp obj))) (width (get-item (ins-width obj))) (skip (get-item (ins-skip obj))) (trim (get-item (ins-trim obj)))) (list 'src-player sample-path time rate amplitude width skip trim))) (defmethod print-object ((obj src-player-gen) stream) (format stream "" (sample-path (ins-sample obj)) (ins-rate obj))) ******************************** So compile and load the above code and then run the following to see what I mean: ******************************** ;first, amke a sample object: (setf samp (make-instance 'sample :name 'some-samp :path "path/to/some-sample";relative to ;+sample-dir+ :pitch 100.0)); or whatever ;next, make an src-player-gen (setf player (make-instance 'src-player-gen :sample samp) ;check the writing method (write-ins player) ;should evaluate to the following: (src-player "/homedir/sample-root/some-samp" 0 1 1 40 0 0) ;now watch what happens from within with-sound: (with-sound (:play nil) (write-ins player)) ;and if I use eval: (with-sound (:play nil) (eval (write-ins player))) ;end code examps ******************************** Any suggestions as to why this eval is needed would be greatly appreciated, as would any ideas of ways to get rid of it. Thanks much, Cris ******************************** Cris Ewing CARTAH Assistant University of Washington Home Phone: (206) 365-3413 E-mail: cewing at u.washington.edu ******************************* From nando at ccrma.Stanford.EDU Tue Jan 14 12:09:05 2003 From: nando at ccrma.Stanford.EDU (Fernando Pablo Lopez-Lezcano) Date: 14 Jan 2003 12:09:05 -0800 Subject: [CM] a with-sound question In-Reply-To: References: Message-ID: <1042574945.5629.36.camel@cmn37.Stanford.EDU> > (defmethod write-ins ((obj src-player-gen)) > (let ((time (ins-time obj)) > (sample-path (get-path (typecase (ins-sample obj) > (pattern > (eval (next (ins-sample obj)))) > (t (ins-sample obj))))) > (rate (get-item (ins-rate obj))) > (amplitude (get-item (ins-amp obj))) > (width (get-item (ins-width obj))) > (skip (get-item (ins-skip obj))) > (trim (get-item (ins-trim obj)))) > (list 'src-player sample-path time rate amplitude width skip trim))) You are returning a list from something that should be executing the code instead. Just remember that whatever you put into with-sound has to eventually execute a clm instrument call or calls to generate samples. What (I think) your code does is to return a list and execute nothing, with-sound does nothing with the side effects (ie: returned values) from whatever is in its body. I think that changing it this should work: > (defmethod write-ins ((obj src-player-gen)) > (let ((time (ins-time obj)) > (sample-path (get-path (typecase (ins-sample obj) > (pattern > (eval (next (ins-sample obj)))) > (t (ins-sample obj))))) > (rate (get-item (ins-rate obj))) > (amplitude (get-item (ins-amp obj))) > (width (get-item (ins-width obj))) > (skip (get-item (ins-skip obj))) > (trim (get-item (ins-trim obj)))) > (src-player sample-path time rate amplitude width skip trim)) Now you are actually calling the instrument when you execute write-ins (which could be named "perform-ins" now :-) Neat code... -- Fernando From cewing at u.washington.edu Tue Jan 14 13:53:36 2003 From: cewing at u.washington.edu (cristopher pierson ewing) Date: Tue, 14 Jan 2003 13:53:36 -0800 (PST) Subject: [CM] a with-sound question In-Reply-To: <1042574945.5629.36.camel@cmn37.Stanford.EDU> Message-ID: Thanks much, Fernando. I should have figured that out myself, but I've been staring at this code for too long! C ******************************** Cris Ewing CARTAH Assistant University of Washington Home Phone: (206) 365-3413 E-mail: cewing at u.washington.edu ******************************* On 14 Jan 2003, Fernando Pablo Lopez-Lezcano wrote: > > (defmethod write-ins ((obj src-player-gen)) > > (let ((time (ins-time obj)) > > (sample-path (get-path (typecase (ins-sample obj) > > (pattern > > (eval (next (ins-sample obj)))) > > (t (ins-sample obj))))) > > (rate (get-item (ins-rate obj))) > > (amplitude (get-item (ins-amp obj))) > > (width (get-item (ins-width obj))) > > (skip (get-item (ins-skip obj))) > > (trim (get-item (ins-trim obj)))) > > (list 'src-player sample-path time rate amplitude width skip trim))) > > You are returning a list from something that should be executing the > code instead. Just remember that whatever you put into with-sound has to > eventually execute a clm instrument call or calls to generate samples. > What (I think) your code does is to return a list and execute nothing, > with-sound does nothing with the side effects (ie: returned values) from > whatever is in its body. > > I think that changing it this should work: > > > (defmethod write-ins ((obj src-player-gen)) > > (let ((time (ins-time obj)) > > (sample-path (get-path (typecase (ins-sample obj) > > (pattern > > (eval (next (ins-sample obj)))) > > (t (ins-sample obj))))) > > (rate (get-item (ins-rate obj))) > > (amplitude (get-item (ins-amp obj))) > > (width (get-item (ins-width obj))) > > (skip (get-item (ins-skip obj))) > > (trim (get-item (ins-trim obj)))) > > (src-player sample-path time rate amplitude width skip trim)) > > Now you are actually calling the instrument when you execute write-ins > (which could be named "perform-ins" now :-) > > Neat code... > -- Fernando > > > From renueden at earthlink.net Tue Jan 14 16:19:51 2003 From: renueden at earthlink.net (Ken) Date: Tue, 14 Jan 2003 16:19:51 -0800 Subject: [CM] CM/CLM/CMN/SND WinXP? Message-ID: <003301c2bc2b$d74cdeb0$190ba8c0@KenLaptop> Is the above possible, perhaps using Cygwin. Any hints as to which lisp etc? Thanks, Ken Locarnini From taube at uiuc.edu Tue Jan 14 20:04:06 2003 From: taube at uiuc.edu (Rick Taube) Date: Tue, 14 Jan 2003 20:04:06 -0800 Subject: [CM] CM/CLM/CMN/SND WinXP? References: <003301c2bc2b$d74cdeb0$190ba8c0@KenLaptop> Message-ID: <002301c2bc4b$271e9540$a1197e82@music.uiuc.edu> i think you can get everything except snd working with clisp on windows, sort of. ----- Original Message ----- From: "Ken" To: "CM List" Sent: Tuesday, January 14, 2003 4:19 PM Subject: [CM] CM/CLM/CMN/SND WinXP? > Is the above possible, perhaps using Cygwin. Any hints as to which lisp > etc? > Thanks, > Ken Locarnini > > > > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist > From renueden at earthlink.net Wed Jan 15 05:56:38 2003 From: renueden at earthlink.net (Ken) Date: Wed, 15 Jan 2003 05:56:38 -0800 Subject: [CM] Basic midi-CM Message-ID: <002901c2bc9d$ed953060$450377d8@KenLaptop> -How does one send control info in CM? For instance, lets say I just want to set the volume for a process to 85. Will the process output volume messages for each iteration, or is there a way to output a single message? -How does one output a control sweep of some sort? If I had a held note and I wanted to have a ramp of modulation messages come on during the sustain, how do I code that? Hope this makes sense, Thanks, Ken Locarnini From bil at ccrma.Stanford.EDU Wed Jan 15 05:59:52 2003 From: bil at ccrma.Stanford.EDU (Bill Schottstaedt) Date: Wed, 15 Jan 2003 05:59:52 -0800 Subject: [CM] CM/CLM/CMN/SND WinXP? In-Reply-To: <003301c2bc2b$d74cdeb0$190ba8c0@KenLaptop> References: <003301c2bc2b$d74cdeb0$190ba8c0@KenLaptop> Message-ID: <200301151359.FAA11273@cmn14.stanford.edu> > i think you can get everything except snd working with clisp on windows, And Snd ought to work -- I occasionally make sure it compiles in MS C, and once-upon-a-time got it to run using Hummingbird Motif (a commercial Windows Motif). I think Gtk has been ported to Windows, and Guile, so if some kind soul has cygwin and is willing to go through a debugging cycle, I'd be very grateful -- just run configure and make and send me the errors. From taube at uiuc.edu Wed Jan 15 06:49:23 2003 From: taube at uiuc.edu (Rick Taube) Date: Wed, 15 Jan 2003 08:49:23 -0600 Subject: [CM] Basic midi-CM In-Reply-To: <002901c2bc9d$ed953060$450377d8@KenLaptop> References: <002901c2bc9d$ed953060$450377d8@KenLaptop> Message-ID: it should be possible to send every midi message in the protocol, including sysex stuff. rather than define a trillion different classes, CM simply defines a class called 'midimsg' that lets you package up bytes to send howver you want. the midimsg class has 3 slots time duh msg the main byte message data other bytes here is the trick: the value of the 'msg' slot is a specially formatted fixnum that encodes a 3 byte (max) MIDI message. Each of these integer message types has a low-level constructor: ? (make-note-on 0 60 90) 155226 ? (make-note-off 0 60 90) 138842 ? (make-program-change 0 1) 196736 ? (make-control-change 0 1 2)) 180354 and so on. you can use the utility function 'midi-print-message' to inspect these things: ? (midi-print-message 138842) # 138842 ? (midi-print-message 180354) # 180354 so to send a program change 3 on channel 0 at time zero: (process ... output (new midimsg :time 0 :msg (make-program-change 0 3))) unfortunatly, the lowlevel functions are undocumented (well what did you expect...) but look at src/midi1.scm for all the definions. the file src/midix.scm has tons of sysex stuff. actually, i think i _did_ document these low level functions at some point and those docs should still be valid. so maybe i shuold dust it off and add it to the doc/ tree in the next tarfile. At 5:56 AM -0800 1/15/03, Ken wrote: >-How does one send control info in CM? For instance, lets say I just want >to set the volume for a process to 85. Will the process output volume >messages for each iteration, or is there a way to output a single message? > >-How does one output a control sweep of some sort? If I had a held note and >I wanted to have a ramp of modulation messages come on during the sustain, >how do I code that? > >Hope this makes sense, > >Thanks, >Ken Locarnini > > > > >_______________________________________________ >Cmdist mailing list >Cmdist at ccrma.stanford.edu >http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist From renueden at earthlink.net Wed Jan 15 10:05:18 2003 From: renueden at earthlink.net (Ken) Date: Wed, 15 Jan 2003 10:05:18 -0800 Subject: Fw: [CM] Basic midi-CM Message-ID: <006301c2bcc0$aa684ca0$450377d8@KenLaptop> ----- Original Message ----- From: "Ken" To: "Rick Taube" Sent: Wednesday, January 15, 2003 9:18 AM Subject: Re: [CM] Basic midi-CM > > (process ... > > output (new midimsg :time 0 > > :msg (make-program-change 0 3))) > > > > > So to bring on vibrato/modulation controller-1 during a sustained note in a > process outputting midi note events, would I have to have a seperate algo > running to spit out say a linear ramp from say 0-30 every time a certain > note occured, or some fancy lisp coding in the same process that I'm not > ready for yet? Should I keep the controls seperate from the note on/offs? > How do others deal with this? Thanks for any hints, > Ken > From taube at uiuc.edu Wed Jan 15 10:11:34 2003 From: taube at uiuc.edu (Rick Taube) Date: Wed, 15 Jan 2003 12:11:34 -0600 Subject: [CM] Basic midi-CM In-Reply-To: <004301c2bcba$2e906870$450377d8@KenLaptop> References: <002901c2bc9d$ed953060$450377d8@KenLaptop> <004301c2bcba$2e906870$450377d8@KenLaptop> Message-ID: >So to bring on vibrato/modulation controller-1 during a sustained note in a >process outputting midi note events, would I have to have a seperate algo >running to spit out say a linear ramp from say 0-30 every time a certain >note occured, or some fancy lisp coding in the same process that I'm not >ready for yet? Should I keep the controls seperate from the note on/offs? >How do others deal with this? Thanks for any hints, >Ken you can have one process do multuple outputs or split notes and controls into two processes it doesnt really matter. if you use one process then if you write a series of controllers into the future to effect a current note you should maybe use sprout, ie something like: (process ... for controls = (whatever) for k = (the-note) output (new midi time (now) keynum k) each c in controls as i from 0 by .1 sprout (new midimsg time (+ now i) msg c)) if you want to use lisp code you can call output, sprout and each as functions: (process ... for controls = (whatevr) do (output (new midi ...) (loop for c in controls as i from 0 by .1 do (sprout ...))) From t at fictive.com Wed Jan 15 13:01:29 2003 From: t at fictive.com (Tobias Kunze =?ISO-8859-1?Q?Brise=F1o?=) Date: Wed, 15 Jan 2003 22:01:29 +0100 Subject: [CM] import, typos, midi example links In-Reply-To: <20030108201947.GD30090@www> References: <20030108201947.GD30090@www> Message-ID: <20030115220129.4888e444.t@fictive.com> > > by the way does anybody know how to get a browser to play the midi > > file witout going to a blank page? if so, please tell me! right > > now my quicktime plugin plays in a new blank page and so i have to > > hit "back" each time, this is very annoying!.... > > What browser do you use? It works fine on my box (Mozilla/5.0 (X11; > U; Linux i586; en-US; rv:1.0.0) Gecko/20020615 Debian/1.0.0-3) this depends most likely on whether the browser renders the link or not. in rick's case, he has a plugin, so the browser "renders" the link content by showing a new page. in your case, the browser hands things off to an external viewer. solution 1 to rick's annoyance, which is used about 90% of the time on the web would be to embed the midi files. of course, this locks out users on platforms without such a plugin. solution 2 would be to tell the browser not to use a plugin for unembedded midi files but instead a midi application (better anyways, because that way you get whatever controls your midi player offers you). From t at fictive.com Wed Jan 15 14:06:55 2003 From: t at fictive.com (Tobias Kunze =?ISO-8859-1?Q?Brise=F1o?=) Date: Wed, 15 Jan 2003 23:06:55 +0100 Subject: [CM] computor controller In-Reply-To: <3E0E2023.D7B29D67@westnet.com> References: <000e01c2aeb5$e20ea780$4bd0aec7@KenLaptop> <3E0E2023.D7B29D67@westnet.com> Message-ID: <20030115230655.212e3b1f.t@fictive.com> > i was wondering if there is a way to do this in cm and to to hook up > multiple, say usb, keyboards as additional "controllers" or how i > might go about implementing that. there used to be applications doing that on the mac and under irix. dunno about win or other unices. but remember that most keyboards won't buffer more than 3 or 4 parallel keypresses, so you won't be able to do real polyphony. -t From cewing at u.washington.edu Thu Jan 16 15:07:29 2003 From: cewing at u.washington.edu (cristopher pierson ewing) Date: Thu, 16 Jan 2003 15:07:29 -0800 (PST) Subject: [CM] Sound Let question Message-ID: I see that sound let allows you to set with-sound related parameters that are specific to the temporary file created by each element of the sound-let form. Does this apply even to channel count? I mean to say, is it possible to write a series of one-channel temporary files inside a sound let from within a with-sound that will finally return a stereo (or more) file? I would try to test this, but I can't figure out how to inspect the files created temporarily, so as to verify that they are in fact only one-channel. Thanks, Cris ******************************** Cris Ewing CARTAH Assistant University of Washington Home Phone: (206) 365-3413 E-mail: cewing at u.washington.edu ******************************* From giusvento at tiscali.it Thu Jan 16 20:39:48 2003 From: giusvento at tiscali.it (giusvento) Date: Fri, 17 Jan 2003 05:39:48 +0100 Subject: [CM] message Message-ID: <000801c2bde2$78e0eb60$ad490b3e@amd> Please, you have to cancel me to your e.mail list,and please dont send enymore message.tank, -------------- next part -------------- An HTML attachment was scrubbed... URL: From anders.vinjar at notam02.no Fri Jan 17 00:07:42 2003 From: anders.vinjar at notam02.no (Anders Vinjar) Date: 17 Jan 2003 09:07:42 +0100 Subject: [CM] Sound Let question In-Reply-To: References: Message-ID: >>> "cpe" == cristopher pierson ewing writes: cpe> I see that sound let allows you to set with-sound cpe> related parameters that are specific to the temporary cpe> file created by each element of the sound-let form. cpe> Does this apply even to channel count? I mean to say, cpe> is it possible to write a series of one-channel cpe> temporary files inside a sound let from within a cpe> with-sound that will finally return a stereo (or more) cpe> file? Yes. Try something along the lines of this here: (with-sound (:channels 2) ;; create temporary-file to work with later in note-list (sound-let ((tmp-file (:channels 1) (stretch-ins "somefile" 0.7))) ;; some instrument-call: (myins 0 4 440.0 0.1) ;; print info of tmp-file: (clm-print "~%tmp-chans: ~A" (sound-chans tmp-file)) ;; put tmp-file to use in your main sound-file: (scramble-file tmp-file :scramble .5 :pan '((.8 .6))))) sound-let deletes all files it creates before it exits, so youll have to ask for information somewhere inside the body of sound-let. If you need to keep the 'temporary files after youre finished, use a normal nested with-sound call instead. -anders From lt at westnet.com Fri Jan 17 19:03:45 2003 From: lt at westnet.com (Larry Troxler) Date: Fri, 17 Jan 2003 22:03:45 -0500 Subject: [CM] Why are containers named? Message-ID: <3E28C411.9A928519@westnet.com> Just a quick question which I admittedly have not spent a lot of time looking into, but maybe someone has a quick answer: What does the idea of having a name slot for containers serve, when it seems to me that you could just set a symbol-value to a container, and then the symbol could serve as the name? Perhaps this is more of a general Common Lisp question (why name things when you could set a symbol to refer to them), so apologies in advance. Perhaps an issue of needing to have a seperate hash table for implementation purposes? What leads me to ask this question, is simply that it is very awkward when interfacing to CM interactively, to type "#!" when I want to reference a container - it is really a reach for the fingers and destroys the momentum of the session. I have made a macro that creates a container and gives it the same name as the symbol, but that is redundant. It seems that I wouldn't need the seperate name slot at all, except that the "save-object" function writes forms that create anonymous containers (ok, not sure of the right word) that are not assigned (again, not sure - bound?) to a symbol. So everything works nice for me most of the time, except when I load a file created by the "save-object", in which case I am forced to refer to it by name. Larry From taube at uiuc.edu Sat Jan 18 07:34:33 2003 From: taube at uiuc.edu (Rick Taube) Date: Sat, 18 Jan 2003 07:34:33 -0800 Subject: [CM] Why are containers named? References: <3E28C411.9A928519@westnet.com> Message-ID: <002301c2bf07$1a6247c0$9d197e82@music.uiuc.edu> Your message seems to imply that you are forced to use names but actually you are not. so if you dont like them dont use them. orighinally name were added so you could use #!foo inside quoted lists of data (item steams.) . but as you say saving a container can be a problem without a name since load does not return a value. im not sure what to do in this case. > What leads me to ask this question, is simply that it is very awkward > when interfacing to CM interactively, to type "#!" when I want to > reference a container - it is really a reach for the fingers and > destroys the momentum of the session. I have made a macro that creates a > From lt at westnet.com Sat Jan 18 06:35:03 2003 From: lt at westnet.com (Larry Troxler) Date: Sat, 18 Jan 2003 09:35:03 -0500 Subject: [CM] Why are containers named? - and typing! References: <3E28C411.9A928519@westnet.com> <002301c2bf07$1a6247c0$9d197e82@music.uiuc.edu> Message-ID: <3E296617.65FD8BCC@westnet.com> Rick Taube wrote: > > Your message seems to imply that you are forced to use names but actually > you are not. so if you dont like them dont use them. orighinally name were > added so you could use #!foo inside quoted lists of data (item steams.) . > but as you say saving a container can be a problem without a name since load > does not return a value. im not sure what to do in this case. > The only situation where I need to use the names is for containers loaded from "save-object". But really I see now that it's a minor issue that I shouldn't have bothered you with - I have a collection of short-cut function I use for editing tasks (similar to Stella but much more crude and customized), and all I need to do is make these macros (or add a macro wrapper for all of them) that uses find-object. Then I can save the tendons in my fingers! Completely OT below: Wow! It occurs to me that I type "#!" by holding the left shift key down with the left hand fifth (little) finger, and then reaching with the other fingers for the "3" and "1" keys. From what I remember from my high school typing class (which embarrassingly I did exceptionally well at, being a pianist at the time - I say embarrassing because I'm a guy and the teacher wanted me to enter into some sort of typing competition), well, what I remember is that you're supposed to use the opposite hand on the shift key. I suspect that the reason I never was able to follow that advice is precisely because of my piano playing experience. On a piano keyboard, there is no such thing as a pair of equivalent keys that can be played with either hand. And furthermore, stretching the hand to reach for chords in piano playing is natural and instinctive, unlike what is taught in typing. So, having learned the piano before I learned typing, and since both activities are mostly subconscious, well, it seems that this chording behavior stuck and could not be unlearned. Sorry for the OT, I probably should just send this to David Sudnow (Way(s?) of the Hand author) instead! Larry Troxler From lt at westnet.com Sat Jan 18 15:50:22 2003 From: lt at westnet.com (Larry Troxler) Date: Sat, 18 Jan 2003 18:50:22 -0500 Subject: [CM] Sprouting processes from sequences? Message-ID: <3E29E83E.8492BA95@westnet.com> I would like to define a class with parameters that I can but in a sequence, where the parameters would be the argruments to a process that is sprouted at the start-time. I sort-of had this working on an earlier version of CM, but some things have changed - for example, "process" is no longer a class. Can someone suggest a good way of going about this? For example, (defobject arpeggio () (...) (:parameters time dur step chord ...)) .. and then when scheduled, this object will sprout some process that creates an arpeggio, of say csound objects, for example. The advantage is that a these objects can be nicely sequenced, and when printed show their parameters, just like an event. Larry Troxler From taube at uiuc.edu Sat Jan 18 17:40:17 2003 From: taube at uiuc.edu (Rick Taube) Date: Sat, 18 Jan 2003 19:40:17 -0600 Subject: [CM] Sprouting processes from sequences? In-Reply-To: <3E29E83E.8492BA95@westnet.com> References: <3E29E83E.8492BA95@westnet.com> Message-ID: hmm that sounds like a neat idea. i think you can simply define the class however you want and then define a method on 'schedule-object' for your class. your method inserts arpeggio stuff instead of the object itself: (defmethod schedule-object ((obj arpeggio) start) (let ((add (create-arpeggio-objects obj))) ;; add stuff to queue but not self. (dolist (a add) (enqueue a start start)))) look in schedule.scm (or schedule.lisp) for the schedule-object methods. At 6:50 PM -0500 1/18/03, Larry Troxler wrote: >I would like to define a class with parameters that I can but in a >sequence, where the parameters would be the argruments to a process that >is sprouted at the start-time. > >I sort-of had this working on an earlier version of CM, but some things >have changed - for example, "process" is no longer a class. > >Can someone suggest a good way of going about this? > >For example, > >(defobject arpeggio () > (...) > (:parameters time dur step chord ...)) > >.. and then when scheduled, this object will sprout some process that >creates an arpeggio, of say csound objects, for example. > >The advantage is that a these objects can be nicely sequenced, and when >printed show their parameters, just like an event. > >Larry Troxler >_______________________________________________ >Cmdist mailing list >Cmdist at ccrma.stanford.edu >http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist From lt at westnet.com Sat Jan 18 20:20:00 2003 From: lt at westnet.com (Larry Troxler) Date: Sat, 18 Jan 2003 23:20:00 -0500 Subject: [CM] Sprouting processes from sequences? References: <3E29E83E.8492BA95@westnet.com> Message-ID: <3E2A2770.5826C395@westnet.com> Rick Taube wrote: > > hmm that sounds like a neat idea. i think you can simply define the class however you want and then define a method on 'schedule-object' for your class. your method inserts arpeggio stuff instead of the object itself: > > (defmethod schedule-object ((obj arpeggio) start) > (let ((add (create-arpeggio-objects obj))) > ;; add stuff to queue but not self. > (dolist (a add) > (enqueue a start start)))) > > look in schedule.scm (or schedule.lisp) for the schedule-object methods. > Thanks, that's exactly the help I was looking for - I wasn't sure what methods I needed to define. (and it's the weekend - why are you answering email?) Not that I'm complaining of course, I'll try this tonight. I'm guessing that your proposal isn't equivalent to sprouting a process, because if I understand correctly, this code will enqueue all the events at once. So with this method there is no possibility of sprouting a process from a sequence and having it then interact with other ongoing processes. Correct? If so, it's not a problem for me right now - I just mention this to make sure I understand what this code does. Thanks again! Larry Troxler From dlphilp at bright.net Sun Jan 19 15:48:53 2003 From: dlphilp at bright.net (Dave Phillips) Date: Sun, 19 Jan 2003 18:48:53 -0500 Subject: [CM] [OT] Linux Music & Sound Software site updated Message-ID: <3E2B3965.633ECAB7@bright.net> Greetings: As of January 19 2003 the Linux Music & Sound Applications pages have been updated. The site may be reached here: http://sound.condorow.net (USA) Here: http://www.linuxsound.at (Europe) And here: http://www.ymo.org/linuxsound/ (Japan) The Japanese site will not update until January 20. Enjoy ! Best regards, == Dave Phillips The Book Of Linux Music & Sound at http://www.nostarch.com/lms.htm The Linux Soundapps Site at http://linux-sound.org From lt at westnet.com Wed Jan 22 18:02:55 2003 From: lt at westnet.com (Larry Troxler) Date: Wed, 22 Jan 2003 21:02:55 -0500 Subject: [CM] Sprouting processes from sequences? References: <3E29E83E.8492BA95@westnet.com> Message-ID: <3E2F4D4F.41C0CD74@westnet.com> Rick Taube wrote: > > hmm that sounds like a neat idea. i think you can simply define the class however you want and then define a method on 'schedule-object' for your class. your method inserts arpeggio stuff instead of the object itself: > > (defmethod schedule-object ((obj arpeggio) start) > (let ((add (create-arpeggio-objects obj))) > ;; add stuff to queue but not self. > (dolist (a add) > (enqueue a start start)))) > > look in schedule.scm (or schedule.lisp) for the schedule-object methods. What do the third and fourth arguments to "engueue" do? Obviously they deal with the time the event should be scheduled, but why two arguments and what is the difference in function between them? Larry Troxler From bil at ccrma.Stanford.EDU Thu Jan 23 03:03:50 2003 From: bil at ccrma.Stanford.EDU (Bill Schottstaedt) Date: Thu, 23 Jan 2003 03:03:50 -0800 Subject: [CM] virtual edit timing Message-ID: <200301231103.DAA21270@cmn14.stanford.edu> I checked some virtual edit accessor timings (1.0=access 1 sec of sound in 1 sec): * 1.7 GHz Pentium: * float int * straight 38 0.001 31 0.001 ; 28 20 if buffer * ramp 40 0.001 33 0.001 * ptree 86 0.002 84 0.002 ; y * 0.5 * ramp2 95 0.002 109 0.003 * ramp3 102 0.002 114 0.003 * ptreec 133 0.003 131 0.003 ; y * vct-ref * ptree2 168 0.004 159 0.004 * xramp 376 0.009 371 0.009 * cosine 476 0.012 511 0.012 ; cosine-channel-via-ptree * xramp2 682 0.016 672 0.016 * xen 3600 0.087 3650 0.088 so even the xen (completely unoptimized, general) case is running 10X real-time! There are no glitches in playback, and only slight hesitation in some redisplays -- where the peak-env is about to kick in. I've been chortling about this all morning. From taube at uiuc.edu Thu Jan 23 03:40:47 2003 From: taube at uiuc.edu (Rick Taube) Date: Thu, 23 Jan 2003 05:40:47 -0600 Subject: [CM] Sprouting processes from sequences? In-Reply-To: <3E2F4D4F.41C0CD74@westnet.com> References: <3E29E83E.8492BA95@westnet.com> <3E2F4D4F.41C0CD74@westnet.com> Message-ID: actually, as i look at it i realize you should not use enqueue - just call schedule-object recursivly instead. that way the stuff you are adding will get initialized correctly no matter what it is. (defmethod schedule-object ((obj arpeggio) start) (let ((add (create-arpeggio-objects obj))) ;; add stuff to queue but not self. (dolist (a add) (schedule-object a start )))) >What do the third and fourth arguments to "engueue" do? Obviously they i think its but dont use that function. >Rick Taube wrote: >> >> hmm that sounds like a neat idea. i think you can simply define the class however you want and then define a method on 'schedule-object' for your class. your method inserts arpeggio stuff instead of the object itself: >> >> (defmethod schedule-object ((obj arpeggio) start) >> (let ((add (create-arpeggio-objects obj))) >> ;; add stuff to queue but not self. >> (dolist (a add) >> (enqueue a start start)))) >> >> look in schedule.scm (or schedule.lisp) for the schedule-object methods. > >What do the third and fourth arguments to "engueue" do? Obviously they >deal with the time the event should be scheduled, but why two arguments >and what is the difference in function between them? > >Larry Troxler From lt at westnet.com Thu Jan 23 16:58:26 2003 From: lt at westnet.com (Larry Troxler) Date: Thu, 23 Jan 2003 19:58:26 -0500 Subject: [CM] Re: [Csnd] Common Music and Csound question References: <1043293023.2581.80.camel@col-69-97.reshall.berkeley.edu> Message-ID: <3E308FB2.C0D50D45@westnet.com> (Rick, did you get my sample csound instrument and score output hook? I remember sending it but I don't find it in my Sent-folder) steven yi wrote: > > Hi all, > > After reading the latest news at Dave Philip's wonderful Linux sound > site I decided to take another stab at understanding Common Music. That > being said, I explored a bit and got things running and ran some of the > examples (the Reich piano phase example is very cool). Well, after > looking around a bit, I still couldn't figure out how to go about > outputting csound SCO. > > Does anyone have any examples or could help point me in the right > direction? > > thanks, > steven > Hi, I'm sending this to the Common Music list as well, since this is really a question about Common Music and not Csound. ;;; You have to something like the following (although maybe it's already implemented in ;;; latest CM 2.4 tarball). This variable tells CM what to do after generating the score file. ;;; Of course you can adjust the csound options to taste : ;;; Standard Csound output hook (set-sco-output-hook! #'(lambda (fil) (shell "csound -W -d -m0 -o csound.wav csound.orc ~a" fil))) ;;; Then to generate a soundfile do this: (events #!some-object "csound.sco") Now you have to define some instruments in CM that correspond to the instruments in your csound orchestra file. I see that the copy that I have, and that Dave Phillips posted, of the intro.cm file is out of date with respect to defining csound instruments, and it needs a corresponding csound orchestra file to make everything clear. I can post my orc and CM instrument definition files, but let's move this discussion to the CM list, as this is clearly off-topic on the Csound list, which is busy enough as it is. Steven, email me if you need help on subscribing. Larry Troxler > -- > To unsubscribe, send email to csound-unsubscribe at lists.bath.ac.uk From lt at westnet.com Thu Jan 23 17:08:28 2003 From: lt at westnet.com (Larry Troxler) Date: Thu, 23 Jan 2003 20:08:28 -0500 Subject: [CM] Sprouting processes from sequences? References: <3E29E83E.8492BA95@westnet.com> <3E2F4D4F.41C0CD74@westnet.com> Message-ID: <3E30920C.4D0CAC10@westnet.com> Rick Taube wrote: > > actually, as i look at it i realize you should not use enqueue - just call schedule-object recursivly instead. that way the stuff you are adding will get initialized correctly no matter what it is. > > (defmethod schedule-object ((obj arpeggio) start) > (let ((add (create-arpeggio-objects obj))) > ;; add stuff to queue but not self. > (dolist (a add) > (schedule-object a start )))) > Ok, looking at the defmethods for schedule-object I think I understand what's going on. I'll give this a try - thanks! Larry Troxler From lt at westnet.com Thu Jan 23 17:49:38 2003 From: lt at westnet.com (Larry Troxler) Date: Thu, 23 Jan 2003 20:49:38 -0500 Subject: [CM] Sprouting processes from sequences? References: <3E29E83E.8492BA95@westnet.com> <3E2F4D4F.41C0CD74@westnet.com> Message-ID: <3E309BB2.DCC71C78@westnet.com> Rick Taube wrote: > > actually, as i look at it i realize you should not use enqueue - just call schedule-object recursivly instead. that way the stuff you are adding will get initialized correctly no matter what it is. > > (defmethod schedule-object ((obj arpeggio) start) > (let ((add (create-arpeggio-objects obj))) > ;; add stuff to queue but not self. > (dolist (a add) > (schedule-object a start )))) I tried it, and it seems that my schedule-object method never gets called, because my "arpeggio" class just gets directly outputed to the score file as a single csound event with the instrument number being "ARPEGGIO". I think I'm going to give up on this and just define preprocessing methods that insert events on objects into a new sequence (the default would be just to copy the event). I need to cut my losses - I've spent far too much time on this shit :-) Larry Troxler From taube at uiuc.edu Thu Jan 23 21:02:36 2003 From: taube at uiuc.edu (Rick Taube) Date: Thu, 23 Jan 2003 21:02:36 -0800 Subject: [CM] Sprouting processes from sequences? References: <3E29E83E.8492BA95@westnet.com> <3E2F4D4F.41C0CD74@westnet.com> <3E309BB2.DCC71C78@westnet.com> Message-ID: <001d01c2c365$d0db9580$3c1e7e82@music.uiuc.edu> if you send me the code i can see what is going wrong. it should work. or try subclassing container for you class, offhand i dont see why it wont work. ----- Original Message ----- From: "Larry Troxler" To: "Rick Taube" Cc: Sent: Thursday, January 23, 2003 5:49 PM Subject: Re: [CM] Sprouting processes from sequences? > Rick Taube wrote: > > > > actually, as i look at it i realize you should not use enqueue - just call schedule-object recursivly instead. that way the stuff you are adding will get initialized correctly no matter what it is. > > > > (defmethod schedule-object ((obj arpeggio) start) > > (let ((add (create-arpeggio-objects obj))) > > ;; add stuff to queue but not self. > > (dolist (a add) > > (schedule-object a start )))) > > I tried it, and it seems that my schedule-object method never gets > called, because my > "arpeggio" class just gets directly outputed to the score file as a > single csound > event with the instrument number being "ARPEGGIO". > > I think I'm going to give up on this and just define preprocessing > methods that insert events on objects into a new sequence (the default > would be just to copy the event). I need to cut my losses - I've spent > far too much time on this shit :-) > > > Larry Troxler > From stevenyi at csounds.com Fri Jan 24 10:52:54 2003 From: stevenyi at csounds.com (steven yi) Date: 24 Jan 2003 10:52:54 -0800 Subject: [CM] CM and Csound Message-ID: <1043434373.24305.65.camel@col-69-97.reshall.berkeley.edu> Hi all, I'm a bit new to CM and was wondering if anyone had simple examples of generating Csound scores with CM or could point me to where I could find some. I am using CM 2.4.0 with Guile 1.6.1. Also, what would be more recommended to use with CM, Guile or Clisp? Thanks, Steven From lt at westnet.com Fri Jan 24 15:39:52 2003 From: lt at westnet.com (Larry Troxler) Date: Fri, 24 Jan 2003 18:39:52 -0500 Subject: [CM] Example of using CM with Csound Message-ID: <3E31CEC8.E77C127C@westnet.com> Here is a Csound orchestra and a lisp file that I hope can serve as an example of using csound with Common Music. Please let me know if there are any questions or comments about it. Larry Troxler -------------- next part -------------- (in-package :cm) ;; Set hook to run csound and generate a wav file (set-sco-output-hook! #'(lambda (fil) (shell "csound -W -d -m0 -o csound.wav fm.orc ~a" fil))) ;; fm instrument class (defobject fm (i) (frequency amplitude amplitude-env (mratio :initform 1) (index :initform 1) index-env sinetable) (:parameters time dur frequency amplitude amplitude-env mratio index index-env sinetable)) ;; Linear envelope function table generator class (defobject gen27 (f) ((num :accessor f-num) (size :initform 1025) (gen :initform 27) env) (:parameters time size gen &rest env)) ;; Harmonic sinusoids function table generator class (defobject gen10 (f) ((num :accessor f-num) (size :initform 8192) (gen :initform 10) strengths) (:parameters time size gen &rest strengths)) ;; Define a sine wave table and envelope tables (setf sine (new gen10 time 0 num 1 strengths '(1))) (setf ampenv (new gen27 time 0 num 2 env '(0 0 250 1 750 1 1024 0))) (setf idxenv (new gen27 time 0 num 3 env '(0 1 1024 0))) ;; output 20 random Fm notes. (defun random-fm (n) (process repeat n output (new fm :ins 1 :time (now) :amplitude .15 :amplitude-env (f-num ampenv) :dur .1 :frequency (between 220 880) :index (interp (now) 0 0 10 10) :index-env (f-num idxenv) :sinetable (f-num sine)) wait .25)) ;; Write function table generators and our random notes to a csound score file (events (list sine ampenv idxenv (random-fm 20)) "test.sco") -------------- next part -------------- sr = 44100 kr = 4410 ksmps = 10 nchnls = 2 ; FM instrument instr 1 idur = p3 ifreq = p4 iamp = p5 * 32767 iampenv = p6 imratio = p7 iidx = p8 iidxenv = p9 isin = p10 kamp oscil1 0, iamp, idur, iampenv kidx oscil1 0, iidx, idur, iidxenv a1 foscili kamp, ifreq, 1, imratio, kidx, isin outs a1, a1 endin From taube at uiuc.edu Fri Jan 24 17:28:13 2003 From: taube at uiuc.edu (Rick Taube) Date: Fri, 24 Jan 2003 17:28:13 -0800 Subject: [CM] Sprouting processes from sequences? References: <3E29E83E.8492BA95@westnet.com> <3E2A2770.5826C395@westnet.com> Message-ID: <002e01c2c411$07f8cff0$be1e7e82@music.uiuc.edu> > I'm guessing that your proposal isn't equivalent to sprouting a process, > because if I understand correctly, this code will enqueue all the events > at once. So with this method there is no possibility of sprouting a > process from a sequence and having it then interact with other ongoing > processes. Correct? If so, it's not a problem for me right now - I just > mention this to make sure I understand what this code does. If you need it more dynamic then you could use that code as a method on 'write-event'. your 'write-event' will be called at the exact score time of your arpeggio object. your mehodo will then use 'sprout' to add the subobjects to the queue at that point. From taube at uiuc.edu Fri Jan 24 17:32:07 2003 From: taube at uiuc.edu (Rick Taube) Date: Fri, 24 Jan 2003 17:32:07 -0800 Subject: [CM] CM and Csound References: <1043434373.24305.65.camel@col-69-97.reshall.berkeley.edu> Message-ID: <003401c2c411$93db34e0$be1e7e82@music.uiuc.edu> I believe Tobias Kunze has an example that shows how to do this. Unfortunately ive lost the URL to it! I will cover this in the last chapter of the book, but I havent quite gotten to that chapter. So If he doenst post something Ill cobble up an example for you. best, Rick ----- Original Message ----- From: "steven yi" To: Sent: Friday, January 24, 2003 10:52 AM Subject: [CM] CM and Csound > Hi all, > > I'm a bit new to CM and was wondering if anyone had simple examples of > generating Csound scores with CM or could point me to where I could find > some. I am using CM 2.4.0 with Guile 1.6.1. > > Also, what would be more recommended to use with CM, Guile or Clisp? > > Thanks, > Steven > > > > > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist > From bbattey at u.washington.edu Fri Jan 24 15:48:40 2003 From: bbattey at u.washington.edu (Bret Battey) Date: Fri, 24 Jan 2003 15:48:40 -0800 Subject: [CM] CM and Csound In-Reply-To: <003401c2c411$93db34e0$be1e7e82@music.uiuc.edu> Message-ID: You can check out our style of approach in the class examples at: http://www.dxarts.washington.edu/music/courses/401-3/401examps/index.html Though (warning) we haven't tested with the very latest CM release. -Bret Bret Battey http://BatHatMedia.com ---------------------------------------------------------------------- Research Associate Center for Digital Arts and Experimental Media University of Washington, Seattle http://www.washington.edu/dxarts/ on 1/24/03 5:32 PM, Rick Taube at taube at uiuc.edu wrote: > I believe Tobias Kunze has an example that shows how to do this. > Unfortunately ive lost the URL to it! I will cover this in the last chapter > of the book, but I havent quite gotten to that chapter. So If he doenst post > something Ill cobble up an example for you. > best, > Rick > > ----- Original Message ----- > From: "steven yi" > To: > Sent: Friday, January 24, 2003 10:52 AM > Subject: [CM] CM and Csound > > >> Hi all, >> >> I'm a bit new to CM and was wondering if anyone had simple examples of >> generating Csound scores with CM or could point me to where I could find >> some. I am using CM 2.4.0 with Guile 1.6.1. >> >> Also, what would be more recommended to use with CM, Guile or Clisp? >> >> Thanks, >> Steven >> >> >> >> >> _______________________________________________ >> Cmdist mailing list >> Cmdist at ccrma.stanford.edu >> http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist >> > > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist > From lt at westnet.com Fri Jan 24 15:56:25 2003 From: lt at westnet.com (Larry Troxler) Date: Fri, 24 Jan 2003 18:56:25 -0500 Subject: [CM] Sprouting processes from sequences? References: <3E29E83E.8492BA95@westnet.com> <3E2A2770.5826C395@westnet.com> <002e01c2c411$07f8cff0$be1e7e82@music.uiuc.edu> Message-ID: <3E31D2A9.3DEE4826@westnet.com> Rick Taube wrote: > > > I'm guessing that your proposal isn't equivalent to sprouting a process, > > because if I understand correctly, this code will enqueue all the events > > at once. So with this method there is no possibility of sprouting a > > process from a sequence and having it then interact with other ongoing > > processes. Correct? If so, it's not a problem for me right now - I just > > mention this to make sure I understand what this code does. > > If you need it more dynamic then you could use that code as a method on > 'write-event'. your 'write-event' will be called at the exact score time of > your arpeggio object. your mehodo will then use 'sprout' to add the > subobjects to the queue at that point. > Actually, this seems like the most consistent and flexible approach. Let me try it and I'll let you know how it goes. Thanks Larry Troxler From t at fictive.com Fri Jan 24 16:22:11 2003 From: t at fictive.com (Tobias Kunze =?ISO-8859-1?Q?Brise=F1o?=) Date: Sat, 25 Jan 2003 01:22:11 +0100 Subject: [CM] CM and Csound In-Reply-To: <003401c2c411$93db34e0$be1e7e82@music.uiuc.edu> References: <1043434373.24305.65.camel@col-69-97.reshall.berkeley.edu> <003401c2c411$93db34e0$be1e7e82@music.uiuc.edu> Message-ID: <20030125012211.171336b9.t@fictive.com> > Unfortunately ive lost the URL to it! http://ccrma-www.stanford.edu/~tkunze/sw/cm/lib/csound-example.html From lt at westnet.com Sat Jan 25 14:10:18 2003 From: lt at westnet.com (Larry Troxler) Date: Sat, 25 Jan 2003 17:10:18 -0500 Subject: [CM] Sprouting processes from sequences? References: <3E29E83E.8492BA95@westnet.com> <3E2F4D4F.41C0CD74@westnet.com> Message-ID: <3E330B4A.1BEF4B55@westnet.com> Rick Taube wrote: > > actually, as i look at it i realize you should not use enqueue - just call schedule-object recursivly instead. that way the stuff you are adding will get initialized correctly no matter what it is. > > (defmethod schedule-object ((obj arpeggio) start) > (let ((add (create-arpeggio-objects obj))) > ;; add stuff to queue but not self. > (dolist (a add) > (schedule-object a start )))) > Actually, as you suggested in another message, I defined write-event instead of schedule-object, on my "aggregate" event. This is the only thing that worked, because the schedule-object method on seq's uses enqueue and never calls schedule-object except for containers - this is how it is defined in CM: (defmethod schedule-object ((obj seq) start) (let ((mystart (+ start (object-time obj)))) (enqueue (subobjects obj) mystart mystart) (dolist (sub (subcontainers obj)) (schedule-object sub mystart)))) Larry Troxler From CMailhebuau at abul.org Sun Jan 26 10:22:56 2003 From: CMailhebuau at abul.org (Mailhebuau Christophe) Date: 26 Jan 2003 19:22:56 +0100 Subject: [CM] My article Message-ID: <1043605376.4339.0.camel@justlinux> Hy my article is here http://www.justlinux.org Happy new year ! -- Cordialement, Christophe Mailhebuau http://www.justlinux.org http://www.abul.org GPG: 1024D/75B07F8D: BD18 2D01 D954 A339 E35B 9EA1 4240 0410 75B0 7F8D -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From igadget at earthlink.net Sat Jan 25 20:39:56 2003 From: igadget at earthlink.net (Ruven Gottlieb) Date: Sat, 25 Jan 2003 23:39:56 -0500 Subject: [CM] Sorry if I accidentally spammed you Message-ID: <3E33669C.1060107@earthlink.net> Hi, I'm setting up a mail system, and I think I accidentally spammed some of the members of cmdist (let me know if you like, I'm not _sure_ I did). My apologies. I have unsubscribed from the group til I work this out. Thanks, Ruven Gottlieb From bil at ccrma.Stanford.EDU Mon Jan 27 03:43:36 2003 From: bil at ccrma.Stanford.EDU (Bill Schottstaedt) Date: Mon, 27 Jan 2003 03:43:36 -0800 Subject: [CM] My article In-Reply-To: <1043605376.4339.0.camel@justlinux> References: <1043605376.4339.0.camel@justlinux> Message-ID: <200301271143.DAA26434@cmn14.stanford.edu> > http://www.justlinux.org My French is a bit rusty (high school was a long time ago...), but what I can read is very nice -- thanks! As I was looking at it, and earlier at a screenshot Stefan Schwandter sent me, it was obvious Snd needs internationalization -- the English menus and so on stick out like a sore thumb. But... I don't know anything about this -- will have to look at gettext I guess. > Bill Schottstaedt l'auteur du logiciel qui est fort sympathique et > qui rOpondra i toute vos questions You betcha! From scholz-micha at gmx.de Mon Jan 27 17:02:07 2003 From: scholz-micha at gmx.de (Michael Scholz) Date: 28 Jan 2003 02:02:07 +0100 Subject: [CM] My article In-Reply-To: <200301271143.DAA26434@cmn14.stanford.edu> References: <1043605376.4339.0.camel@justlinux> <200301271143.DAA26434@cmn14.stanford.edu> Message-ID: <861y2yw0hc.fsf@Lerche.Socrates> > My French is a bit rusty (high school was a long time ago...), but > what I can read is very nice -- thanks! As I was looking at it, and > earlier at a screenshot Stefan Schwandter sent me, it was obvious > Snd needs internationalization -- the English menus and so on stick > out like a sore thumb. But... I don't know anything about this -- > will have to look at gettext I guess. In case of internationalization of menus one can create several resource files for different languages. For example if I use `setenv LANG de' for german I can use a file called $HOME/de/Snd (or $X11-PATH/de/app-defaults/Snd) containing something like that: % cat ~/de/Snd !! Snd resources: German -*- xrdb -*- !! Main menu Snd*menuBar.File.labelString: Datei Snd*menuBar.Edit.labelString: Editieren Snd*menuBar.View.labelString: Ansicht Snd*menuBar*Options.labelString: Optionen Snd*menuBar*Help.labelString: Hilfe !! File menu Snd*menuBar*filem.Open C-x C-f.labelString: ?ffnen C-x C-f Snd*menuBar*filem.Close C-x k.labelString: Schlie?en C-x k Snd*menuBar*filem.Save C-x C-s.labelString: Speichern C-x C-s Snd*menuBar*filem.Save as.labelString: Speichern als Snd*menuBar*filem.Revert.labelString: Zur?ck Snd*menuBar*filem.Mix C-x C-q.labelString: Mischen C-x C-q Snd*menuBar*filem.Record.labelString: Aufnahme [...] !! Help menu Snd*menuBar*helpm.Click for help.labelString: Klicken f?r Hilfe Snd*menuBar*helpm.Overview.labelString: Allgemein [...] But the whole help strings may be rearranged with the gettext() function. If you are looking for translating the german resource and po-files, I would try it. Mike From bil at ccrma.Stanford.EDU Tue Jan 28 03:54:09 2003 From: bil at ccrma.Stanford.EDU (Bill Schottstaedt) Date: Tue, 28 Jan 2003 03:54:09 -0800 Subject: [CM] My article In-Reply-To: <861y2yw0hc.fsf@Lerche.Socrates> References: <1043605376.4339.0.camel@justlinux> <200301271143.DAA26434@cmn14.stanford.edu> <861y2yw0hc.fsf@Lerche.Socrates> Message-ID: <200301281154.DAA27737@cmn14.stanford.edu> > If you are looking for translating the german resource and > po-files, I would try it. Wow! Thanks very much for the offer -- I'll definitely set aside some time to look into gettext. From bil at ccrma.Stanford.EDU Thu Jan 30 04:16:12 2003 From: bil at ccrma.Stanford.EDU (Bill Schottstaedt) Date: Thu, 30 Jan 2003 04:16:12 -0800 Subject: [CM] My article In-Reply-To: <861y2yw0hc.fsf@Lerche.Socrates> References: <1043605376.4339.0.camel@justlinux> <200301271143.DAA26434@cmn14.stanford.edu> <861y2yw0hc.fsf@Lerche.Socrates> Message-ID: <200301301216.EAA29361@cmn14.stanford.edu> I've taken the first step toward adding gettext support, including a pass at po/snd.pot (the list of currently-marked translatable strings). But I am uncertain about several things. How much of the help mechanism should be included? I included the "click-for-help" strings, but not the snd-help or help menu texts -- there's a huge amount of stuff here, and I don't want to scare translators away. I also omitted many debugging/info strings, and haven't even looked at the Guile side of the business (I don't think Guile currently has support for gettext). Actually, I was thinking of removing the "click-for-help" stuff altogether -- is it useful? (This is in the ccrma-ftp tarball -- cvs access to sourceforge seems to be hung right at the moment). From cewing at u.washington.edu Thu Jan 30 17:04:22 2003 From: cewing at u.washington.edu (cristopher pierson ewing) Date: Thu, 30 Jan 2003 17:04:22 -0800 (PST) Subject: [CM] is this the best way to do this? Message-ID: I'm trying to implement a method on clm envelopes that will automatically rescale a clm-env to write the same output bu over a different duration. That is to say, given an env that starts at val x and ends at val y lasting over dur z, I want to be able to return an env that starts at x and ends at y lasting over dur a (which may be longer or shorter than the original.) I also want to preserve all of the original characteristics of the first env: base, offset, scalar, etc. Here is my first good stab at the problem (there were several worse ones): (defmethod change-env-dur ((env clm::seg) dur) (restart-env env) (let* ((new-env (copy-object env)) (old-dur (/ (+ (clm::seg-end env) 1) *srate*)) (dur-ratio (float (/ dur old-dur))) (new-data (loop for val in (clm::seg-data env) for i upfrom 0 collect (if (evenp i) val (/ val dur-ratio)))) (new-end (floor (- (* (+ (clm::seg-end env) 1) dur-ratio) 1)))) (setf (clm::seg-data new-env) new-data (clm::seg-restart-data new-env) new-data (clm::seg-end new-env) new-end) new-env)) I know it's a bit sloppy and uses way to many intermediate variables, but hey, it's a first try. My question is this, am I missing anything vital here? I have tested the method pretty extensively and the only big problem I see so far is that rounding error in my stupid division and multiplication steps definitely accumulates, that is to say, if the duration of the env is changed more that a few times, the distance that the last value out falls from the desired last value grows larger and larger. By the time I've altered the env 6 or 8 times, it has become very significant. Now this shouldn't be too big a problem so long as I use the method non-destructively. But who knows, I might forget that some day. Any suggestions as to how to improve this toy? ******************************** Cris Ewing CARTAH Assistant University of Washington Home Phone: (206) 365-3413 E-mail: cewing at u.washington.edu ******************************* From cewing at u.washington.edu Thu Jan 30 18:08:16 2003 From: cewing at u.washington.edu (cristopher pierson ewing) Date: Thu, 30 Jan 2003 18:08:16 -0800 (PST) Subject: [CM] ooooooops! Message-ID: Imagine my embarassment to find one of my own mistakes in this code: It should read like this: (defmethod change-env-dur ((env clm::seg) dur) (restart-env env) (let* ((new-env (copy-object env)) (old-dur (/ (+ (clm::seg-end env) 1) *srate*)) (dur-ratio (float (/ dur old-dur))) (new-data (loop for val in (clm::seg-data env) for i upfrom 0 collect (if (evenp i) (* val dur-ratio);mistake was here ;need to rescale ;breakpoint x-vals too (/ val dur-ratio)))) (new-end (floor (- (* (+ (clm::seg-end env) 1) dur-ratio) 1)))) (setf (clm::seg-data new-env) new-data (clm::seg-restart-data new-env) new-data (clm::seg-end new-env) new-end) new-env)) Sorry about that (sheepish grin). C ******************************** Cris Ewing CARTAH Assistant University of Washington Home Phone: (206) 365-3413 E-mail: cewing at u.washington.edu ******************************* From scholz-micha at gmx.de Thu Jan 30 21:57:55 2003 From: scholz-micha at gmx.de (Michael Scholz) Date: 31 Jan 2003 06:57:55 +0100 Subject: [CM] My article In-Reply-To: <200301301216.EAA29361@cmn14.stanford.edu> References: <1043605376.4339.0.camel@justlinux> <200301271143.DAA26434@cmn14.stanford.edu> <861y2yw0hc.fsf@Lerche.Socrates> <200301301216.EAA29361@cmn14.stanford.edu> Message-ID: <86lm117tej.fsf@Lerche.Socrates> > I've taken the first step toward adding gettext support, including a > pass at po/snd.pot (the list of currently-marked translatable > strings). At least snd-guile goes very well! I made a first example and it works. (snd-ruby shows nothing so far.) > But I am uncertain about several things. I examined some GNU programs and discovered that they only translate decisive parts of the text. I think this is a starting point and it should be translated step by step. If more help-strings are needed, they can be added later on, or not? Mike From bil at ccrma.Stanford.EDU Fri Jan 31 03:52:43 2003 From: bil at ccrma.Stanford.EDU (Bill Schottstaedt) Date: Fri, 31 Jan 2003 03:52:43 -0800 Subject: [CM] is this the best way to do this? In-Reply-To: References: Message-ID: <200301311152.DAA29950@cmn14.stanford.edu> > My question is this, am I missing anything vital here? The original breakpoint data is available (mus-data in Scheme, but I apparently forgot the CL case), and I'll bring out the offset value, so here's my first stab at it: (in-package :clm) ; for mus-data/offset defs which will not be needed after Monday (defmethod mus-data ((e seg)) (seg-original-data e)) (defmethod mus-offset ((e seg)) (seg-offset e)) (defun change-env-dur (e dur) (make-env (mus-data e) :scaler (mus-scaler e) :offset (mus-offset e) :duration dur)) I'll add the first two to the CL CLM, so you shouldn't need to refer to the seg struct -- I treat that part of CLM as an internal thing that I change at any time without warning. From bil at ccrma.Stanford.EDU Fri Jan 31 03:54:52 2003 From: bil at ccrma.Stanford.EDU (Bill Schottstaedt) Date: Fri, 31 Jan 2003 03:54:52 -0800 Subject: [CM] My article In-Reply-To: <86lm117tej.fsf@Lerche.Socrates> References: <1043605376.4339.0.camel@justlinux> <200301271143.DAA26434@cmn14.stanford.edu> <861y2yw0hc.fsf@Lerche.Socrates> <200301301216.EAA29361@cmn14.stanford.edu> <86lm117tej.fsf@Lerche.Socrates> Message-ID: <200301311154.DAA29954@cmn14.stanford.edu> > I examined some GNU programs and discovered that they only translate > decisive parts of the text. I think this is a starting point and it > should be translated step by step. If more help-strings are needed, > they can be added later on, or not? Sounds good -- I'll remove the gettext markings for the click-for-help stuff, and simplify some of the menu situation. From cewing at u.washington.edu Fri Jan 31 09:24:57 2003 From: cewing at u.washington.edu (cristopher pierson ewing) Date: Fri, 31 Jan 2003 09:24:57 -0800 (PST) Subject: [CM] is this the best way to do this? In-Reply-To: <200301311152.DAA29950@cmn14.stanford.edu> Message-ID: Bill, I actually started by doing just that, but I had a problem with it. It seemed that in the case of an envelope with a base other than one or zero, if the original line data resulted in a zero crossing, the scaler and offset values contained in the actual env are readjusted to make such a thing possible (I was actually overwhelmed at the cleverness of this method of dealing with the problem of zeroes in exponential envs). Anyway, when you just take the offset, scaler and base of an exponential env from the original, rescale the duration and feed them back in, the envelope ends up getting skewed by this process. The only way I could see to overcome this was to ignore the values contained in the original env and just reset the breakpoints and increment values. Here's what I mean: (setf tom (make-env '(0 1 1 -1) :duration 1 :base 5)) # As you see, I didn't originally ask for a scaler or offset, but one appears anyway, due to the exponential zero-crossing. If I do things as below, here's the result: (setf joe (change-env-dur tom 0.1)); adding a chunk to get the base, too # and the results run from -0.5 to -1.5, rather than from 1 to -1 . This is why id did it the way I did. It's important for my application to preserve the entire function of the original envelope, just to change it's duration in time. So is there another way I'm not seeing? Thanks very much, Cris ******************************** Cris Ewing CARTAH Assistant University of Washington Home Phone: (206) 365-3413 E-mail: cewing at u.washington.edu ******************************* On Fri, 31 Jan 2003, Bill Schottstaedt wrote: > > My question is this, am I missing anything vital here? > > The original breakpoint data is available (mus-data in Scheme, > but I apparently forgot the CL case), and I'll bring out the > offset value, so here's my first stab at it: > > (in-package :clm) ; for mus-data/offset defs which will not be needed after Monday > (defmethod mus-data ((e seg)) (seg-original-data e)) > (defmethod mus-offset ((e seg)) (seg-offset e)) > > (defun change-env-dur (e dur) > (make-env (mus-data e) > :scaler (mus-scaler e) > :offset (mus-offset e) > :duration dur)) > > I'll add the first two to the CL CLM, so you shouldn't need to > refer to the seg struct -- I treat that part of CLM as an > internal thing that I change at any time without warning. > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist >