How to use MMA with Windows Mobile

Thanks to Igor Kaplan, here are some points to get MMA running on a pocket PC or mobile phone running Windows Mobile. These instructions assume that you have already installed MMA on a Windows or Linux PC.

  1. Download and install pythonce from http://sourceforge.net/projects/pythonce.

  2. Copy the mma folder from the PC to the root of the pocketPC so the following folders will be created:

  3. Since the PocketPC does not have a command prompt the following wrapper script is needed to run it:
      import sys
      sys.argv.append(r'\mma\music.txt')
      # The following line will create output midi in the midi directory on
      # the storage card
      sys.argv.append('-f \\SD Card\midi\\music.mid')
      execfile(r'\mma\mma.py')
    

    More MMA command line arguments could be used, just append them to the sys.argv before or after existing sys.argv.append line. I suggest to use music.txt instead of music.mma file since it is easier to edit it by tapping on it which will call the default text editor on the pocketpc ... mma extensions are not registered so there would be some problems to open it. It is probably possible to register them, so far I am not sure how to do it.

  4. Now all MMA code will go to the music.txt file in the /mma directory. Create that file and put some music there! After it is done, run the wrapper script by tapping it from file explorer or by creating the shortcut on the \windows\Start menu. Since windowsce does not have a concept of current directory, pythonce sets the current directory to be the location of .py source file, so storing mma_wrapper.py in the same folder with music.txt file will work just fine.

This is the simplest configuration, however would be possible to make things more complicated and more organized! For example, make sure all mma sources are stored in some source directory instead of being in \mma, however it might involve some modifications of mma.py to put \mma to the sys.path or creating more a complex MMA wrapper script which will copy the mma source file into \mma before running mma.py.

Also I have not tried, however it should be possible to recreate the Unix directory structure for MMA. Create \usr\shared directory and put mma directory it under it. This way mma.py script will not need any modifications and will run just fine even if source files are in different directory then mma.py itself.

Well, installation and configuration under Windows Mobile is not as straight forward as under PC windows or under Unix, however the result is a completely portable music creation system which is always with you!

Thanks Igor!