From david.kamp at gmx.de Sun Jun 3 08:11:32 2007 From: david.kamp at gmx.de (David Kamp) Date: Sun, 3 Jun 2007 08:11:32 -0700 (PDT) Subject: [CM] Parsing MIDI files with CM In-Reply-To: References: <838326d50603161610w6a87589cuf18755a838033bd7@mail.gmail.com> <20060317074953.GA5596@grisey> Message-ID: <10937463.post@talk.nabble.com> Hi. I am trying desperately to import midi events to lists but all examples in CM dictionary and the various ways of doing it mentioned in mails on this list (as well as the one quoted below) dont seem to work for me. I am working in guile and all i get is an empty list. Does this work differently in guile than in regular lisp? I want to collect keynums durations and amplitudes of a midifile in a list, modify them and spit them back out, just like you wrote below. thanks a lot. Rick Taube wrote: > > > to collect lists of things, you map the objects rather than a slot and > return what you want: > > (fold-objects (lambda (x l) (cons (list (sv x :time) (sv x :keynum)) > l)) s1 '() :class 'midi) > > => ((18.0 77) (17.875 77) (17.75 77) (17.75 89) (17.625 75) (17.625 > 86) ...) > > -- View this message in context: http://www.nabble.com/Parsing-MIDI-files-with-CM-tf1295004.html#a10937463 Sent from the CCRMA - CMdist mailing list archive at Nabble.com. From rm at seid-online.de Sun Jun 3 08:51:03 2007 From: rm at seid-online.de (Ralf Mattes) Date: Sun, 03 Jun 2007 17:51:03 +0200 Subject: [CM] Parsing MIDI files with CM In-Reply-To: <10937463.post@talk.nabble.com> References: <838326d50603161610w6a87589cuf18755a838033bd7@mail.gmail.com> <20060317074953.GA5596@grisey> <10937463.post@talk.nabble.com> Message-ID: <1180885863.6194.5.camel@localhost.localdomain> On Sun, 2007-06-03 at 08:11 -0700, David Kamp wrote: > Hi. > I am trying desperately to import midi events to lists but all examples in > CM dictionary and the various ways of doing it mentioned in mails on this > list (as well as the one quoted below) dont seem to work for me. I am > working in guile and all i get is an empty list. Does this work differently > in guile than in regular lisp? Haven't done serious stuff in Guile for quite a while but a quick test here seems to show that everything works fine ... guile> (version ) "1.8.1" guile> (define midi-stream (import-events "/home/ralf/RedCap.mid")) guile> midi-stream # guile> (map-objects (lambda (n) (format true "Event ~A\n" n)) midi-stream) Event #i(midi-text-event time 0 type 3 text "RedCap.ume via MM/1 OS-9 UltiMusE-K.") Event #i(midi-text-event time 0 type 1 text "Simple circus organ march from April 2000") Event #i(midi-text-event time 0 type 1 text "March of the Red-Capped Penguins") Event #i(midi-text-event time 0 type 1 text "First two strains finished 10/8/2001") Event #i(midi-text-event time 0 type 1 text "Dedicated to the LINUX community.") Event #i(midi-text-event time 0 type 1 text "Or sing to \"Bomb the Taliban\" :-)") Event #i(midi-text-event time 0 type 4 text "Patch085=Voice Lead") Event #i(midi-text-event time 0 type 4 text "Patch057=Trombone") Event #i(midi-text-event time 0 type 4 text "Patch082=Calliope") Event #i(midi-text-event time 0 type 4 text "Patch063=Syn Brass Mello") Event #i(midi-text-event time 0 type 4 text "Patch073=Flute") Event #i(midi-text-event time 0 type 4 text "Patch062=Syn Brass Brite") Event #i(midi-text-event time 0 type 4 text "Patch071=Clarinet") Event #i(midi-text-event time 0 type 4 text "Patch058=Tuba") Event #i(midi-key-signature time 0 key 255 mode 0) Event #i(midi-time-signature time 0 numerator 2 denominator 4 clocks 24 32nds 8) Event #i(midi-tempo-change time 0 usecs 545454) Event #i(midi-program-change time 0 channel 0 program 62) Event #i(midi-program-change time 0 channel 3 program 63) Event #i(midi-program-change time 0 channel 2 program 57) Event #i(midi-program-change time 0 channel 4 program 58) Event #i(midi-program-change time 0 channel 1 program 82) Event #i(midi-program-change time 1.090908 channel 1 program 82) Event #i(midi time 1.090908 keynum 81 duration 1.29545325 amplitude 0.779527559055118 channel 0) Event #i(midi time 1.090908 keynum 72 duration 1.29545325 amplitude 0.779527559055118 channel 0) Event #i(midi time 1.090908 keynum 65 duration 0.74999925 amplitude 0.779527559055118 channel 2) Event #i(midi time 1.090908 keynum 53 duration 0.272727 amplitude 0.669291338582677 channel 3) .... > I want to collect keynums durations and amplitudes of a midifile in a list, > modify them and spit them back out, just like you wrote below. My first guess: you somehow broke the cristals in your warp-speed-transmogrifier :-) First rule of question posting to a ML: show us what you've done so far and tell us WHAT WENT WRONG. > thanks a lot. > > > > Rick Taube wrote: > > > > > > to collect lists of things, you map the objects rather than a slot and > > return what you want: > > > > (fold-objects (lambda (x l) (cons (list (sv x :time) (sv x :keynum)) > > l)) s1 '() :class 'midi) > > > > => ((18.0 77) (17.875 77) (17.75 77) (17.75 89) (17.625 75) (17.625 > > 86) ...) Note: this code will only work for sequences that contain midi note events - calling slot-value :keynum on a will throw yoiu into guile' debugger. HTH Ralf Mattes > > > From david.kamp at gmx.de Sun Jun 3 09:29:29 2007 From: david.kamp at gmx.de (David Kamp) Date: Sun, 3 Jun 2007 09:29:29 -0700 (PDT) Subject: [CM] Parsing MIDI files with CM In-Reply-To: <1180885863.6194.5.camel@localhost.localdomain> References: <838326d50603161610w6a87589cuf18755a838033bd7@mail.gmail.com> <20060317074953.GA5596@grisey> <10937463.post@talk.nabble.com> <1180885863.6194.5.camel@localhost.localdomain> Message-ID: <10938098.post@talk.nabble.com> Ralf Mattes-2 wrote: > > My first guess: you somehow broke the cristals in your > warp-speed-transmogrifier :-) > Damn, youre right. Its always the same...they told me they have fixed the crystals, but one should never trust any warp-speed-transmogrifier-service-guys. By changing the 'midi to it worked, so this thing is working now: (fold-objects (lambda (x l) (cons (list (sv x :time) (sv x :keynum)) l)) s1 '() :class )) Thanks anyway... -- View this message in context: http://www.nabble.com/Parsing-MIDI-files-with-CM-tf1295004.html#a10938098 Sent from the CCRMA - CMdist mailing list archive at Nabble.com. From green at redhat.com Mon Jun 4 22:30:57 2007 From: green at redhat.com (Anthony Green) Date: Mon, 04 Jun 2007 22:30:57 -0700 Subject: [CM] rts midi question Message-ID: <4664F511.50304@redhat.com> Ok - total newbie question... I was hoping to use CM on my Linux system to send midi events in real time to a number of softsynths. Is this possible? I had been assuming I would open up multiple streams... (defparameter *ws1* (portmidi-open :output "WhySynth 20070418 DSSI plugin" :latency 0)) (defparameter *ws2* (portmidi-open :output "ZynAddSubFX" :latency 0)) Initialize rts... ; Start the real-time system with no default output stream. (rts nil :time-format :msec) And then OUTPUT to *ws1* and *ws2*. However, it turns out that *ws2* equals *ws1* and all events go to WhySynth. So does this mean you can only have portmidi open to a single device? Is there any way of doing what I want? Thanks, AG -------------- next part -------------- A non-text attachment was scrubbed... Name: green.vcf Type: text/x-vcard Size: 163 bytes Desc: not available URL: From taube at uiuc.edu Tue Jun 5 13:15:13 2007 From: taube at uiuc.edu (Rick Taube) Date: Tue, 5 Jun 2007 15:15:13 -0500 Subject: [CM] rts midi question In-Reply-To: <4664F511.50304@redhat.com> References: <4664F511.50304@redhat.com> Message-ID: <94387B05-45F6-4AF2-8575-D94508D8AE47@uiuc.edu> i think you shnould specify different streams using a common ".pm" extension: open "one.pm", output: 2, input: 3 open "two.pm", output: 3 ... and then handle the io explicitly define process foo (n, s1, s2) run repeat n for e = make(, time: now(), ...) output e, to: s1 output e, to: s2 end this shuuld work but has not been tested! On Jun 5, 2007, at 12:30 AM, Anthony Green wrote: > Ok - total newbie question... > > I was hoping to use CM on my Linux system to send midi events in > real time to a number of softsynths. Is this possible? I had been > assuming I would open up multiple streams... > > (defparameter *ws1* (portmidi-open :output "WhySynth 20070418 DSSI > plugin" :latency 0)) > (defparameter *ws2* (portmidi-open :output "ZynAddSubFX" :latency 0)) > > Initialize rts... > ; Start the real-time system with no default output stream. > (rts nil :time-format :msec) > > And then OUTPUT to *ws1* and *ws2*. However, it turns out that > *ws2* equals *ws1* and all events go to WhySynth. So does this > mean you can only have portmidi open to a single device? Is there > any way of doing what I want? > > Thanks, > > AG > From green at redhat.com Tue Jun 5 13:34:57 2007 From: green at redhat.com (Anthony Green) Date: Tue, 05 Jun 2007 13:34:57 -0700 Subject: [CM] rts midi question In-Reply-To: <94387B05-45F6-4AF2-8575-D94508D8AE47@uiuc.edu> References: <4664F511.50304@redhat.com> <94387B05-45F6-4AF2-8575-D94508D8AE47@uiuc.edu> Message-ID: <4665C8F1.9070709@redhat.com> Rick Taube wrote: > i think you shnould specify different streams using a common ".pm" > extension: > > open "one.pm", output: 2, input: 3 > open "two.pm", output: 3 Thanks for the hint. I got this working with... (defparameter *ws* (open-io "ws.pm" t :output "WhySynth 20070418 DSSI plugin" :latency 0)) (defparameter *zyn* (open-io "zyn.pm" t :output "ZynAddSubFX" :latency 0)) It took some poking in the source to find open-io. AG -------------- next part -------------- A non-text attachment was scrubbed... Name: green.vcf Type: text/x-vcard Size: 163 bytes Desc: not available URL: From akopec at chopin.edu.pl Tue Jun 5 18:32:28 2007 From: akopec at chopin.edu.pl (Andrzej Kopec) Date: Wed, 6 Jun 2007 03:32:28 +0200 Subject: [CM] Newbie learning. . . . CM / CLM-3 / SND / Scheme??? In-Reply-To: <86bqg1x6st.fsf@Lerche.Socrates> References: <9a471d320705171826v566c10b1l4dfadfb4c0889b7a@mail.gmail.com> <20070518132341.M98875@ccrma.Stanford.EDU> <9a471d320705212116n5d5eae43x69a642782f579c58@mail.gmail.com> <9a471d320705220043o57833121k693018341dd0b535@mail.gmail.com> <20070522113139.M79093@ccrma.Stanford.EDU> <131f0ea00705221657t27e972a6vdc8f70f78e25ef97@mail.gmail.com> <1180117154.30037.39.camel@strawberry> <20070529160239.GA4933@localhost.chopin.edu.pl> <86bqg1x6st.fsf@Lerche.Socrates> Message-ID: <20070606013228.GA4715@localhost.homenett.pl> On Thu, May 31, 2007 at 12:53:06AM +0200, Michael Scholz wrote: > Hi, Andrzej! > > > I'm a newbe in Snd & co. I compiled snd with ruby support and I wonder > > if that was a good decision. I want to ask whether snd-ruby has same > > possibilities as guile version? I suppose there is nothing like > > rt_compile in my snd-ruby; also I wonder if something like snd-ls is > > achievable with ruby? Or 3D spectrogram from the manual (grfsnd.html)? > > Nearly the full functionality of snd-guile can you expect with > snd-ruby. For real time action you may check out the RubyInline > package from Ryan Davis (http://rubyforge.org/projects/rubyinline/). > You may find translation examples guile->ruby in *.rb files. If you > find bugs in any *.rb file or you have special needs, please let me > know, though at the time I have no running snd-ruby, but that's a > different story. > > Mike So, let's say I'm convinced to stay with ruby. But how is it with speed and resources usage? Isn't ruby much slower than scheme(guile)? And about ruby-inline: are there any examples of usage achievable somewhere? If I recall correctly ruby-inline must be given C/C++ code, so it would by precious to have such examples available. thnx for reply ak From jerry.fleming at saybot.com Wed Jun 6 01:19:37 2007 From: jerry.fleming at saybot.com (Jerry Fleming) Date: Wed, 06 Jun 2007 16:19:37 +0800 Subject: [CM] how to print entire wav form into eps file with snd Message-ID: <46666E19.4010809@saybot.com> Hi, I am newbie to snd and enjoy this powerful tool very much. Recently, I want to display the wav form of a recording with its 'print to eps' function. The problem is that, if my recording is too long to displayed in one screen, the eps file is always truncated to the width of the snd main window. There are two methods to fix this problem: one is to expand the window width to fit the wav length, one is to write all data to eps file when printing, even those are 'scrolled' away. Personally, I think the second way is better, because the first involves communication with the window manager (metacity, sawfish, etc.). But I have no idea how to do this exactly. It seems that all printing issues are defined in snd-print.c in the src files. Any help is heartily appreciated. Thanks. Jerry From bil at ccrma.Stanford.EDU Wed Jun 6 06:07:47 2007 From: bil at ccrma.Stanford.EDU (Bill Schottstaedt) Date: Wed, 6 Jun 2007 06:07:47 -0700 Subject: [CM] how to print entire wav form into eps file with snd In-Reply-To: <46666E19.4010809@saybot.com> References: <46666E19.4010809@saybot.com> Message-ID: <20070606130320.M27738@ccrma.Stanford.EDU> > The problem is that, if my recording is too long to displayed > in one screen, the eps file is always truncated to the width of the snd > main window. I don't understand -- how can it be too long? Currently, the print mechanism depends on the display process to generate the eps code (and in gtk+cairo, the dependency is built-in); it would be possible to uncouple the two, but a lot of effort, and I can't see why it's needed. I keep the full precision of the graph in the eps output, so it's not impossible that you could print any size graph from whatever is displayed on the screen. From mi-scholz at users.sourceforge.net Wed Jun 6 15:49:56 2007 From: mi-scholz at users.sourceforge.net (Michael Scholz) Date: Thu, 07 Jun 2007 00:49:56 +0200 Subject: [CM] Newbie learning. . . . CM / CLM-3 / SND / Scheme??? In-Reply-To: <20070606013228.GA4715@localhost.homenett.pl> (Andrzej Kopec's message of "Wed\, 6 Jun 2007 03\:32\:28 +0200") References: <9a471d320705171826v566c10b1l4dfadfb4c0889b7a@mail.gmail.com> <20070518132341.M98875@ccrma.Stanford.EDU> <9a471d320705212116n5d5eae43x69a642782f579c58@mail.gmail.com> <9a471d320705220043o57833121k693018341dd0b535@mail.gmail.com> <20070522113139.M79093@ccrma.Stanford.EDU> <131f0ea00705221657t27e972a6vdc8f70f78e25ef97@mail.gmail.com> <1180117154.30037.39.camel@strawberry> <20070529160239.GA4933@localhost.chopin.edu.pl> <86bqg1x6st.fsf@Lerche.Socrates> <20070606013228.GA4715@localhost.homenett.pl> Message-ID: <86lkewg0kr.fsf@Lerche.Socrates> Hi, Andrzej! > So, let's say I'm convinced to stay with ruby. But how is it with > speed and resources usage? Isn't ruby much slower than scheme(guile)? I didn't know of any benchmarks. I think, the fastes is Gauche, Guile w/o run macro and Ruby are nearly equal, Guile with run macro (and of course with RT) is faster than Ruby. > And about ruby-inline: are there any examples of usage achievable > somewhere? If I recall correctly ruby-inline must be given C/C++ code, > so it would by precious to have such examples available. You have to write code snippets in C. I haven't used RubyInline for years and I couldn't find any old files on my disks, sorry. Mike From plutek at infinity.net Thu Jun 7 08:12:22 2007 From: plutek at infinity.net (plutek at infinity.net) Date: Thu, 7 Jun 2007 11:12:22 -0400 (EDT) Subject: [CM] listener features Message-ID: <20070607151222.E27BFCC079@peterlutek.com> greetings! i am (finally) digging into the depths of snd, using scheme in the listener to accomplish various tasks; as you all know, the facilities provided there are nothing short of amazing -- thanks, bill, for all your years of work! my question is this: what features are present in the listener to facilitate editing/re-using blocks or lines of code. i know that simply placing the cursor in a previously-run block (possibly after editing it) and hitting return will run that block of code again. however, hunting back through many lines of work for the appropriate bit of stuff can be tedious. i'm running snd-ls -- since it's gtk, not motif, the M-p and M-n keystrokes are not available. are there other facilities for things like the shell command history or reverse-i-search, or is it a better tactic to just edit a few consistently-named scheme-files in i.e. emacs, and define snd keybindings to re-run those as required? any wisdom on listener working methodologies would be greatly appreciated; as it stands, this front-end to the scheme side of snd seems quite primitive. thanks in advance! -- .pltk. From plutek at infinity.net Thu Jun 7 08:27:38 2007 From: plutek at infinity.net (plutek at infinity.net) Date: Thu, 7 Jun 2007 11:27:38 -0400 (EDT) Subject: [CM] listener features In-Reply-To: <20070607151222.E27BFCC079@peterlutek.com> (plutek@infinity.net) References: <20070607151222.E27BFCC079@peterlutek.com> Message-ID: <20070607152738.D0142CC079@peterlutek.com> >From: plutek at infinity.net >any wisdom on listener working methodologies would be greatly appreciated; as it stands, this front-end to the scheme side of snd seems quite primitive. ok.... obviously my end of things here is seriously a Work-In-Progress, so i'll offer a bit of a reply-to-self: how about inf-snd.el? any other interesting and comprehensive methods available? -- .pltk. From bil at ccrma.Stanford.EDU Thu Jun 7 11:39:37 2007 From: bil at ccrma.Stanford.EDU (Bill Schottstaedt) Date: Thu, 7 Jun 2007 11:39:37 -0700 Subject: [CM] Snd 9.1 Message-ID: <20070607183826.M4823@ccrma.Stanford.EDU> more work on the virtual mix support Two new hooks: peak-env-hook, draw-mix-hook added mouse position args to mix-drag-hook background-gradient (gtk+cairo only) sound-mark-info mix-sync-max moved equalize-panes to snd-motif.scm new rt-compiler.scm et al thanks to Kjetil SIGUSR1 (kill -10) throws Snd back to its top level in cmn: Michael Edwards added a way to change a staff name (new-staff-name) I did half of the :old-style layout bugfix (the staves are laid out correctly, I think) in clm: changes for ACL 8.1 Thanks!: Michael Edwards, Etienne Deleflie, Joshua Parmenter, Kjetil Matheussen checked: Ruby 1.8.6, sbcl 1.0.5, gtk 2.10.12|2.11.0|1, ACL 8.1, pango 1.17.0|1|2, glib 2.13.2|3 From everamzah at gmail.com Fri Jun 8 14:21:08 2007 From: everamzah at gmail.com (James) Date: Fri, 8 Jun 2007 17:21:08 -0400 Subject: [CM] SND feature request Message-ID: <7e259480706081421p1be7760bpac1d92ff51b246a3@mail.gmail.com> I have a request that in a future version of SND one would be able to drag a single audio file off of the main program window so that it can be displayed separate. I doubt that's trivial, and I'm really just throwing it out there ;) Thanks for the super-powerful-and-all-amazing SND -- james/everamzah -------------- next part -------------- An HTML attachment was scrubbed... URL: From bil at ccrma.Stanford.EDU Fri Jun 8 14:54:47 2007 From: bil at ccrma.Stanford.EDU (Bill Schottstaedt) Date: Fri, 8 Jun 2007 14:54:47 -0700 Subject: [CM] SND feature request In-Reply-To: <7e259480706081421p1be7760bpac1d92ff51b246a3@mail.gmail.com> References: <7e259480706081421p1be7760bpac1d92ff51b246a3@mail.gmail.com> Message-ID: <20070608215333.M69639@ccrma.Stanford.EDU> > I have a request that in a future version of SND one would be able > to drag a single audio file off of the main program window so that > it can be displayed separate. I think this can be done in the extension language -- I'll try to conjure up something. From andersvi at extern.uio.no Fri Jun 8 15:11:02 2007 From: andersvi at extern.uio.no (andersvi at extern.uio.no) Date: Sat, 09 Jun 2007 00:11:02 +0200 Subject: [CM] SND feature request In-Reply-To: <7e259480706081421p1be7760bpac1d92ff51b246a3@mail.gmail.com> (James's message of "Fri\, 8 Jun 2007 17\:21\:08 -0400") References: <7e259480706081421p1be7760bpac1d92ff51b246a3@mail.gmail.com> Message-ID: You are aware of the -separate switch available when starting snd? >>>>> "J" == James writes: J> I have a request that in a future version of SND one would be J> able to drag a single audio file off of the main program window J> so that it can be displayed separate. J> I doubt that's trivial, and I'm really just throwing it out J> there ;) J> Thanks for the super-powerful-and-all-amazing SND J> -- james/everamzah From everamzah at gmail.com Fri Jun 8 16:02:25 2007 From: everamzah at gmail.com (James) Date: Fri, 8 Jun 2007 19:02:25 -0400 Subject: [CM] SND feature request In-Reply-To: References: <7e259480706081421p1be7760bpac1d92ff51b246a3@mail.gmail.com> Message-ID: <7e259480706081602v5f7b9e07p2978181f3f16303c@mail.gmail.com> Yup :) I was just hoping to get the best of both worlds. On 6/8/07, andersvi at extern.uio.no wrote: > > You are aware of the -separate switch available when starting snd? > > >>>>> "J" == James writes: > > J> I have a request that in a future version of SND one would be > J> able to drag a single audio file off of the main program window > J> so that it can be displayed separate. > > J> I doubt that's trivial, and I'm really just throwing it out > J> there ;) > > J> Thanks for the super-powerful-and-all-amazing SND > > J> -- james/everamzah > > -- james/everamzah -------------- next part -------------- An HTML attachment was scrubbed... URL: From howyanow at fastmail.fm Sat Jun 9 07:51:38 2007 From: howyanow at fastmail.fm (howyanow) Date: Sat, 09 Jun 2007 07:51:38 -0700 Subject: [CM] Snd 9.0 Ladspa and select problem. Message-ID: <1181400698.730.1194296757@webmail.messagingengine.com> Hi :-) When I run snd and open a file, then load "ladspa.scm", the select function using the mouse works fine, but when I run snd, then load "ladspa.scm", then open a file, the select function using the mouse does not work correctly: it does not work at all, unless I uncheck the unite box, and then I can only select a region using the bottom channel of a stereo file. Would anybody know what I'm doing wrong or if the problem lies elsewhere, please ?! I've attached my snd_prefs_guile. Thanks very much :-) -- howyanow howyanow at fastmail.fm -- http://www.fastmail.fm - Access all of your messages and folders wherever you are -------------- next part -------------- A non-text attachment was scrubbed... Name: snd_prefs_guile Type: application/octet-stream Size: 4421 bytes Desc: not available URL: From edeleflie at gmail.com Mon Jun 11 16:57:23 2007 From: edeleflie at gmail.com (e deleflie) Date: Tue, 12 Jun 2007 09:57:23 +1000 Subject: [CM] adding an extra channel Message-ID: <9a471d320706111657g3e8f176ej1f6d50927b5734cc@mail.gmail.com> All, I've got a situation where I read eiether 3 or 4 channel files, then pump the channels through a LADSPA plugin. the LADSPA plugin requires 4 channels. So when I read a 3 channel file, I need to create a fourth, empty (no signal) channel. I cant seem to find the command for creating a new channel. something like this: (let ((index (open-sound name))) ((if (= (channels 0) 3) (add-channel 0) )) etienne From k.s.matheussen at notam02.no Mon Jun 11 17:09:33 2007 From: k.s.matheussen at notam02.no (Kjetil S. Matheussen) Date: Tue, 12 Jun 2007 02:09:33 +0200 (CEST) Subject: [CM] adding an extra channel In-Reply-To: <9a471d320706111657g3e8f176ej1f6d50927b5734cc@mail.gmail.com> References: <9a471d320706111657g3e8f176ej1f6d50927b5734cc@mail.gmail.com> Message-ID: On Tue, 12 Jun 2007, e deleflie wrote: > All, > > I've got a situation where I read eiether 3 or 4 channel files, then > pump the channels through a LADSPA plugin. > > the LADSPA plugin requires 4 channels. So when I read a 3 channel > file, I need to create a fourth, empty (no signal) channel. > > I cant seem to find the command for creating a new channel. > > something like this: > > (let ((index (open-sound name))) > ((if (= (channels 0) 3) (add-channel 0) )) > This is a work-around, but you can use new-sound instead of open-sound, and then use insert-sound to insert channels from your file into the sound: (open-sound name) (if (= (channels) 3) (let ((snd (new-sound (string-append name ".4-channels") (header-type) (data-format) (srate) 2))) (let loop ((ch 0)) (insert-sound name 0 ch snd) (if (< ch 3) (loop (1+ ch))))) From k.s.matheussen at notam02.no Mon Jun 11 17:16:06 2007 From: k.s.matheussen at notam02.no (Kjetil S. Matheussen) Date: Tue, 12 Jun 2007 02:16:06 +0200 (CEST) Subject: [CM] adding an extra channel In-Reply-To: References: <9a471d320706111657g3e8f176ej1f6d50927b5734cc@mail.gmail.com> Message-ID: On Tue, 12 Jun 2007, Kjetil S. Matheussen wrote: > > > On Tue, 12 Jun 2007, e deleflie wrote: > >> All, >> >> I've got a situation where I read eiether 3 or 4 channel files, then >> pump the channels through a LADSPA plugin. >> >> the LADSPA plugin requires 4 channels. So when I read a 3 channel >> file, I need to create a fourth, empty (no signal) channel. >> >> I cant seem to find the command for creating a new channel. >> >> something like this: >> >> (let ((index (open-sound name))) >> ((if (= (channels 0) 3) (add-channel 0) )) >> > > > This is a work-around, but you can use new-sound instead of open-sound, and > then use insert-sound to insert channels from your file into the sound: > > > (open-sound name) > (if (= (channels) 3) > (let ((snd (new-sound (string-append name ".4-channels") (header-type) (data-format) (srate) 2))) > (let loop ((ch 0)) > (insert-sound name 0 ch snd) > (if (< ch 3) > (loop (1+ ch))))) (Oops, warning, I didn't actually test that code.) http://ccrma.stanford.edu/software/snd/snd/extsnd.html#newsound http://ccrma.stanford.edu/software/snd/snd/extsnd.html#insertsound From bil at ccrma.Stanford.EDU Tue Jun 12 04:54:14 2007 From: bil at ccrma.Stanford.EDU (Bill Schottstaedt) Date: Tue, 12 Jun 2007 04:54:14 -0700 Subject: [CM] adding an extra channel In-Reply-To: <9a471d320706111657g3e8f176ej1f6d50927b5734cc@mail.gmail.com> References: <9a471d320706111657g3e8f176ej1f6d50927b5734cc@mail.gmail.com> Message-ID: <20070612115231.M82163@ccrma.Stanford.EDU> > the LADSPA plugin requires 4 channels. So when I read a 3 channel > file, I need to create a fourth, empty (no signal) channel. Doesn't apply-ladspa take a list of readers? Perhaps an easy fix would be to allow #f (as a null-reader) in that list, then apply_ladspa (in C) would send a stream of 0's in each channel that had no reader -- this is a one line change, if it seems like the right thing. From edeleflie at gmail.com Tue Jun 12 05:23:18 2007 From: edeleflie at gmail.com (e deleflie) Date: Tue, 12 Jun 2007 22:23:18 +1000 Subject: [CM] adding an extra channel In-Reply-To: <20070612115231.M82163@ccrma.Stanford.EDU> References: <9a471d320706111657g3e8f176ej1f6d50927b5734cc@mail.gmail.com> <20070612115231.M82163@ccrma.Stanford.EDU> Message-ID: <9a471d320706120523v1dda8a78w77d0b54bec136aa4@mail.gmail.com> On 6/12/07, Bill Schottstaedt wrote: > > the LADSPA plugin requires 4 channels. So when I read a 3 channel > > file, I need to create a fourth, empty (no signal) channel. > > Doesn't apply-ladspa take a list of readers? apparently, yes. (apply-ladspa reader (plugin-library plugin-type [param1 [param2 ...]]) samples origin) > Perhaps an easy fix would > be to allow #f (as a null-reader) in that list, then apply_ladspa (in C) > would send a stream of 0's in each channel that had no reader -- this > is a one line change, if it seems like the right thing. That would seem to work for my case scenario (I have confirmed with the plugin author). Whether that is a correct LADSPA API interpretation, I dont know... I've looked briefly through the LADSPA developers documentation, but cant see anything of note: http://gdam.ffem.org/ladspa-doc/ladspa.html......... need a LADSPA guru. Etienne From bil at ccrma.Stanford.EDU Tue Jun 12 10:33:02 2007 From: bil at ccrma.Stanford.EDU (Bill Schottstaedt) Date: Tue, 12 Jun 2007 10:33:02 -0700 Subject: [CM] adding an extra channel In-Reply-To: <9a471d320706120523v1dda8a78w77d0b54bec136aa4@mail.gmail.com> References: <9a471d320706111657g3e8f176ej1f6d50927b5734cc@mail.gmail.com> <20070612115231.M82163@ccrma.Stanford.EDU> <9a471d320706120523v1dda8a78w77d0b54bec136aa4@mail.gmail.com> Message-ID: <20070612173209.M59940@ccrma.Stanford.EDU> > That would seem to work for my case scenario (I have confirmed with > the plugin author). Ok -- I've made that change in the CVS version and the "snapshot" (snd-9.tar.gz at ccrma-ftp). Let me know if it's still not right. From edeleflie at gmail.com Tue Jun 12 17:24:23 2007 From: edeleflie at gmail.com (e deleflie) Date: Wed, 13 Jun 2007 10:24:23 +1000 Subject: [CM] adding an extra channel In-Reply-To: <20070612173209.M59940@ccrma.Stanford.EDU> References: <9a471d320706111657g3e8f176ej1f6d50927b5734cc@mail.gmail.com> <20070612115231.M82163@ccrma.Stanford.EDU> <9a471d320706120523v1dda8a78w77d0b54bec136aa4@mail.gmail.com> <20070612173209.M59940@ccrma.Stanford.EDU> Message-ID: <9a471d320706121724n2e37ef12uebddc3372f77ff65@mail.gmail.com> On 6/13/07, Bill Schottstaedt wrote: > > That would seem to work for my case scenario (I have confirmed with > > the plugin author). > > Ok -- I've made that change in the CVS version and the "snapshot" > (snd-9.tar.gz at ccrma-ftp). Let me know if it's still not right. My knowledge of scheme is failing me (or I misunderstand something)... this is what I've tried (but I suspect it is wrong): (let ((readers (list (make-sample-reader 0 0 0) ; W (make-sample-reader 0 0 1) ; X (make-sample-reader 0 0 2) ; Y #f ))) ; Z getting this error: wrong-type-arg: (free-sample-reader Wrong type argument (expecting ~A): ~S (a sample-reader #f) #f) free-sample-reader: wrong-type-arg: Wrong type argument (expecting "a sample-reader"): #f (from Snd 9.2 of 13-Jun-07) Etienne From bil at ccrma.Stanford.EDU Tue Jun 12 17:48:46 2007 From: bil at ccrma.Stanford.EDU (Bill Schottstaedt) Date: Tue, 12 Jun 2007 17:48:46 -0700 Subject: [CM] adding an extra channel In-Reply-To: <9a471d320706121724n2e37ef12uebddc3372f77ff65@mail.gmail.com> References: <9a471d320706111657g3e8f176ej1f6d50927b5734cc@mail.gmail.com> <20070612115231.M82163@ccrma.Stanford.EDU> <9a471d320706120523v1dda8a78w77d0b54bec136aa4@mail.gmail.com> <20070612173209.M59940@ccrma.Stanford.EDU> <9a471d320706121724n2e37ef12uebddc3372f77ff65@mail.gmail.com> Message-ID: <20070613004647.M36140@ccrma.Stanford.EDU> I think in your code you have a line like (for-each free-sample-reader readers) which applies free-sample-reader to each member of the list readers. Since this list can now have #f as well, that line needs to be (for-each (lambda (r) (if r (free-sample-reader r))) readers) or some reasonable facsimile thereof. From edeleflie at gmail.com Tue Jun 12 19:18:48 2007 From: edeleflie at gmail.com (e deleflie) Date: Wed, 13 Jun 2007 12:18:48 +1000 Subject: [CM] adding an extra channel In-Reply-To: <20070613004647.M36140@ccrma.Stanford.EDU> References: <9a471d320706111657g3e8f176ej1f6d50927b5734cc@mail.gmail.com> <20070612115231.M82163@ccrma.Stanford.EDU> <9a471d320706120523v1dda8a78w77d0b54bec136aa4@mail.gmail.com> <20070612173209.M59940@ccrma.Stanford.EDU> <9a471d320706121724n2e37ef12uebddc3372f77ff65@mail.gmail.com> <20070613004647.M36140@ccrma.Stanford.EDU> Message-ID: <9a471d320706121918p331e0231i318efbfad9923707@mail.gmail.com> On 6/13/07, Bill Schottstaedt wrote: > I think in your code you have a line like > > (for-each free-sample-reader readers) > > which applies free-sample-reader to each member of the list readers. > Since this list can now have #f as well, that line needs to be > > (for-each (lambda (r) (if r (free-sample-reader r))) readers) ah yes .... if I'd paid more attention to the error message ..... Now I've come across an other problem (which perhaps invalidates the null reader solution?) the LADSPA plugin has 4 output channels.... it seems that the plugin writes to the same buffer as the input channels... there is no error thrown from the LADSPA wrapper itself, but when I try to save the 4 output channels (as mono) the 4th one doesn't exist ... I guess maybe I should revert top Kjetil's suggestion? Etienne From bil at ccrma.Stanford.EDU Wed Jun 13 04:44:40 2007 From: bil at ccrma.Stanford.EDU (Bill Schottstaedt) Date: Wed, 13 Jun 2007 04:44:40 -0700 Subject: [CM] adding an extra channel In-Reply-To: <9a471d320706121918p331e0231i318efbfad9923707@mail.gmail.com> References: <9a471d320706111657g3e8f176ej1f6d50927b5734cc@mail.gmail.com> <20070612115231.M82163@ccrma.Stanford.EDU> <9a471d320706120523v1dda8a78w77d0b54bec136aa4@mail.gmail.com> <20070612173209.M59940@ccrma.Stanford.EDU> <9a471d320706121724n2e37ef12uebddc3372f77ff65@mail.gmail.com> <20070613004647.M36140@ccrma.Stanford.EDU> <9a471d320706121918p331e0231i318efbfad9923707@mail.gmail.com> Message-ID: <20070613114035.M63243@ccrma.Stanford.EDU> > but when I try to save the 4 output channels (as mono) the 4th one > doesn't exist ... > > I guess maybe I should revert to Kjetil's suggestion? Yes, or try this sequence: open the 3 channel input file, use "New" in the File menu, or (new-sound "test.snd" :channels 4) to open an output file, select the new sound, call apply-ladspa setting the sample-reader input sound to the 3 channel sound (via the second arg to make-sample-reader) -- the 4 output channels are being written, as far as I can see to the temp file (you can find it wherever Snd is writing its temporary files). From bil at ccrma.Stanford.EDU Wed Jun 13 07:34:39 2007 From: bil at ccrma.Stanford.EDU (Bill Schottstaedt) Date: Wed, 13 Jun 2007 07:34:39 -0700 Subject: [CM] feature request Message-ID: <20070613143057.M2415@ccrma.Stanford.EDU> > I have a request that in a future version of SND one would be able to drag a > single audio file off of the main program window so that it can be displayed > separate. It's probably not quite what you want, and it's clumsy, but: (define* (separate-sound :optional snd) "split out 'snd' into its own snd process" (let* ((tmpf (snd-tempnam)) (scm (string-append (substring tmpf 0 (- (string-length tmpf) 3)) "scm")) (scm1 (string-append (substring tmpf 0 (- (string-length tmpf) 4)) "-1.scm")) (oldsnd (or snd (selected-sound))) (name (file-name oldsnd))) (if (not (string? (save-dir))) (set! (save-dir) "/tmp")) (save-edit-history scm oldsnd) (close-sound oldsnd) (with-output-to-file scm1 (lambda () (display (format #f "(define sfile (open-sound ~S))~%" name)) (display (format #f "(load ~S)~%" scm)))) (system (format #f "snd ~A &" scm1)))) From Hannes.Rieser at gmx.net Thu Jun 14 03:32:30 2007 From: Hannes.Rieser at gmx.net (Hannes Rieser) Date: Thu, 14 Jun 2007 12:32:30 +0200 Subject: [CM] CM with OSC support on Windows XP? Message-ID: <20070614103230.110280@gmx.net> Hello, i'm new to CM. I'm working with WinXP and i have two questions: 1) Does OSC work on WinXP with CLISP? The documentation on the CM homepage is not clear about this. The configuration matrix shows that it is possible (H) but when i look at the OSC documentation it says that the real time scheduler (RTS) is necessary for OSC but, according to the configuration matrix, RTS is not supported under XP.(I want to use OSC for communicating with Chuck). 2) On the ccrma homepage i read about SND. Is this Linux only or can i use it with WinXP? thank you Hannes -- Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten Browser-Versionen downloaden: http://www.gmx.net/de/go/browser From landspeedrecord at gmail.com Thu Jun 14 10:21:56 2007 From: landspeedrecord at gmail.com (Landspeedrecord) Date: Thu, 14 Jun 2007 13:21:56 -0400 Subject: [CM] CM with OSC support on Windows XP? In-Reply-To: <20070614103230.110280@gmx.net> References: <20070614103230.110280@gmx.net> Message-ID: I have been wondering about both of these questions as well! On 6/14/07, Hannes Rieser wrote: > Hello, i'm new to CM. I'm working with WinXP and i have two questions: > > 1) Does OSC work on WinXP with CLISP? > > The documentation on the CM homepage is not clear about this. The configuration matrix shows that it is possible (H) but when i look at the OSC documentation it says that the real time scheduler (RTS) is necessary for OSC but, according to the configuration matrix, RTS is not supported under XP.(I want to use OSC for communicating with Chuck). > > 2) On the ccrma homepage i read about SND. Is this Linux only or can i use it with WinXP? > > thank you > Hannes > -- > Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten > Browser-Versionen downloaden: http://www.gmx.net/de/go/browser > > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist > From bil at ccrma.Stanford.EDU Thu Jun 14 10:54:37 2007 From: bil at ccrma.Stanford.EDU (Bill Schottstaedt) Date: Thu, 14 Jun 2007 10:54:37 -0700 Subject: [CM] CM with OSC support on Windows XP? In-Reply-To: References: <20070614103230.110280@gmx.net> Message-ID: <20070614174829.M52288@ccrma.Stanford.EDU> > Is this Linux only or can i use it with WinXP? I don't know about Windows -- Snd is not Linux only since it runs in solaris, mac osx, netbsd, and freebsd. Once upon a time I got it to run in Hummingbird Motif on Windows, and I think there's some way to use gtk, but I haven't had a machine running Windows in about 10 years. I have the Windows-related makefiles somewhere, so if someone has a C compiler, perhaps we could get it to run. I vaguely remember that Kjetil had it running (in Cygwin?). From k.s.matheussen at notam02.no Thu Jun 14 11:11:01 2007 From: k.s.matheussen at notam02.no (Kjetil S. Matheussen) Date: Thu, 14 Jun 2007 20:11:01 +0200 (CEST) Subject: [CM] CM with OSC support on Windows XP? In-Reply-To: <20070614174829.M52288@ccrma.Stanford.EDU> References: <20070614103230.110280@gmx.net> <20070614174829.M52288@ccrma.Stanford.EDU> Message-ID: On Thu, 14 Jun 2007, Bill Schottstaedt wrote: >> Is this Linux only or can i use it with WinXP? > > I don't know about Windows -- Snd is not Linux only since it runs > in solaris, mac osx, netbsd, and freebsd. Once upon a time > I got it to run in Hummingbird Motif on Windows, and I think > there's some way to use gtk, but I haven't had a machine running > Windows in about 10 years. > > I have the Windows-related makefiles somewhere, so if someone > has a C compiler, perhaps we could get it to run. I vaguely remember > that Kjetil had it running (in Cygwin?). > I got it to run 2-3 years ago or something in cygwin. I don't think I had to do anything special, I only wrote ./configure + make after installing the necesarry packages (gtk/guile/etc.). From taube at uiuc.edu Thu Jun 14 11:33:39 2007 From: taube at uiuc.edu (Rick Taube) Date: Thu, 14 Jun 2007 13:33:39 -0500 Subject: [CM] CM with OSC support on Windows XP? In-Reply-To: <20070614103230.110280@gmx.net> References: <20070614103230.110280@gmx.net> Message-ID: <5C9C5871-6687-4237-A611-1070E6B031E0@uiuc.edu> rts uses the posix threads package. if there is a posix threads package on xp you can, in principal, run rts in your lisp. however it would also require that your lisp allow callbacks from a foreign thread. i dont know if clisp will allow this or not (my guess would be no). but im not really sure why osc would requires the rts package since its just socket communication, maybe the docs are misinformed. ill take a look later today i cant rememeber any of this anymore! > Hello, i'm new to CM. I'm working with WinXP and i have two questions: > > 1) Does OSC work on WinXP with CLISP? > > The documentation on the CM homepage is not clear about this. The > configuration matrix shows that it is possible (H) but when i look > at the OSC documentation it says that the real time scheduler (RTS) > is necessary for OSC but, according to the configuration matrix, > RTS is not supported under XP.(I want to use OSC for communicating > with Chuck). > From taube at uiuc.edu Thu Jun 14 11:55:31 2007 From: taube at uiuc.edu (Rick Taube) Date: Thu, 14 Jun 2007 13:55:31 -0500 Subject: [CM] CM with OSC support on Windows XP? In-Reply-To: <20070614103230.110280@gmx.net> References: <20070614103230.110280@gmx.net> Message-ID: ok i see it uses a thread to receive. however if you didnt require receiving anything from chuck, it should be possible to WRITE Osc messages if i hack the system loading. if this is worth it to you let me know. in the near futire there may be at least a partial solution to this xp-is-always-the-wilderness issue with respect to cm, but i cant say much about it at this point. > rts uses the posix threads package. if there is a posix threads > package on xp you can, in principal, run rts in your lisp. however > it would also require that your lisp allow callbacks from a foreign > thread. i dont know if clisp will allow this or not (my guess would > be no). but im not really sure why osc would requires the rts > package since its just socket communication, maybe the docs are > misinformed. ill take a look later today i cant rememeber any of > this anymore! >> Hello, i'm new to CM. I'm working with WinXP and i have two >> questions: >> >> 1) Does OSC work on WinXP with CLISP? >> >> The documentation on the CM homepage is not clear about this. The >> configuration matrix shows that it is possible (H) but when i look >> at the OSC documentation it says that the real time scheduler >> (RTS) is necessary for OSC but, according to the configuration >> matrix, RTS is not supported under XP.(I want to use OSC for >> communicating with Chuck). >> From landspeedrecord at gmail.com Thu Jun 14 12:38:22 2007 From: landspeedrecord at gmail.com (Landspeedrecord) Date: Thu, 14 Jun 2007 15:38:22 -0400 Subject: [CM] CM with OSC support on Windows XP? In-Reply-To: References: <20070614103230.110280@gmx.net> Message-ID: Great to hear about anything that will make using CM on XP easier! I personally would LOVE to get OSC working as there is now a hack that will allow OSC messages to control ableton live. I personally would love to control ableton Live from CM. So count my vote in for the OSC system load hack. Here is a link if you are curious: http://www.liveapi.org/ On 6/14/07, Rick Taube wrote: > ok i see it uses a thread to receive. however if you didnt require > receiving anything from chuck, it should be possible to WRITE Osc > messages if i hack the system loading. if this is worth it to you let > me know. > > in the near futire there may be at least a partial solution to this > xp-is-always-the-wilderness issue with respect to cm, but i cant say > much about it at this point. > > > rts uses the posix threads package. if there is a posix threads > > package on xp you can, in principal, run rts in your lisp. however > > it would also require that your lisp allow callbacks from a foreign > > thread. i dont know if clisp will allow this or not (my guess would > > be no). but im not really sure why osc would requires the rts > > package since its just socket communication, maybe the docs are > > misinformed. ill take a look later today i cant rememeber any of > > this anymore! > > >> Hello, i'm new to CM. I'm working with WinXP and i have two > >> questions: > >> > >> 1) Does OSC work on WinXP with CLISP? > >> > >> The documentation on the CM homepage is not clear about this. The > >> configuration matrix shows that it is possible (H) but when i look > >> at the OSC documentation it says that the real time scheduler > >> (RTS) is necessary for OSC but, according to the configuration > >> matrix, RTS is not supported under XP.(I want to use OSC for > >> communicating with Chuck). > >> > > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist > From edeleflie at gmail.com Thu Jun 14 18:58:06 2007 From: edeleflie at gmail.com (e deleflie) Date: Fri, 15 Jun 2007 11:58:06 +1000 Subject: [CM] adding an extra channel In-Reply-To: <20070613114035.M63243@ccrma.Stanford.EDU> References: <9a471d320706111657g3e8f176ej1f6d50927b5734cc@mail.gmail.com> <20070612115231.M82163@ccrma.Stanford.EDU> <9a471d320706120523v1dda8a78w77d0b54bec136aa4@mail.gmail.com> <20070612173209.M59940@ccrma.Stanford.EDU> <9a471d320706121724n2e37ef12uebddc3372f77ff65@mail.gmail.com> <20070613004647.M36140@ccrma.Stanford.EDU> <9a471d320706121918p331e0231i318efbfad9923707@mail.gmail.com> <20070613114035.M63243@ccrma.Stanford.EDU> Message-ID: <9a471d320706141858m2b6c2f7auccef1adfc9f136aa@mail.gmail.com> > Yes, or try this sequence: open the 3 channel input file, use "New" > in the File menu, or (new-sound "test.snd" :channels 4) to open > an output file, select the new sound, Unfortunately, I'm working in a script only environement, my install of Linux doesn't have a head on it (I'm doing everything by SSH). Is there a way to 'select' the currently active sound in the script? I've tried changing the order of opening the source file and creating the new output file, but to no success. The following code doesn't work ... I end up with 4 channels of the right length, but all values are 0. If I create outsound AFTER opening insound ... then the result has length 0. theoretically now, the only missing link is working out how to direct the output of the LADSPA plugin .... (let ((outsound (new-sound "out.snd" :channels 4))) (let ((insound (open-sound fullfilename))) (src-sound (/ (srate insound) 44100) 1.0 insound) ; resample (let ((readers (list (make-sample-reader 0 0 0) ; W (make-sample-reader 0 0 1) ; X (make-sample-reader 0 0 2) ; Y (make-sample-reader 0 0 3) ))) ; Z (apply-ladspa readers (list "ambisonic1" "Ambisonics-11-square-decoder" 0 1 1.414 2.0 380 2.5) (mus-sound-frames fullfilename) "ambisonic file") (for-each (lambda (r) (if r (free-sample-reader r))) readers)) ; now convert the 4 channels into 4 mono wav files, and write to disk (do ((i 0 (1+ i))) ((= i 4)) (display (format #f "writing channel ~D\n" i)) (save-sound-as (format #f "~a~a.~a" outpath name (case i ((0) "LFront.wav") ((1) "RFront.wav") ((2) "RSurround.wav") ((3) "LSurround.wav") (else "lost") ) ) outsound :header-type mus-riff :data-format mus-l24int :srate 44100 :channel i) ) (close-sound insound) ) (close-sound outsound) ) Etienne From edeleflie at gmail.com Thu Jun 14 19:54:56 2007 From: edeleflie at gmail.com (e deleflie) Date: Fri, 15 Jun 2007 12:54:56 +1000 Subject: [CM] Selecting a sound Message-ID: <9a471d320706141954p7badc69bq433d9d387a036c05@mail.gmail.com> I've just found 'select-sound' .... but its throwing an error: misc-error: (#f Wrong type to apply: ~S (1) #f) this is the code: (let ((insound (open-sound fullfilename))) (display (format #f "Currently selected Sound is ~D \n" (selected-sound))) (let ((outsound (new-sound "out.snd" :channels 4))) (display (format #f "Currently selected Sound is ~D \n" (selected-sound))) select-sound(insound); (display (format #f "Currently selected Sound is ~D \n" (selected-sound))) From edeleflie at gmail.com Thu Jun 14 20:24:26 2007 From: edeleflie at gmail.com (e deleflie) Date: Fri, 15 Jun 2007 13:24:26 +1000 Subject: [CM] LADSPA implementation Message-ID: <9a471d320706142024n47657cd8x73bc8592a9883d52@mail.gmail.com> Sorry to be spamming the list with my problems, but I think I've worked out a few things about how the LADSPA implementation works. I hope my analysis is correct (it may not be). - LADSPA output gets written to the same buffer as the input (when a different sound is selected, the output still goes back into the un-selected input buffer). - When using a reader (with make-sample-reader) the output gets _added_ to the input buffer (so both the result and source are there). This does not seem to happen when not using the readers (but then temporary files dont get cleaned up in the /tmp directory). Can I switch this off? Feels like perhaps there should be an other parameter in the apply-ladspa function, being the name of the output sound .....either that or apply-plugin writes to the currently selected sound. That said, I do seem to remember reading somewhere that LADSPA plugins should write their result to the input buffer ... I could have that wrong. How does an object work that has 1 input and 2 outputs? (like a mono to stereo effect). Etienne From bil at ccrma.Stanford.EDU Fri Jun 15 06:22:22 2007 From: bil at ccrma.Stanford.EDU (Bill Schottstaedt) Date: Fri, 15 Jun 2007 06:22:22 -0700 Subject: [CM] Selecting a sound In-Reply-To: <9a471d320706141954p7badc69bq433d9d387a036c05@mail.gmail.com> References: <9a471d320706141954p7badc69bq433d9d387a036c05@mail.gmail.com> Message-ID: <20070615131052.M18535@ccrma.Stanford.EDU> > (display (format #f "Currently selected Sound is ~D \n" (selected-sound))) selected-sound returns #f if there is no selected sound. The ~D format directive wants an integer. So, use ~A instead. On Ladspa, the plugin tells Snd how many inputs and outputs it wants, and it handles the rest. I could add the usual "snd chn edpos" args to apply-ladspa -- or maybe use a different name like ladspa-channel. Seems late in the game to add anything -- isn't ladspa in its current incarnation dead? From bil at ccrma.Stanford.EDU Fri Jun 15 06:40:50 2007 From: bil at ccrma.Stanford.EDU (Bill Schottstaedt) Date: Fri, 15 Jun 2007 06:40:50 -0700 Subject: [CM] LADSPA implementation In-Reply-To: <9a471d320706142024n47657cd8x73bc8592a9883d52@mail.gmail.com> References: <9a471d320706142024n47657cd8x73bc8592a9883d52@mail.gmail.com> Message-ID: <20070615133835.M58645@ccrma.Stanford.EDU> I pressed "send" and immediately thought, ladspa-channel is: (define* (ladspa-channel ladspa-data #:optional (beg 0) ndur nsnd nchn (edpos -1)) (let* ((selsnd (selected-sound)) (selchn (selected-channel)) (snd (or nsnd selsnd (car (sounds)))) (chn (or nchn sndchn)) (dur (or ndur (- (frames snd chn) beg))) (reader (make-sample-reader beg snd chn 1 edpos))) (select-sound snd) (select-channel chn) (let ((result (apply-ladspa reader ladspa-data dur "apply-ladspa"))) (free-sample-reader reader) (if selsnd (select-sound selsnd)) (if selchn (select-channel selchn)) result))) You could separate the input and output choices by adding more arguments -- in-snd in-chn and out-snd out-chn or whatever. From edeleflie at gmail.com Mon Jun 18 04:54:28 2007 From: edeleflie at gmail.com (e deleflie) Date: Mon, 18 Jun 2007 21:54:28 +1000 Subject: [CM] Selecting a sound In-Reply-To: <20070615131052.M18535@ccrma.Stanford.EDU> References: <9a471d320706141954p7badc69bq433d9d387a036c05@mail.gmail.com> <20070615131052.M18535@ccrma.Stanford.EDU> Message-ID: <9a471d320706180454g6c06b694s5dd65dc18b4277e8@mail.gmail.com> but the error is on the line select-sound(insound); where insound is defined by: (let ((insound (open-sound fullfilename))) If I do select-sound(0); I get the same result: misc-error: (#f Wrong type to apply: ~S ((0)) #f) The doc for select-sound says it takes an index.... have I overlooked something ? Etienne On 6/15/07, Bill Schottstaedt wrote: > > (display (format #f "Currently selected Sound is ~D \n" (selected-sound))) > > selected-sound returns #f if there is no selected sound. The ~D format > directive wants an integer. So, use ~A instead. > > > On Ladspa, the plugin tells Snd how many inputs and outputs it wants, > and it handles the rest. I could add the usual "snd chn edpos" args to > apply-ladspa -- or maybe use a different name like ladspa-channel. > Seems late in the game to add anything -- isn't ladspa in its current > incarnation dead? > > From edeleflie at gmail.com Mon Jun 18 04:59:01 2007 From: edeleflie at gmail.com (e deleflie) Date: Mon, 18 Jun 2007 21:59:01 +1000 Subject: [CM] Selecting a sound In-Reply-To: <9a471d320706180454g6c06b694s5dd65dc18b4277e8@mail.gmail.com> References: <9a471d320706141954p7badc69bq433d9d387a036c05@mail.gmail.com> <20070615131052.M18535@ccrma.Stanford.EDU> <9a471d320706180454g6c06b694s5dd65dc18b4277e8@mail.gmail.com> Message-ID: <9a471d320706180459l4d439dcdr6a2ef0dbe5aa2054@mail.gmail.com> sorry .... I'm thinking in java ... its not select-sound(insound) but rather: select-sound insound cripes ... I just spent 2 days on that. :| Etienne On 6/18/07, e deleflie wrote: > but the error is on the line > > select-sound(insound); > > where insound is defined by: > > (let ((insound (open-sound fullfilename))) > > If I do > select-sound(0); > > I get the same result: misc-error: (#f Wrong type to apply: ~S ((0)) #f) > > The doc for select-sound says it takes an index.... have I overlooked > something ? > > Etienne > > > On 6/15/07, Bill Schottstaedt wrote: > > > (display (format #f "Currently selected Sound is ~D \n" (selected-sound))) > > > > selected-sound returns #f if there is no selected sound. The ~D format > > directive wants an integer. So, use ~A instead. > > > > > > On Ladspa, the plugin tells Snd how many inputs and outputs it wants, > > and it handles the rest. I could add the usual "snd chn edpos" args to > > apply-ladspa -- or maybe use a different name like ladspa-channel. > > Seems late in the game to add anything -- isn't ladspa in its current > > incarnation dead? > > > > > From edeleflie at gmail.com Mon Jun 18 05:16:17 2007 From: edeleflie at gmail.com (e deleflie) Date: Mon, 18 Jun 2007 22:16:17 +1000 Subject: [CM] Selecting a sound In-Reply-To: <9a471d320706180459l4d439dcdr6a2ef0dbe5aa2054@mail.gmail.com> References: <9a471d320706141954p7badc69bq433d9d387a036c05@mail.gmail.com> <20070615131052.M18535@ccrma.Stanford.EDU> <9a471d320706180454g6c06b694s5dd65dc18b4277e8@mail.gmail.com> <9a471d320706180459l4d439dcdr6a2ef0dbe5aa2054@mail.gmail.com> Message-ID: <9a471d320706180516l291ceef1y4857117c92a3e797@mail.gmail.com> I still cant manage to properly select a sound. Why would this code: (let ((outsound (new-sound "out.snd" :channels 4))) (display (format #f "Currently selected Sound is ~a \n" (selected-sound))) (let ((insound (open-sound fullfilename))) (display (format #f "Currently selected Sound is ~a \n" (selected-sound))) select-sound outsound; (display (format #f "Currently selected Sound is ~a \n" (selected-sound))) print out this: Currently selected Sound is 0 Currently selected Sound is 1 Currently selected Sound is 1 Etienne From k.s.matheussen at notam02.no Mon Jun 18 06:03:47 2007 From: k.s.matheussen at notam02.no (Kjetil S. Matheussen) Date: Mon, 18 Jun 2007 15:03:47 +0200 (CEST) Subject: [CM] Selecting a sound In-Reply-To: <9a471d320706180516l291ceef1y4857117c92a3e797@mail.gmail.com> References: <9a471d320706141954p7badc69bq433d9d387a036c05@mail.gmail.com> <20070615131052.M18535@ccrma.Stanford.EDU> <9a471d320706180454g6c06b694s5dd65dc18b4277e8@mail.gmail.com> <9a471d320706180459l4d439dcdr6a2ef0dbe5aa2054@mail.gmail.com> <9a471d320706180516l291ceef1y4857117c92a3e797@mail.gmail.com> Message-ID: On Mon, 18 Jun 2007, e deleflie wrote: > I still cant manage to properly select a sound. Why would this code: > > (let ((outsound (new-sound "out.snd" :channels 4))) > (display (format #f "Currently selected Sound > is ~a \n" (selected-sound))) > (let ((insound (open-sound fullfilename))) > (display (format #f "Currently selected Sound > is ~a \n" (selected-sound))) > select-sound outsound; > (display (format #f "Currently selected Sound > is ~a \n" (selected-sound))) > > print out this: > > Currently selected Sound is 0 > Currently selected Sound is 1 > Currently selected Sound is 1 > 1 (let ((outsound (new-sound "out.snd" :channels 4))) 2 (display (format #f "Currently selected Sound is ~a \n" 3 (selected-sound))) 4 (let ((insound (open-sound fullfilename))) 5 (display (format #f "Currently selected Sound is ~a \n" 6 (selected-sound))) 7 select-sound outsound; 8 (display (format #f "Currently selected Sound is ~a \n" 9 (selected-sound))) The output you are getting is correct. But are you missing a couple of paranthesis on line 7? Currently, line 7 doesn't do anything. From edeleflie at gmail.com Mon Jun 18 18:14:31 2007 From: edeleflie at gmail.com (e deleflie) Date: Tue, 19 Jun 2007 11:14:31 +1000 Subject: [CM] LADSPA implementation In-Reply-To: <20070615133835.M58645@ccrma.Stanford.EDU> References: <9a471d320706142024n47657cd8x73bc8592a9883d52@mail.gmail.com> <20070615133835.M58645@ccrma.Stanford.EDU> Message-ID: <9a471d320706181814s7969aee5j1a54407e765a9853@mail.gmail.com> There is LV2 (http://lv2plug.in/), apparently the 'successor' spec to LADSPA but there isn't much evidence of uptake (in either form: plugins or hosts).... perhaps still a bit early. ... I still cant get apply-ladspa to write to the 'currently selected' sound. I've written a simplified test script that illustrates my problem (included below). So far, with my track-record, I've probably written some bad code somewhere ... although the below script executes without errors, but the resultant file is empty... #!/usr/local/bin/snd -b !# (use-modules (ice-9 format)) ; set some global variables (set! (ladspa-dir) "/usr/lib/ladspa") (let* ((outsound (new-sound "out.wav" :channels 2)) (insound (open-sound "in.wav"))) (let ((readers (list (make-sample-reader 0 insound 0) (make-sample-reader 0 insound 1) ))) ; make sure the outsound is selected so LADSPA can write to it (select-sound outsound) ; execute the ladspa plugin (apply-ladspa readers (list "amp.so" "amp_stereo" 0.5) (mus-sound-frames "in.wav") "applying amp_stereo") ; free up the reader buffers (for-each (lambda (r) (if r (free-sample-reader r))) readers)) ; write outsound to disk (save-sound-as "out.wav" :sound outsound) (close-sound insound) (close-sound outsound) ) (exit) From bil at ccrma.Stanford.EDU Tue Jun 19 04:59:14 2007 From: bil at ccrma.Stanford.EDU (Bill Schottstaedt) Date: Tue, 19 Jun 2007 04:59:14 -0700 Subject: [CM] LADSPA implementation In-Reply-To: <9a471d320706181814s7969aee5j1a54407e765a9853@mail.gmail.com> References: <9a471d320706142024n47657cd8x73bc8592a9883d52@mail.gmail.com> <20070615133835.M58645@ccrma.Stanford.EDU> <9a471d320706181814s7969aee5j1a54407e765a9853@mail.gmail.com> Message-ID: <20070619115753.M93288@ccrma.Stanford.EDU> Your code looks right to me. I think this select-sound kludge doesn't do quite what I thought. I added two optional arguments to apply-ladspa to set the output sound index and channel number, so I think your code can be: #!/usr/local/bin/snd -b !# (use-modules (ice-9 format)) ; set some global variables (set! (ladspa-dir) "/usr/lib/ladspa") (let* ((outsound (new-sound "out.wav" :channels 2)) (insound (open-sound "in.wav"))) (let ((readers (list (make-sample-reader 0 insound 0) (make-sample-reader 0 insound 1) ))) ; execute the ladspa plugin (apply-ladspa readers (list "amp.so" "amp_stereo" 0.5) (mus-sound-frames "in.wav") "applying amp_stereo" outsound 0) ; free up the reader buffers (for-each (lambda (r) (if r (free-sample-reader r))) readers)) ; write outsound to disk (save-sound-as "out.wav" :sound outsound) (close-sound insound) (close-sound outsound) ) (exit) I updated the CVS and snapshot versions of snd-ladspa.c, but I don't have any easy way to test this change, so please let me know if it's broken. From edeleflie at gmail.com Tue Jun 19 07:28:28 2007 From: edeleflie at gmail.com (e deleflie) Date: Wed, 20 Jun 2007 00:28:28 +1000 Subject: [CM] LADSPA implementation In-Reply-To: <20070619115753.M93288@ccrma.Stanford.EDU> References: <9a471d320706142024n47657cd8x73bc8592a9883d52@mail.gmail.com> <20070615133835.M58645@ccrma.Stanford.EDU> <9a471d320706181814s7969aee5j1a54407e765a9853@mail.gmail.com> <20070619115753.M93288@ccrma.Stanford.EDU> Message-ID: <9a471d320706190728gc3db3b9t7f4aa977f62e0bad@mail.gmail.com> Hi Bill, Yes, now the output of the LADSPA plugin is being properly written out to the outsound. However, the content of the insound is in there with it ... Actually, if I perceive correctly, the content of the insound has always been in the result since I started using the readers as the input (to get rid of the files getting written to /tmp/snd_*.snd). Is it possible that using the reader somehow results in the contents of the reader to be included in the outsound ? Etienne On 6/19/07, Bill Schottstaedt wrote: > Your code looks right to me. I think this select-sound kludge doesn't > do quite what I thought. I added two optional arguments to > apply-ladspa to set the output sound index and channel number, so I > think your code can be: > > > #!/usr/local/bin/snd -b > !# > (use-modules (ice-9 format)) > ; set some global variables > (set! (ladspa-dir) "/usr/lib/ladspa") > > (let* ((outsound (new-sound "out.wav" :channels 2)) > (insound (open-sound "in.wav"))) > > (let ((readers > (list (make-sample-reader 0 insound 0) > (make-sample-reader 0 insound 1) ))) > > ; execute the ladspa plugin > (apply-ladspa readers > (list "amp.so" "amp_stereo" 0.5) > (mus-sound-frames "in.wav") > "applying amp_stereo" > outsound 0) > > ; free up the reader buffers > (for-each (lambda (r) (if r (free-sample-reader r))) readers)) > > ; write outsound to disk > (save-sound-as "out.wav" :sound outsound) > > (close-sound insound) > (close-sound outsound) > ) > (exit) > > > I updated the CVS and snapshot versions of snd-ladspa.c, but > I don't have any easy way to test this change, so please let me know > if it's broken. > > > From bil at ccrma.Stanford.EDU Tue Jun 19 10:06:01 2007 From: bil at ccrma.Stanford.EDU (Bill Schottstaedt) Date: Tue, 19 Jun 2007 10:06:01 -0700 Subject: [CM] LADSPA implementation In-Reply-To: <9a471d320706190728gc3db3b9t7f4aa977f62e0bad@mail.gmail.com> References: <9a471d320706142024n47657cd8x73bc8592a9883d52@mail.gmail.com> <20070615133835.M58645@ccrma.Stanford.EDU> <9a471d320706181814s7969aee5j1a54407e765a9853@mail.gmail.com> <20070619115753.M93288@ccrma.Stanford.EDU> <9a471d320706190728gc3db3b9t7f4aa977f62e0bad@mail.gmail.com> Message-ID: <20070619170112.M5700@ccrma.Stanford.EDU> > However, the content of the insound is in there with it ... This must be deliberate on the part of the plugin. Snd doesn't add anywhere -- it sets the input buffer values from the reader, then calls the plugin, then writes whatever the plugin returns, again without adding anything. I don't know which ambisonics plugin you're using (or perhaps they're all the same one under 1000 names), but the "AMB" plugins appear to me to be adding the input back into the output (I just glanced at the code, and have never paid much attention to this stuff, so maybe I'm confused) -- ask the plugin developer what is going on. From edeleflie at gmail.com Wed Jun 20 05:01:46 2007 From: edeleflie at gmail.com (e deleflie) Date: Wed, 20 Jun 2007 22:01:46 +1000 Subject: [CM] LADSPA implementation In-Reply-To: <20070619170112.M5700@ccrma.Stanford.EDU> References: <9a471d320706142024n47657cd8x73bc8592a9883d52@mail.gmail.com> <20070615133835.M58645@ccrma.Stanford.EDU> <9a471d320706181814s7969aee5j1a54407e765a9853@mail.gmail.com> <20070619115753.M93288@ccrma.Stanford.EDU> <9a471d320706190728gc3db3b9t7f4aa977f62e0bad@mail.gmail.com> <20070619170112.M5700@ccrma.Stanford.EDU> Message-ID: <9a471d320706200501v1e84d33dh5d950c6db56d2fc@mail.gmail.com> I think you're right, its not the LADPSA wrapper stuffing up ... but its not the LADSPA plugin either.... it seems to be the re-sampling. When I dont attempt to resample the 4ch sound (before passing it through the LADSPA plugin) the results are correct. When I resample, the results go funny. I'm resampling from 48000 to 44100 like this: (src-sound (/ (srate insound) 44100) 1.0 insound) I'll keep debugging this .... but if anyone can see if my usage of src-sound is incorrect (to resample a 4 ch file) please let me know ... Etienne On 6/20/07, Bill Schottstaedt wrote: > > However, the content of the insound is in there with it ... > > This must be deliberate on the part of the plugin. Snd doesn't add > anywhere -- it sets the input buffer values from the reader, then > calls the plugin, then writes whatever the plugin returns, again without > adding anything. I don't know which ambisonics plugin you're > using (or perhaps they're all the same one under 1000 names), > but the "AMB" plugins appear to me to be adding the input back > into the output (I just glanced at the code, and have never paid > much attention to this stuff, so maybe I'm confused) -- ask the > plugin developer what is going on. > > From edeleflie at gmail.com Wed Jun 20 05:13:54 2007 From: edeleflie at gmail.com (e deleflie) Date: Wed, 20 Jun 2007 22:13:54 +1000 Subject: [CM] LADSPA implementation In-Reply-To: <9a471d320706200501v1e84d33dh5d950c6db56d2fc@mail.gmail.com> References: <9a471d320706142024n47657cd8x73bc8592a9883d52@mail.gmail.com> <20070615133835.M58645@ccrma.Stanford.EDU> <9a471d320706181814s7969aee5j1a54407e765a9853@mail.gmail.com> <20070619115753.M93288@ccrma.Stanford.EDU> <9a471d320706190728gc3db3b9t7f4aa977f62e0bad@mail.gmail.com> <20070619170112.M5700@ccrma.Stanford.EDU> <9a471d320706200501v1e84d33dh5d950c6db56d2fc@mail.gmail.com> Message-ID: <9a471d320706200513s46a7defufea44bf0093ba193@mail.gmail.com> is it possible that this line only re-samples the first channel in the sound? > (src-sound (/ (srate insound) 44100) 1.0 insound) I seem to be getting correct results by doing: (src-sound (/ (srate insound) 44100) 1.0 insound 0) (src-sound (/ (srate insound) 44100) 1.0 insound 1) (src-sound (/ (srate insound) 44100) 1.0 insound 2) (src-sound (/ (srate insound) 44100) 1.0 insound 3) Etienne > > I'll keep debugging this .... but if anyone can see if my usage of > src-sound is incorrect (to resample a 4 ch file) please let me know > ... > > Etienne > > On 6/20/07, Bill Schottstaedt wrote: > > > However, the content of the insound is in there with it ... > > > > This must be deliberate on the part of the plugin. Snd doesn't add > > anywhere -- it sets the input buffer values from the reader, then > > calls the plugin, then writes whatever the plugin returns, again without > > adding anything. I don't know which ambisonics plugin you're > > using (or perhaps they're all the same one under 1000 names), > > but the "AMB" plugins appear to me to be adding the input back > > into the output (I just glanced at the code, and have never paid > > much attention to this stuff, so maybe I'm confused) -- ask the > > plugin developer what is going on. > > > > > From edeleflie at gmail.com Wed Jun 20 22:20:25 2007 From: edeleflie at gmail.com (e deleflie) Date: Thu, 21 Jun 2007 15:20:25 +1000 Subject: [CM] LADSPA implementation In-Reply-To: <9a471d320706200513s46a7defufea44bf0093ba193@mail.gmail.com> References: <9a471d320706142024n47657cd8x73bc8592a9883d52@mail.gmail.com> <20070615133835.M58645@ccrma.Stanford.EDU> <9a471d320706181814s7969aee5j1a54407e765a9853@mail.gmail.com> <20070619115753.M93288@ccrma.Stanford.EDU> <9a471d320706190728gc3db3b9t7f4aa977f62e0bad@mail.gmail.com> <20070619170112.M5700@ccrma.Stanford.EDU> <9a471d320706200501v1e84d33dh5d950c6db56d2fc@mail.gmail.com> <9a471d320706200513s46a7defufea44bf0093ba193@mail.gmail.com> Message-ID: <9a471d320706202220yfaf7844r9b9b9787fef1ec3@mail.gmail.com> I've finally got a fully working script that can handle 3 or 4 channel ambisonic files, re-samples them to 44100 automatically, passes them through a LADSPA plugin, and spits out the result as 4 independent channels. ... so thanks very much for the help learning SND... :) ... (I guess mainly to Bill and Kjetil) For posterity's sake ... I've included the script below ... might be useful to someone googling for something along the way ... Etienne --------------------------------------------------------------------- #!/usr/local/bin/snd -b !# (use-modules (ice-9 format)) ; set some global variables (set! (ladspa-dir) "/usr/lib/ladspa") (set! (sinc-width) 100);i set the sync width to very high to get the smaple rate conversion as accurate as possible (if (< (length (script-args)) 3) ; (display "usage: decode_to_square.sh file-name [insound-path] [outfile-path] [decode set (0-10)]") ; if we get here then we have the right number of arguments (begin ; define some args. (define name (list-ref (script-args) (+ (script-arg) 1))) (define inpath (if (> (length (script-args)) 3) (list-ref (script-args) (+ (script-arg) 2)) "/home/ambisonicbootlegs/share/" )) (define outpath (if (> (length (script-args)) 4) (list-ref (script-args) (+ (script-arg) 3)) "/home/ambisonicbootlegs/transcodes_DTS/" )) (define version (if (> (length (script-args)) 5) (list-ref (script-args) (+ (script-arg) 4)) 99 )) (define fullfilename (format #f "~a~a" inpath name)) (display (format #f "Full File name is ~a \n" fullfilename)) (display (format #f "OutPath is ~a \n" outpath)) (display (format #f "Decode set is ~a \n" version)) ;open the file and check out what its headers are (let* ((outsound (new-sound "out.snd" :channels 4)) (insound (open-sound fullfilename))) (display (format #f "header is ~a (or ~a) \n" (header-type insound) (mus-header-type-name (header-type insound)) )) (display (format #f "data-format is ~a (or ~a) \n" (data-format insound) (mus-data-format-name (data-format insound) ) )) ; check that we have 4 channels, if not then create a 4th one (display (format #f "Number of channels: ~a \n" (channels insound))) ; if number of channels is 3 .... otherwise ; resample (display (format #f "Resampling from ~D to 44100 \n" (srate insound))) (src-sound (/ (srate insound) 44100) 1.0 insound 0) (src-sound (/ (srate insound) 44100) 1.0 insound 1) (src-sound (/ (srate insound) 44100) 1.0 insound 2) (if (= (channels insound) 4) (src-sound (/ (srate insound) 44100) 1.0 insound 3)) (let ((readers (list (make-sample-reader 0 insound 0) ; W (make-sample-reader 0 insound 1) ; X (make-sample-reader 0 insound 2) ; Y (case (channels insound) ((3) #f ) ; Z ((4) (make-sample-reader 0 insound 3)) ; Z ) ))) ; apply LADSPA plugin that converts to 4 speaker feeds in a square (apply-ladspa readers (case version ((0) (list "ambisonic1" "Ambisonics-11-square-decoder" 1 0 0.2 6 0 0.5) ); Bogus ((1) (list "ambisonic1" "Ambisonics-11-square-decoder" 0 0 1.414 1.414 0 2.5) ); Energy decode ((2) (list "ambisonic1" "Ambisonics-11-square-decoder" 0 1 0.8 1.2 380 2.5) ); Shelf, v.low gains ((4) (list "ambisonic1" "Ambisonics-11-square-decoder" 0 1 1.2 1.8 380 2.5) ); Shelf, low gains ((4) (list "ambisonic1" "Ambisonics-11-square-decoder" 0 0 1.0 1.0 0 2.5) ); Cardiod decode for large area ((5) (list "ambisonic1" "Ambisonics-11-square-decoder" 0 1 1.3 1.9 300 2.5) ); Low shelf, lowered gains ((6) (list "ambisonic1" "Ambisonics-11-square-decoder" 0 1 1.414 2.0 380 2.5) ); classic decode ((7) (list "ambisonic1" "Ambisonics-11-square-decoder" 0 1 1.0 1.40 380 2.5) ); Shelf, lower gains ((8) (list "ambisonic1" "Ambisonics-11-square-decoder" 0 1 1.414 2 600 2.5) ); Shelf, v.high ((9) (list "ambisonic1" "Ambisonics-11-square-decoder" 0 1 1.414 2 500 2.5) ); Shelf, high ((10) (list "ambisonic1" "Ambisonics-11-square-decoder" 0 1 1.414 2 380 2.5) ) (else (list "ambisonic1" "Ambisonics-11-square-decoder" 0 1 1.414 2 380 2.5) ); anticipated best decode ) (mus-sound-frames fullfilename) "ambisonic conversion to square speaker layout" outsound 0) (for-each (lambda (r) (if r (free-sample-reader r))) readers)) ; now convert the 4 channels into 4 mono wav files, and write to disk (do ((i 0 (1+ i))) ((= i 4)) (display (format #f "writing channel ~D\n" i)) (save-sound-as (format #f "~a~a.~a" outpath name (case i ((0) "LFront.wav") ((1) "RFront.wav") ((2) "RSurround.wav") ((3) "LSurround.wav") (else "lost") ) ) :sound outsound :header-type mus-riff ; (value= 3) RIFF header (for Microsoft WAVE) :data-format mus-l24int ; (value= 16) 24 Bit little endian int :srate 44100 ; the sound is already resampled, so lets set the appropriate file header :channel i) ) (close-sound insound) (close-sound outsound) ) ) ) (exit) From b0ef at esben-stien.name Thu Jun 21 16:05:09 2007 From: b0ef at esben-stien.name (Esben Stien) Date: Fri, 22 Jun 2007 01:05:09 +0200 Subject: [CM] Record with JACK (Snd-9.1) Message-ID: <87hcp0di3e.fsf@esben-stien.name> When I press record, I get in the little box: error: unknown mus error I press record and the it starts recording with 44100 and 8 channels, even though my JACK is set to 96000. There is no way to select this in the configuration, but it should default to JACK rate. Any way; when I read this file with sndfile-info, I get: Version : libsndfile-1.0.18pre7 Error : Not able to open input file test.snd. File : test.snd Length : 28 .snd Data Offset : 28 Data Size : 0 Encoding : 31 => Unknown!! Sample Rate : 44100 Channels : 8 File opened for read. Format not recognised. Any pointers as to what can try? -- Esben Stien is b0ef at e s a http://www. s t n m irc://irc. b - i . e/%23contact sip:b0ef@ e e jid:b0ef@ n n From bil at ccrma.Stanford.EDU Thu Jun 21 15:29:30 2007 From: bil at ccrma.Stanford.EDU (Bill Schottstaedt) Date: Thu, 21 Jun 2007 15:29:30 -0700 Subject: [CM] Record with JACK (Snd-9.1) In-Reply-To: <87hcp0di3e.fsf@esben-stien.name> References: <87hcp0di3e.fsf@esben-stien.name> Message-ID: <20070621222537.M25173@ccrma.Stanford.EDU> > Any pointers as to what can try? Snd? format 31 is little endian float. Use arecord or ecasound or ardour to record. I'll remove the "record" menu item until I can get it to work. From landspeedrecord at gmail.com Thu Jun 21 15:40:42 2007 From: landspeedrecord at gmail.com (Landspeedrecord) Date: Thu, 21 Jun 2007 18:40:42 -0400 Subject: [CM] Wait times for sprouted functions - CM/Lisp Question. Message-ID: Hi, Is there a way for a sprouted function to pass its total duration back to a parent function so that the parent function can use that value as the wait time before calling the next sprout command? Basically I want to sprout a function multiple times so that the start of each succesive iteration of the function lines up with the end of the one before it. The problem is that the total length of each function is determined by the parameters passed to the function so the "parent" function that is making the call to sprout doesn't know how long to wait. Any Ideas? Below is rough idea of what I am talking about: (define (ParentFunction x y z) (process for i from x to y by z sprout (SproutedFunction i) wait ?????)) I could rewrite ParentFunction to include all the code from SproutedFunction but that seems silly... not to mention very bad functional programming. There must be a way to pass the duration info back from SproutedFunction. From b0ef at esben-stien.name Fri Jun 22 11:25:57 2007 From: b0ef at esben-stien.name (Esben Stien) Date: Fri, 22 Jun 2007 20:25:57 +0200 Subject: [CM] Loop Between Marks (Snd-8.10) In-Reply-To: <87ps6ocabg.fsf@esben-stien.name> (Esben Stien's message of "Sun, 01 Apr 2007 18:45:55 +0200") References: <87vegmgsqm.fsf@esben-stien.name> <87ps6ocabg.fsf@esben-stien.name> Message-ID: <87645f977u.fsf@esben-stien.name> Esben Stien writes: > I'm not getting this to loop no matter what I do;). Well, I was using named marks, but it seems this function wants numeric args. Why not have a function where one can use named marks?. Is there a function that returns the numeric ID of a named mark?. -- Esben Stien is b0ef at e s a http://www. s t n m irc://irc. b - i . e/%23contact sip:b0ef@ e e jid:b0ef@ n n From bil at ccrma.Stanford.EDU Fri Jun 22 09:51:06 2007 From: bil at ccrma.Stanford.EDU (Bill Schottstaedt) Date: Fri, 22 Jun 2007 09:51:06 -0700 Subject: [CM] Loop Between Marks (Snd-8.10) In-Reply-To: <87645f977u.fsf@esben-stien.name> References: <87vegmgsqm.fsf@esben-stien.name> <87ps6ocabg.fsf@esben-stien.name> <87645f977u.fsf@esben-stien.name> Message-ID: <20070622165042.M12540@ccrma.Stanford.EDU> > Is there a function that returns the numeric ID of a named > mark?. see find-mark or mark-name->id (marks.scm). From b0ef at esben-stien.name Fri Jun 22 11:44:14 2007 From: b0ef at esben-stien.name (Esben Stien) Date: Fri, 22 Jun 2007 20:44:14 +0200 Subject: [CM] Output Sample Rate According to JACK Message-ID: <87y7ib7rsx.fsf@esben-stien.name> In the config, I'm allowed to do: (set! (default-output-srate) 48000) , even when I'm running JACK. This is not sensible when running JACK. I had terrible dropouts because this line somehow got in there and it makes no sense to use it with JACK. It means Snd would resample first to 48000 and then back to 96000, somehow. -- Esben Stien is b0ef at e s a http://www. s t n m irc://irc. b - i . e/%23contact sip:b0ef@ e e jid:b0ef@ n n From b0ef at esben-stien.name Fri Jun 22 11:50:38 2007 From: b0ef at esben-stien.name (Esben Stien) Date: Fri, 22 Jun 2007 20:50:38 +0200 Subject: [CM] Cursor Movement Message-ID: <87r6o37ri9.fsf@esben-stien.name> If the cursor is in the mini buffer, is there any way to move it to the wave form view without using the mouse?. Also, if the cursor is in the listener, how can I move it to the wave form view without the mouse?. -- Esben Stien is b0ef at e s a http://www. s t n m irc://irc. b - i . e/%23contact sip:b0ef@ e e jid:b0ef@ n n From k.s.matheussen at notam02.no Fri Jun 22 10:09:03 2007 From: k.s.matheussen at notam02.no (Kjetil S. Matheussen) Date: Fri, 22 Jun 2007 19:09:03 +0200 (CEST) Subject: [CM] Cursor Movement In-Reply-To: <87r6o37ri9.fsf@esben-stien.name> References: <87r6o37ri9.fsf@esben-stien.name> Message-ID: On Fri, 22 Jun 2007, Esben Stien wrote: > If the cursor is in the mini buffer, is there any way to move it to > the wave form view without using the mouse?. > Do you mean keyboard focus? Something like this: (focus-widget (car (channel-widgets (selected-sound) 0))) > Also, if the cursor is in the listener, how can I move it to the wave > form view without the mouse?. > The same way. From b0ef at esben-stien.name Fri Jun 22 12:05:31 2007 From: b0ef at esben-stien.name (Esben Stien) Date: Fri, 22 Jun 2007 21:05:31 +0200 Subject: [CM] Real Time Safe (Snd-9.1) Message-ID: <87645f7qtg.fsf@esben-stien.name> Are there any plans to only make the audio thread real time?. I'm getting some weird crackling noises when I fast switching between windows and such, which seems related. -- Esben Stien is b0ef at e s a http://www. s t n m irc://irc. b - i . e/%23contact sip:b0ef@ e e jid:b0ef@ n n From b0ef at esben-stien.name Fri Jun 22 12:07:57 2007 From: b0ef at esben-stien.name (Esben Stien) Date: Fri, 22 Jun 2007 21:07:57 +0200 Subject: [CM] Moving Mark in Active Loop Between Marks Function Cause Freeze (Snd-9.1) Message-ID: <871wg37qpe.fsf@esben-stien.name> I've defined two marks, then I use the loop-between-marks function to loop play between these marks. If I click and drag one of the marks with the mouse while the loop is playing, Snd freezes and all I can do is kill it. -- Esben Stien is b0ef at e s a http://www. s t n m irc://irc. b - i . e/%23contact sip:b0ef@ e e jid:b0ef@ n n From k.s.matheussen at notam02.no Fri Jun 22 10:20:58 2007 From: k.s.matheussen at notam02.no (Kjetil S. Matheussen) Date: Fri, 22 Jun 2007 19:20:58 +0200 (CEST) Subject: [CM] Real Time Safe (Snd-9.1) In-Reply-To: <87645f7qtg.fsf@esben-stien.name> References: <87645f7qtg.fsf@esben-stien.name> Message-ID: On Fri, 22 Jun 2007, Esben Stien wrote: > Are there any plans to only make the audio thread real time?. I'm > getting some weird crackling noises when I fast switching between > windows and such, which seems related. > If you load rt-player.scm you will have a real time audio thread. From akopec at chopin.edu.pl Sat Jun 23 02:08:02 2007 From: akopec at chopin.edu.pl (Andrzej Kopec) Date: Sat, 23 Jun 2007 11:08:02 +0200 Subject: [CM] Real Time Safe (Snd-9.1) In-Reply-To: References: <87645f7qtg.fsf@esben-stien.name> <20070622180220.GA4923@localhost.homenett.pl> Message-ID: <20070623090802.GA5134@localhost.homenett.pl> On Sat, Jun 23, 2007 at 07:57:07AM +0200, Kjetil S. Matheussen wrote: > > > On Fri, 22 Jun 2007, Andrzej Kopec wrote: > > > On Fri, Jun 22, 2007 at 07:20:58PM +0200, Kjetil S. Matheussen wrote: > >> > >> > >> On Fri, 22 Jun 2007, Esben Stien wrote: > >> > >>> Are there any plans to only make the audio thread real time?. I'm > >>> getting some weird crackling noises when I fast switching between > >>> windows and such, which seems related. > >>> > >> > >> If you load rt-player.scm you will have a real time audio thread. > >> > > > > how to achieve it with ruby extension language? > > > > I don't think snd supports running both ruby and guile running as extension > languages simultaniously, so I guess you have to rewrite most of the > extension language handling in snd first. :-( I don't want to run a number of languages simultaniously -- of course! But I experienced the problem described above -- when snd redraws its widgets (esp. waveform) when playing sound there appears some crackles. From lievenmoors at hotmail.com Sat Jun 23 03:35:55 2007 From: lievenmoors at hotmail.com (Lieven Moors) Date: Sat, 23 Jun 2007 12:35:55 +0200 Subject: [CM] cm predicate for rhythm-symbol-combinations Message-ID: Is it possible to check wether a certain symbol is valid for the rhythm-parser whithout using rhythm itself?It would be nice to have a predicate for this...greetslieven -------------- next part -------------- An HTML attachment was scrubbed... URL: From b0ef at esben-stien.name Sat Jun 23 08:12:31 2007 From: b0ef at esben-stien.name (Esben Stien) Date: Sat, 23 Jun 2007 17:12:31 +0200 Subject: [CM] Cursor Movement In-Reply-To: (Kjetil S. Matheussen's message of "Fri, 22 Jun 2007 19:09:03 +0200 (CEST)") References: <87r6o37ri9.fsf@esben-stien.name> Message-ID: <87sl8i66xs.fsf@esben-stien.name> "Kjetil S. Matheussen" writes: > (focus-widget (car (channel-widgets (selected-sound) 0))) Excellent;), thanks, but I thought maybe something like this would be bound to a key combination. -- Esben Stien is b0ef at e s a http://www. s t n m irc://irc. b - i . e/%23contact sip:b0ef@ e e jid:b0ef@ n n From johannes.quint at web.de Sat Jun 23 06:54:04 2007 From: johannes.quint at web.de (Johannes Quint) Date: Sat, 23 Jun 2007 15:54:04 +0200 Subject: [CM] cm predicate for rhythm-symbol-combinations In-Reply-To: References: Message-ID: <16D8EF0A-2C0E-4F78-B1C9-B96BEFA139F3@web.de> (defun rhythmp (x) (gethash x *rhythms*)) Am 23.06.2007 um 12:35 schrieb Lieven Moors: > Is it possible to check wether a certain symbol is valid for the > rhythm-parser whithout using rhythm itself? > It would be nice to have a predicate for this... > greets > > lieven _________________________ Johannes Quint Rilkestr.55 D-53225 Bonn 0228 468256 johannes.quint at web.de http://www.johannes-quint.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From b0ef at esben-stien.name Sat Jun 23 08:48:01 2007 From: b0ef at esben-stien.name (Esben Stien) Date: Sat, 23 Jun 2007 17:48:01 +0200 Subject: [CM] Loop Between Marks (Snd-8.10) In-Reply-To: <20070622165042.M12540@ccrma.Stanford.EDU> (Bill Schottstaedt's message of "Fri, 22 Jun 2007 09:51:06 -0700") References: <87vegmgsqm.fsf@esben-stien.name> <87ps6ocabg.fsf@esben-stien.name> <87645f977u.fsf@esben-stien.name> <20070622165042.M12540@ccrma.Stanford.EDU> Message-ID: <87ir9e4qq6.fsf@esben-stien.name> "Bill Schottstaedt" writes: > mark-name->id Thanks;). -- Esben Stien is b0ef at e s a http://www. s t n m irc://irc. b - i . e/%23contact sip:b0ef@ e e jid:b0ef@ n n From b0ef at esben-stien.name Sat Jun 23 08:59:18 2007 From: b0ef at esben-stien.name (Esben Stien) Date: Sat, 23 Jun 2007 17:59:18 +0200 Subject: [CM] Real Time Safe (Snd-9.1) In-Reply-To: (Kjetil S. Matheussen's message of "Fri, 22 Jun 2007 19:20:58 +0200 (CEST)") References: <87645f7qtg.fsf@esben-stien.name> Message-ID: <87ejk24q7d.fsf@esben-stien.name> "Kjetil S. Matheussen" writes: > If you load rt-player.scm you will have a real time audio thread. Yes, running snd-ls now, so I guess that is loaded, but I still get frequent crackles. I also hear distortion when I draw a region with the mouse. I know that the audio thread is real time, but the GUI thread is also real time, even with rt-player.scm loaded, to my understanding. -- Esben Stien is b0ef at e s a http://www. s t n m irc://irc. b - i . e/%23contact sip:b0ef@ e e jid:b0ef@ n n From k.s.matheussen at notam02.no Sat Jun 23 07:29:17 2007 From: k.s.matheussen at notam02.no (Kjetil Svalastog Matheussen) Date: Sat, 23 Jun 2007 16:29:17 +0200 (CEST) Subject: [CM] Real Time Safe (Snd-9.1) In-Reply-To: <87ejk24q7d.fsf@esben-stien.name> References: <87645f7qtg.fsf@esben-stien.name> <87ejk24q7d.fsf@esben-stien.name> Message-ID: On Sat, 23 Jun 2007, Esben Stien wrote: > "Kjetil S. Matheussen" writes: > > > If you load rt-player.scm you will have a real time audio thread. > > Yes, running snd-ls now, so I guess that is loaded, but I still get > frequent crackles. I also hear distortion when I draw a region with > the mouse. I know that the audio thread is real time, but the GUI > thread is also real time, even with rt-player.scm loaded, to my > understanding. > If the gui thread runs with realtime priority, that means that you are using snd's player and not the one in rt-player.scm. If you are only using the player in rt-player.scm, the gui does not run with realtime priority. Besides, the realtime priority of the gui is lower than any of the sound player threads, so its impossible that it can interrupt the sound and cause crackling. What happens is that you are using filtering, the expand function, ladspa plugins, or something else which the rt-player does not handle. Snd's player is used instead when that happens. Either that, or you are not playing using either space, p, or the mouse scroll wheel, which have all been configured to use (rt-snd-play) instead of (play). From renick at gmail.com Sat Jun 23 08:15:24 2007 From: renick at gmail.com (Renick Bell) Date: Sun, 24 Jun 2007 00:15:24 +0900 Subject: [CM] failed when trying to run snd-ls for the first time Message-ID: I just downloaded http://www.notam02.no/arkiv/src/snd/snd-ls-0.9.7.12.tar.gz, built, and installed it. On running the first time, I got the error pasted below. This is on Xubuntu Feisty. Please let me know what other version numbers you would like to know, if any. Thanks for your help. Renick --- Compiling /tmp/fileDcobQ4.c Compiling /tmp/fileWzKibB.c Compiling /tmp/filep0gRq8.c WARNING: (guile-user): `reduce' imported from both (srfi srfi-1) and (ice-9 comm on-list) WARNING: (guile-user): `every' imported from both (srfi srfi-1) and (ice-9 commo n-list) WARNING: (guile-user): `reduce' imported from both (srfi srfi-1) and (ice-9 comm on-list) WARNING: (guile-user): `every' imported from both (srfi srfi-1) and (ice-9 commo n-list) Compiling /tmp/file8gg1oJ.c Compiling /tmp/fileA7uUFo.c Compiling /tmp/file1Q91x5.c Compiling /tmp/file9iYrsN.c Compiling /tmp/fileUqKdxw.c /tmp/fileUqKdxw.c: In function 'jack_port_name_eval_c_helper': /tmp/fileUqKdxw.c:267: warning: initialization discards qualifiers from pointer target type /tmp/fileUqKdxw.c: In function 'jack_port_short_name_eval_c_helper': /tmp/fileUqKdxw.c:276: warning: initialization discards qualifiers from pointer target type /tmp/fileUqKdxw.c: In function 'jack_port_type_eval_c_helper': /tmp/fileUqKdxw.c:294: warning: initialization discards qualifiers from pointer target type Compiling /tmp/fileSMeilj.c Compiling /tmp/fileOood87.c Compiling /tmp/fileUvS15X.c Compiling /tmp/filepMUAeP.c Compiling /tmp/fileVWkg0H.c Compiling /tmp/file1JPBRD.c : starting! Compiling /tmp/fileg1BLlC.c Compiling /tmp/filesasWXD.c Compiling /tmp/fileeOBUhH.c Alsa library loaded. Compiling /tmp/fileOAREqM.c Compiling /tmp/filedDr2mU.c #:RT-Compiler loaded successfully... Compiling /tmp/filerqvyT3.c Compiling /tmp/fileK4lY4g.c (misc-error dynamic-link file: ~S, message: ~S (/tmp/fileK4lY4g.c.so /tmp/fileK4 lY4g.c.so: undefined symbol: rt_readin_tag) #f) Backtrace: In unknown file: ?: 0* [primitive-load-path "rt-player.scm"] In /usr/local/snd-ls/snd-8/rt-player.scm: 219: 1* (definstrument # # # ...) 219: 2 (define (let* (#) (lambda* # # # ...))) In unknown file: ?: 3* (let* (#) (lambda* # # # ...)) ?: 4* (rt-compile (lambda () (declare ( fromdisk num-channels ...)) ... )) ?: 5 [rt-1 (lambda () (declare ( fromdisk num-channels ...)) ...)] ?: 6 (let-optional* lambda*:G514 () ...) ?: 7 (let* () (let* (# #) (let* # #))) ?: 8 (let-keywords* lambda*:G514 #f ...) ?: 9 (let* (# #) (let* # #)) ?: 10 (let* ((engine (cond # #))) (let* () (rt-gensym-reset) ...)) In /usr/local/snd-ls/snd-8/rt-compiler.scm: ... 7488: 11 (let* ((new (rt-2 term))) (hash-set! rt-cached-funcs key new) new) 7488: 12* [rt-2 (lambda () (declare ( fromdisk num-channels ...)) ...)] In unknown file: ?: 13 (let-optional* lambda*:G512 () ...) ?: 14 (let* () (let* (# #) (let* # #))) ?: 15 (let-keywords* lambda*:G512 #f ...) ?: 16 (let* (# #) (let* # #)) ?: 17 (let* ((engine (cond # #))) (let* () (let (# # #) (if # # #)))) ?: 18 (let* () (let (# # #) (if # # #))) In /usr/local/snd-ls/snd-8/rt-compiler.scm: ... 7246: 19 (let* (# # # ...) (apply eval-c-non-macro #) ...) 7421: 20* [apply # References: Message-ID: On Sun, 24 Jun 2007, Renick Bell wrote: > I just downloaded > http://www.notam02.no/arkiv/src/snd/snd-ls-0.9.7.12.tar.gz, built, and > installed it. On running the first time, I got the error pasted below. > This is on Xubuntu Feisty. Please let me know what other version > numbers you would like to know, if any. > Sorry, this is a known problem I haven't had time to look at, and forgot about. Can you try the following? cd /tmp/ wget http://www.notam02.no/~kjetism/rt-compiler.scm.gz gzip -d rt-compiler.scm.gz mv -f rt-compiler.scm /usr/local/snd-ls/snd-8/ rm -fr ~/snd-eval-c-cache/* /usr/local/bin/snd-ls Hopefully this will make snd-ls segfault instead of failing. If it does, there is probably a scheme order-of-evaluation bug in rt-compiler.scm, which I should be able to fix. From renick at gmail.com Sun Jun 24 07:56:59 2007 From: renick at gmail.com (Renick Bell) Date: Sun, 24 Jun 2007 23:56:59 +0900 Subject: [CM] Re: failed when trying to run snd-ls for the first time In-Reply-To: References: Message-ID: Thank you for your help. > about. Can you try the following? > > cd /tmp/ > wget http://www.notam02.no/~kjetism/rt-compiler.scm.gz > gzip -d rt-compiler.scm.gz > mv -f rt-compiler.scm /usr/local/snd-ls/snd-8/ > rm -fr ~/snd-eval-c-cache/* > /usr/local/bin/snd-ls I followed the steps you gave, and it launched fine. I did notice this message, though, because I hadn't started jack yet: SND is currently not using jack, so the RT-Player is not initialized. Previously, I hadn't tried it without jack. I don't know if, prior to the changes you asked me to make, it would have run if I hadn't started jack. Thinking that I want to play with the RT-Player (from limited experience with snd-ls on a previous Gentoo install), I closed snd-ls and started jack. Then I tried running snd-ls again. I then received this error: Linking /home/renick/snd-eval-c-cache/cache.FGxJXP.so Linking /home/renick/snd-eval-c-cache/cache.UcppMm.so Linking /home/renick/snd-eval-c-cache/cache.olUZWU.so WARNING: (guile-user): `every' imported from both (srfi srfi-1) and (ice-9 common-list) WARNING: (guile-user): `reduce' imported from both (srfi srfi-1) and (ice-9 common-list) WARNING: (guile-user): `every' imported from both (srfi srfi-1) and (ice-9 common-list) WARNING: (guile-user): `reduce' imported from both (srfi srfi-1) and (ice-9 common-list) Linking /home/renick/snd-eval-c-cache/cache.uYnyEy.so Linking /home/renick/snd-eval-c-cache/cache.bt5g5e.so Linking /home/renick/snd-eval-c-cache/cache.4UVp4M.so Linking /home/renick/snd-eval-c-cache/cache.LtanOE.so Linking /home/renick/snd-eval-c-cache/cache.UlfySp.so Linking /home/renick/snd-eval-c-cache/cache.jd1mAd.so Linking /home/renick/snd-eval-c-cache/cache.wAfn52.so Linking /home/renick/snd-eval-c-cache/cache.lcKVCT.so Linking /home/renick/snd-eval-c-cache/cache.uTBlrL.so Linking /home/renick/snd-eval-c-cache/cache.LpNSIF.so Linking /home/renick/snd-eval-c-cache/cache.25QeCC.so : starting! Linking /home/renick/snd-eval-c-cache/cache.WODWXC.so Compiling /tmp/file4PG6C9.c (misc-error dynamic-link file: ~S, message: ~S (/tmp/file4PG6C9.c.so /tmp/file4PG6C9.c.so: undefined symbol: rt_readin_tag) #f) Backtrace: In unknown file: ?: 0* [primitive-load-path "rt-compiler.scm"] In /usr/local/snd-ls/snd-8/rt-compiler.scm: 4709: 1* (eval-c # "#include " "#include " ...) 4709: 2 (if (not #) (eval-c-cache-it # # #)) In unknown file: ?: 3 [eval-c-cache-it "-I/usr/local/snd-ls/snd-8 `pkg-config --libs sndfile`" ... ... ?: 4* [eval-c-eval # ...] ?: 5 (let-optional* codestrings () ...) ?: 6 (let* () (let* (# #) (let* # #))) ?: 7 (let-keywords* codestrings #f ...) ?: 8 (let* (# #) (let* # #)) ?: 9 (let* ((compile-options #)) (let* () (let* # # # ...))) ?: 10 (let* () (let* (# # # # ...) (if # #) (for-each # #) ...)) In /usr/local/snd-ls/snd-8/eval-c.scm: 1718: 11 (let* (# # # # ...) (if # #) (for-each # #) ...) 1755: 12* [dynamic-call "das_init" ... 1755: 13* [dynamic-link "/tmp/file4PG6C9.c.so"] ERROR! Snd-ls did not start correctly. Please report this bug to k.s.matheussen at notam02.no and bil at ccrma.stanford.edu (and please include the terminal output in the mail, Thanks.) -> destructor Some deprecated features have been used. Set the environment variable GUILE_WARN_DEPRECATED to "detailed" and rerun the program to get more information. Set it to "no" to suppress this message. I'm looking forward to working snd-ls again. Renick -- Renick Bell http://the3rd2nd.com From b0ef at esben-stien.name Sun Jun 24 13:38:02 2007 From: b0ef at esben-stien.name (Esben Stien) Date: Sun, 24 Jun 2007 22:38:02 +0200 Subject: [CM] Real Time Safe (Snd-9.1) In-Reply-To: (Kjetil Svalastog Matheussen's message of "Sat, 23 Jun 2007 16:29:17 +0200 (CEST)") References: <87645f7qtg.fsf@esben-stien.name> <87ejk24q7d.fsf@esben-stien.name> Message-ID: <873b0h3x79.fsf@esben-stien.name> Kjetil Svalastog Matheussen writes: > Either that, or you are not playing using either space, p, or the > mouse scroll wheel, which have all been configured to use > (rt-snd-play) instead of (play). I've always used C-q to play and C-g to stop, so I guess these functions does not use rt-snd-play, then. -- Esben Stien is b0ef at e s a http://www. s t n m irc://irc. b - i . e/%23contact sip:b0ef@ e e jid:b0ef@ n n From b0ef at esben-stien.name Sun Jun 24 15:34:07 2007 From: b0ef at esben-stien.name (Esben Stien) Date: Mon, 25 Jun 2007 00:34:07 +0200 Subject: [CM] Moving Mark in Active Loop Between Marks Function Cause Freeze (Snd-9.1) In-Reply-To: <871wg37qpe.fsf@esben-stien.name> (Esben Stien's message of "Fri, 22 Jun 2007 21:07:57 +0200") References: <871wg37qpe.fsf@esben-stien.name> Message-ID: <87sl8h2d9c.fsf@esben-stien.name> Esben Stien writes: > Snd freezes Is this not possible?. My plan was to bind marks to MIDI increment/decrement so that I could use the MIDI controller to find perfect loops. -- Esben Stien is b0ef at e s a http://www. s t n m irc://irc. b - i . e/%23contact sip:b0ef@ e e jid:b0ef@ n n From whatalltheshoutingsabout at gmail.com Sun Jun 24 16:09:40 2007 From: whatalltheshoutingsabout at gmail.com (First Last) Date: Sun, 24 Jun 2007 19:09:40 -0400 Subject: [CM] play-pats Message-ID: <65f539c80706241609w35377993q5a406c0f59f4299b@mail.gmail.com> Would appreciate any help... When attempting to run the following code from Notes from the Metalevel's dictionary: CM> (define (play-pats pats trope reps rate) (process with dur = (* rate 2.5) repeat reps for len = (pick 8 12 16) for pat = (make-instance (next pats) :keynums trope :for len) each k in (next pat #t) as x from 0 by rate output (new midi :time (+ (now) x) :keynum k :duration dur) wait (* rate len))) ;;; a pattern of pattern class names (define pcns (new weighting :of '((heap :weight 2) line cycle palindrome rotation))) , I receive the following error: LOOP ERROR: 'each' does not support initializations. clause context: 'EACH K IN (NEXT PAT T)' Anyone? -------------- next part -------------- An HTML attachment was scrubbed... URL: From k.s.matheussen at notam02.no Mon Jun 25 01:32:02 2007 From: k.s.matheussen at notam02.no (Kjetil S. Matheussen) Date: Mon, 25 Jun 2007 10:32:02 +0200 (CEST) Subject: [CM] Re: failed when trying to run snd-ls for the first time In-Reply-To: References: Message-ID: On Sun, 24 Jun 2007, Renick Bell wrote: > Thank you for your help. > >> about. Can you try the following? >> >> cd /tmp/ >> wget http://www.notam02.no/~kjetism/rt-compiler.scm.gz >> gzip -d rt-compiler.scm.gz >> mv -f rt-compiler.scm /usr/local/snd-ls/snd-8/ >> rm -fr ~/snd-eval-c-cache/* >> /usr/local/bin/snd-ls > > I followed the steps you gave, and it launched fine. I did notice this > message, though, because I hadn't started jack yet: > Yes, the problem is only there when running jack. > Thinking that I want to play with the RT-Player (from limited > experience with snd-ls on a previous Gentoo install), I closed snd-ls > and started jack. Then I tried running snd-ls again. I then received > this error: > Its the same error as before. :-( Can you try: rm -fr ~/snd-eval-c-cache/* export CFLAGS='-Wl,--whole-archive' /usr/local/bin/snd-ls ? (I'm just guessing now. I have no idea whats happening.) From bil at ccrma.Stanford.EDU Mon Jun 25 06:01:44 2007 From: bil at ccrma.Stanford.EDU (Bill Schottstaedt) Date: Mon, 25 Jun 2007 06:01:44 -0700 Subject: [CM] Moving Mark in Active Loop Between Marks Function Cause Freeze (Snd-9.1) In-Reply-To: <87sl8h2d9c.fsf@esben-stien.name> References: <871wg37qpe.fsf@esben-stien.name> <87sl8h2d9c.fsf@esben-stien.name> Message-ID: <467FBCB8.1030803@ccrma> As I said earlier, I can't reproduce this problem. From landspeedrecord at gmail.com Tue Jun 26 16:20:26 2007 From: landspeedrecord at gmail.com (Landspeedrecord) Date: Tue, 26 Jun 2007 19:20:26 -0400 Subject: [CM] play-pats In-Reply-To: <65f539c80706241609w35377993q5a406c0f59f4299b@mail.gmail.com> References: <65f539c80706241609w35377993q5a406c0f59f4299b@mail.gmail.com> Message-ID: I couldn't run the code you are quoting from the common music dictionary either. However, I think this will fix your problem: (define (play-pats pats trope reps rate) (process with dur = (* rate 2.5) repeat reps for len = (pick 8 12 16) for pat = (make-instance (next pats) :keynums trope :for len) do (loop for k in (next pat #t) for x from 0 by rate do (output (new midi :time (+ (now) x) :keynum k :duration dur))) wait (* rate len))) I don't know why but Common Music doesn't seem to like "each k in (next pat #t) as x from 0 by rate". It is the "as x..." part that is causing the problem. You can work around it using the fact that: "each i in some-list output ..." is equivalent to "do (loop for i in some-list do (output ...))" FWIW the next statement following the one you are quoting is missing a closing parenthesis. It should be: (define pcns (new weighting :of '((heap :weight 2) line cycle palindrome rotation))) From mike at fth-devel.org Tue Jun 26 15:10:55 2007 From: mike at fth-devel.org (Michael Scholz) Date: Wed, 27 Jun 2007 00:10:55 +0200 Subject: [CM] FTH v1.1.0 Message-ID: <86tzsu74eo.fsf@pumpkin.fth-devel.net> Finally, after two month of distraction, a new domain name is born, FTH-DEVEL.NET, and a new version of FTH is available. You can download FTH from http://sourceforge.net/projects/fth/ ftp://ftp.fth-devel.net/pub/fth/ or you can cvs it from anonymous at fth.cvs.sourceforge.net:/cvsroot/fth The new download location FTP.FTH-DEVEL.NET contains all previous tar files and has a symbolic link `fth-latest.tar.gz|bz2' to the latest FTH tarball. The latest tarball is not necessary the same like on sourceforge. I will update tarballs on SF only with new version numbers, intermediate new tarballs can only be found on ftp.fth-devel.net. Charles Turner was so kind to provide space for a fth-related mailing list. You may find information about the list at: http://lists.earforth.org/listinfo.cgi/fth-dev-earforth.org FTH additions, changes and bug fixes include: - several new command line options for the interpreter fth - socket word names are prepended by net- to prevent name clashes - most ficl primitives have now online help - GNU Readline and GNU History interface words added - ANS additions Sincerely, Mike From josepadovani at yahoo.com.br Thu Jun 28 07:40:24 2007 From: josepadovani at yahoo.com.br (padovani) Date: Thu, 28 Jun 2007 11:40:24 -0300 Subject: [CM] CSH needed while trying examples of "notes from metalevel" (Cap. 12) Message-ID: <4683C858.3060203@yahoo.com.br> Hi, I'm learning CM... I've installed CM on an Ubuntu-Studio (Feisty) system. I'm running it with Xemacs, SLIME and SBCL... I had successfully evaluated that line: in the section "Interaction 2: Generating a MIDI event to a MIDI file." (pg.105-107 of the book) I had successfully evaluated this line: (define one (new midi :time 0 :keynum 60 :duration 2)) But when I try to send the events to a mid file with (events one "myscore.mid") I get this error: no such program: "/bin/csh" [Condition of type SIMPLE-ERROR] Well... it seems it is configures to use csh. Could I configure it to use bash? Where and how? Tx. From andersvi at extern.uio.no Thu Jun 28 12:13:10 2007 From: andersvi at extern.uio.no (andersvi at extern.uio.no) Date: Thu, 28 Jun 2007 21:13:10 +0200 Subject: [CM] CSH needed while trying examples of "notes from metalevel" (Cap. 12) In-Reply-To: <4683C858.3060203@yahoo.com.br> (padovani's message of "Thu\, 28 Jun 2007 11\:40\:24 -0300") References: <4683C858.3060203@yahoo.com.br> Message-ID: '/bin/csh' is the default shell invoked by the #'shell-command. I think you can safely change it to '/bin/bash' - either in your ~/.cminit.lisp file or down in src/sbcl.lisp: (defun shell (cmd &key (wait t) (output t)) (sb-ext:run-program "/bin/bash" (list "-c" cmd) :output output :wait wait)) Rick, Fernando, Kjetil - isn't /bin/bash a safer shell to put in there nowadays? -anders >>>>> "p" == padovani writes: p> Hi, I'm learning CM... I've installed CM on an Ubuntu-Studio p> (Feisty) system. I'm running it with Xemacs, SLIME and p> SBCL... I had successfully evaluated that line: p> in the section "Interaction 2: Generating a MIDI event to a p> MIDI file." (pg.105-107 of the book) I had successfully p> evaluated this line: p> (define one (new midi :time 0 :keynum 60 :duration 2)) p> But when I try to send the events to a mid file with p> (events one "myscore.mid") p> I get this error: p> no such program: "/bin/csh" [Condition of type SIMPLE-ERROR] p> Well... it seems it is configures to use csh. Could I configure p> it to use bash? Where and how? From josepadovani at yahoo.com.br Thu Jun 28 18:34:21 2007 From: josepadovani at yahoo.com.br (padovani) Date: Thu, 28 Jun 2007 22:34:21 -0300 Subject: [CM] "notes from metalevel" (Cap. 12) - Mixing objects - ERROR In-Reply-To: References: <4683C858.3060203@yahoo.com.br> Message-ID: <4684619D.4040205@yahoo.com.br> So, now I'm trying to evaluate the Mixing objects code: (define (strums key1 key2 rate dur amp) (let ((step (if (< key2 key1) -1 1)) (diff (abs (- key1 key2)))) (loop repeat (+ diff 1) for key from key1 by step for beg from 0 by rate collect (new midi :time beg :duration dur :amplitude amp :keynum key)))) but, in SBCL, the "-1" in the second line gives an error in SBCL: ;;;; (pwd) ... ;;;; (define (strums key1 key2 rate dur amp) (let ((step (if (< ... ; in: LAMBDA NIL ; (IF (< CM::KEY2 CM::KEY1) -1 1) ; ==> ; -1 ; ; caught WARNING: ; This is not a (OR (SINGLE-FLOAT (0.0)) (DOUBLE-FLOAT (0.0d0)) (RATIONAL (0))): ; -1 ; See also: ; The SBCL Manual, Node "Handling of Types" ; ; compilation unit finished ; caught 1 WARNING condition andersvi at extern.uio.no escreveu: > '/bin/csh' is the default shell invoked by the #'shell-command. I > think you can safely change it to '/bin/bash' - either in your > ~/.cminit.lisp file or down in src/sbcl.lisp: > > (defun shell (cmd &key (wait t) (output t)) > (sb-ext:run-program "/bin/bash" (list "-c" cmd) > :output output :wait wait)) > > > Rick, Fernando, Kjetil - isn't /bin/bash a safer shell to put in there > nowadays? > > -anders > >>>>>> "p" == padovani writes: >>>>>> > > p> Hi, I'm learning CM... I've installed CM on an Ubuntu-Studio > p> (Feisty) system. I'm running it with Xemacs, SLIME and > p> SBCL... I had successfully evaluated that line: > > p> in the section "Interaction 2: Generating a MIDI event to a > p> MIDI file." (pg.105-107 of the book) I had successfully > p> evaluated this line: > > p> (define one (new midi :time 0 :keynum 60 :duration 2)) > > p> But when I try to send the events to a mid file with > > p> (events one "myscore.mid") > > p> I get this error: > > p> no such program: "/bin/csh" [Condition of type SIMPLE-ERROR] > > p> Well... it seems it is configures to use csh. Could I configure > p> it to use bash? Where and how? > > > From andersvi at extern.uio.no Fri Jun 29 02:27:11 2007 From: andersvi at extern.uio.no (andersvi at extern.uio.no) Date: 29 Jun 2007 11:27:11 +0200 Subject: [CM] "notes from metalevel" (Cap. 12) - Mixing objects - ERROR In-Reply-To: <4684619D.4040205@yahoo.com.br> References: <4683C858.3060203@yahoo.com.br> <4684619D.4040205@yahoo.com.br> Message-ID: The code concering the arithmetic-up or arithmetic-downfrom in the example is wrong. You can make it function with something like this: for key = key1 then (+ key step) >>>>> "p" == padovani writes: p> So, now I'm trying to evaluate the Mixing objects code: p> (define (strums key1 key2 rate dur amp) p> (let ((step (if (< key2 key1) -1 1)) p> (diff (abs (- key1 key2)))) p> (loop repeat (+ diff 1) p> for key from key1 by step p> for beg from 0 by rate p> collect (new midi :time beg p> :duration dur p> :amplitude amp p> :keynum key)))) p> but, in SBCL, the "-1" in the second line gives an error in SBCL: p> ;;;; (pwd) ... p> ;;;; (define (strums key1 key2 rate dur amp) (let ((step (if (< ... p> ; in: LAMBDA NIL p> ; (IF (< CM::KEY2 CM::KEY1) -1 1) p> ; ==> p> ; -1 p> ; p> ; caught WARNING: p> ; This is not a (OR (SINGLE-FLOAT (0.0)) (DOUBLE-FLOAT (0.0d0)) p> (RATIONAL (0))): p> ; -1 p> ; See also: p> ; The SBCL Manual, Node "Handling of Types" p> ; p> ; compilation unit finished p> ; caught 1 WARNING condition -- Plato: Music is the movement of sound to reach the soul for the education of its virtue.