Kara-Moon Forum

Developers & Technology => Musical MIDI Accompaniment (MMA) => Topic started by: CDon on June 29, 2009, 08:13:17 PM



Title: MMA v1.4e for Windows?
Post by: CDon on June 29, 2009, 08:13:17 PM
Is the development version supposed to work under Windows Vista?  Version 1.4 works just fine, but 1.4e consistently gives me an error, claiming an illegal character in the line where the first groove is defined.  Happens with all files.  I don't have it installed at the moment, but I think the illegal character occurs at the first character of the groove name.  The error message is not completely clear about this.  I can reinstall it if need be and give an exact quote...

Don


Title: Re: MMA v1.4e for Windows?
Post by: bvdp on June 29, 2009, 08:46:02 PM
It should work just fine. Kara and I did a bunch of debugging and fixing to get the paths, etc. working properly under XP and Vista (should!) be the same.

The only thing that strikes me right away is that the start "stub", mma.py, has changed. In the test versions it does set up some path stuff.

Could you please verify that you are using the mma.py which comes with 1.4e and test again. Let me know what, exacty, the error message is. I don't have Vista here, but  we'll figure it out. Good timing ... I'm getting real close to a 1.5 release.

Thanks.


Title: Re: MMA v1.4e for Windows?
Post by: bvdp on June 29, 2009, 09:45:36 PM
One further thought. In mma.py there is a line at 59:

if platform == 'Windows':

you might want to verify that vista is being recognized as a "windows". Just insert a line with something like:

   print "got windows"

as a quick test.

Let us know. Thanks.


Title: Re: MMA v1.4e for Windows?
Post by: CDon on June 30, 2009, 07:11:21 PM
I can confirm that Vista is recognized as 'windows' by inserting a print line...  MMA v1.4e mma.py does appear to run ok in that mma -G executes and updates the database.

This is a test file that produces the error:

// v1.4e test file

KeySig C
TimeSig 4 4
Tempo 100


Groove folk

1 C


This is the error message:

Microsoft Windows [Version 6.0.6001]
Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

C:\Users\Don Whitener>cd c:\mma

c:\MMA>mma test.mma
Warning:
        No RC file was found or processed
ERROR:<Line 8><File:test.mma>
     Unable to locate library file 'stdlib♀olk.mma'
Corrupt input file? Illegal character 0x c found.

c:\MMA>

I composed this reply using NotePad, and when saving the text file, NotePad advised that some Unicode characters would be lost saving as ANSI... I suppose the first character of the groove name.

Thanks, and I hope this helps.  I may be out of pocket for a few days if further input is needed.

Don


Title: Re: MMA v1.4e for Windows?
Post by: bvdp on June 30, 2009, 08:26:01 PM
From here it looks like a "bad" character has crept into the file you are processing.

Here's a few things to try:

1. See if the eg files which come with mma work. If they do, then continue to 2. If not, we have a problem. Let me know.

2. Try re-typing the "groove folk" line. Try a different editor. I'm assuming you are using notepad, which should be fine. But, it is quite possible for a "bad" character to get entered by mistake. THe error message you are getting is telling you that a "0x0c" character is in the file. Most likely, you have a "Form Feed" character instead of a "Space". And you'll beat yourself up figuring it out since they both appear as SPACE in your editor.

If all this still doesn't work send me the bad file as an attachment to bob@mellowood.ca.

Please let us know!


Title: Re: MMA v1.4e for Windows?
Post by: bvdp on June 30, 2009, 09:15:36 PM
Interesting all this character business. It appears that python will accept a 0x0C character in linux (converts it to a space), but not in windows.

So, the file the OP has will work on his linux box and crash on windows. Not nice :) Can anyone confirm this?


Title: Re: MMA v1.4e for Windows?
Post by: CDon on July 02, 2009, 08:59:52 PM
The egs files supplied with v1.4e also produce the same type error, with a bad character found at the first character of the first groove name.  I retyped my test file with both NotePad, TextPad, and Context editor.  Retyped, not copy and paste.  All produce the same basic error.  Note also that all of the files process properly with v1.4, but none work with v1.4e.  Same computer.  Most perculiar... Will try to get back in touch tomorrow, but may be a few days... Will email my test file.


Title: Re: MMA v1.4e for Windows?
Post by: bvdp on July 03, 2009, 12:32:43 AM
This was an unfortunate case of "Bob being too smart for himself".

I was using .decode("escape-string") to enable spaces in filenames. But, this translates anything with a '\' to an escape sequence ... so in this case the path sep. for windows, a \, became a BIG problem.

Anyway, all fixed up in 1.4f. Please try this out and let me know.


Title: Re: MMA v1.4e for Windows?
Post by: CDon on July 06, 2009, 08:43:29 PM
Thank you Bob... v1.4f works just fine.


Title: Re: MMA v1.4e for Windows?
Post by: Oren on July 06, 2009, 10:03:10 PM
Thank you Bob... v1.4f works just fine.

Congratulations to both of you... Co-operation: there is no substitute  :-


Title: Re: MMA v1.4e for Windows?
Post by: bvdp on July 07, 2009, 05:44:04 PM
Yeah, that's the great thing about open source software. You get to show the whole world your mistakes. And, hopefully, they chime back with suggestions to make it better :)