Common Music problem

From: David Trudgett (dtrudgett_at_holdthespam_yahoo.com)
Date: 02/04/05


Date: Fri, 04 Feb 2005 18:07:11 +1100

Does anyone here know anything about Common Music? I've installed it to
have a bit of a play around, but I'm not getting past the sample code.

Basically, the error I'm getting is:

Error in function FILENAME->IO-CLASS: No file or port class for
"test.midi".

In case that's not specific enough, I include below the sequence of
console operations that brought about the error.

Starting up, I get the following normal console messages:

<cut...>

; Loading
"/usr/local/lib/lisp/cm-2.4.2/bin/cmucl_18e-pre2_linux-i686/clm.x86f"
; Loading
"/usr/local/lib/lisp/cm-2.4.2/bin/cmucl_18e-pre2_linux-i686/clm2.x86f"
; Loading
"/usr/local/lib/lisp/cm-2.4.2/bin/cmucl_18e-pre2_linux-i686/midi1.x86f"
; Loading
"/usr/local/lib/lisp/cm-2.4.2/bin/cmucl_18e-pre2_linux-i686/midi2.x86f"
; Loading
"/usr/local/lib/lisp/cm-2.4.2/bin/cmucl_18e-pre2_linux-i686/midi3.x86f"
; Loading
"/usr/local/lib/lisp/cm-2.4.2/bin/cmucl_18e-pre2_linux-i686/midishare.x86f"
; Loading
"/usr/local/lib/lisp/cm-2.4.2/bin/cmucl_18e-pre2_linux-i686/player.x86f"
; Loading
"/usr/local/lib/lisp/cm-2.4.2/bin/cmucl_18e-pre2_linux-i686/cmn.x86f"
; Garbage collecting.

  /\\\
---\\\---------
----\\\--------
----/\\\------- Common Music 2.4.2
---/--\\\------
--/----\\\-----
  / \\\/

CMU Common Lisp 18e-pre2 2003-03-25-003, running on rr.trudgett
With core: /usr/local/lib/cmucl/lib/lisp.core
Dumped on: Wed, 2003-03-26 10:53:00+11:00 on orion
See <http://www.cons.org/cmucl/> for support information.
Loaded subsystems:
     Python 1.1, target Intel x86
     CLOS 18e (based on PCL September 16 92 PCL (f))
*

After that, I cut and paste some sample code. First this:

(define (sinus len cycl low hi rhy dur amp)
   ;; sinus is a function that creates a process. the process
   ;; will play midi notes in a "sine wave" of cycl periods over
   ;; len number of notes. sin's value (-1 to 1) is rescaled
   ;; to lie between the specified low and hi keynums.
   (process for i below len
            output
            (new midi :time (now)
                 :keynum (rescale (sin (* 2 pi (/ i len) cycl))
                                  -1
                                  1
                                  low
                                  hi)
                 :amplitude amp
                 :duration dur)
            wait rhy))

So far so good. Then I do this:

(sinus 80 4 20 100 .1 .1 .6)

RESPONSE:
#<Interpreted Function "LAMBDA (LEN CYCL LOW HI RHY DUR AMP)" {480D3821}>

That is also as expected, I believe. Now this is the bit that should
have produced an output file, but didn't:

(events (sinus 80 4 20 100 .1 .1 .6) "test.midi")

RESPONSE:
Error in function FILENAME->IO-CLASS: No file or port class for
"test.midi".

Restarts:
   0: [ABORT] Return to Top-Level.

Debug (type H for help)

(FILENAME->IO-CLASS "test.midi")
Source:
; File: /usr/local/lib/lisp/cm-2.4.2/src/io.lisp
(ERROR "No file or port class for ~s." PATH)
0] 0

Thanks for any assistance.

David

-- 
We come here upon what, in a large proportion of cases, forms the
source of the grossest errors of mankind. Men on a lower level of
understanding, when brought into contact with phenomena of a higher
order, instead of making efforts to understand them, to raise
themselves up to the point of view from which they must look at the
subject, judge it from their lower standpoint, and the less they
understand what they are talking about, the more confidently and
unhesitatingly they pass judgment on it.
     -- Leo Tolstoy


Relevant Pages

  • Re: Html download challenge
    ... >> Here is some sample code. ... You will see me loading from 2 urls. ... > Tomcat and got the following: ... > Evidently the Java classes you're using are setting these defaults ...
    (comp.lang.java.programmer)
  • RE: Redirect
    ... Can you provide some sample code that would ... demonstrate loading forms once and reusing them. ... make them singletons and only load them once. ...
    (microsoft.public.pocketpc.developer)
  • problem loading php_gd2.dll php5/apache2.0+
    ... Wondering if anyone can recomend some sample code for dynamically ... I have tried setting the extension dir in php.ini, and loading the GD ... module from there when apache is started, but it won't load. ...
    (comp.lang.php)
  • Re: Parse HTML DOM document in console application
    ... "Charles Law" wrote in message ... thanks for your reply and the sample code. ... the loop: ... I comment out Application.DoEvents, readyState stays "loading". ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Out of Memory Exception on DrawImage
    ... I've had to put aside DrawImage and use lower level GDI calls through inter-op ... to get satisfactory loading and performance, but internal memory use is still ... spite of Bob Powell's dire warnings, creating the Graphics object off this ... creating sub-sections of it and writing them out as ...
    (microsoft.public.dotnet.framework.drawing)