Views

MikModule

From iPodLinux

Jump to: navigation, search
All modules
Module:
Module: MikModule (mikmodule)
Author: Scott Lawrence  (all modules by Scott Lawrence)
Dependencies: File Browser
Description: A port of the MikMod 3.2.0 music module player to podzilla2.
Rate this Module:

ReleaseNotesBinarySource
1.3More Views, Next/Previous also scrub, it uses system settings for repeat, etc now.   Jan 12 2007zip | tar.gz | tar.bz2source tar.gz
1.2User input cleaned up, lots of "views" added, bugfixes for bad-files in playlists, etc.   Jan 10 2007zip | tar.gz | tar.bz2source tar.gz
1.1Added volume and pan bar displays, cleaned up the build process.   Jan 08 2007zip | tar.gz | tar.bz2source tar.gz

Contents

MikModule

NOTE: The above release is not the latest version. 1.5 is available below

Mm13 info.png Mm13 voices.png Mm13 volstherm.png Mm13 volsrnbo.png

Various views of song playback. "Information", "Voice/Sample playback", "Volumes+Theremin", "Rainbow Volumes".

(For the "theremin" display, the horziontal is pan position, the vertical is frequency, and the diameter is the volume.)

Here's the current version in action: http://umlautllama.com/rand/mikmodule-r55-src.zip

Here's an older version in action: http://umlautllama.com/tmp/mikmodule13_b_4ch.mov http://umlautllama.com/tmp/mikmodule13_panning.mov

There are more recent pictures of the current work in progress here on BleuLlama's webpages.


About

This module is a port of the MikMod 3.2.0 "Music Module" playing engine to Podzilla2. It has a basic playlist handler, browser launcher, and a nice display.

This currently supports all of the Music Module formats that MikMod supports including: 669, AMF, ASY, DSM, FAR, GDM, IMF, IT, M15, MED, MOD, MTM, OKT, S3M, STM, STX, ULT, UNI, and XM. It also supports custom playlists, like the old MikModPodzilla. These playlists need to have a "MIK", "TXT", or "M3U" file extension, and can also be launched from the file browser in normal and shuffle order.

MikModule also adds an item to podzilla2's "Settings" menu which lets you adjust:

  • Fadeout - songs fadeout at the end - nice for playlists
  • Loops - allow internal song looping
  • Panning - allow mods to set panning, useful to disable for "9fingers.mod", etc
  • Protracker - enable Protracker compaitbility mode
  • Separation - Makes non-panning modules sound better, but less accurate. This only affects 4 channel files.
  • Subdirs - When loading a directory as a playlist, go down into subdirectories?
  • Full Screen - Display the podzilla title bar or not
  • Scootching - adjust the range of the view based on the song playing.

DOWNLOADS

Until the website is fixed, here is a manual download:


See below for a proper changelog.


Using MikModule

To start MikModule, launch a playlist, file, or directory from the file browser. This will bring you to the MikModule screen, on the last "view" that you were using. The views change how the song data and information are displayed to you. Screenshots to come soon.

Press the center button to toggle the wheel mode.

  • Idle Mode - after a few seconds delay in the other modes, it drops back to this.
  • Volume Mode - The wheel adjusts the volume of the song
  • Scrub Mode - The wheel adjusts the position in the current song
  • View Mode - The wheel changes the view.
  • The Menu button will exit back to the file browser
  • The Play/Pause button will play or pause the song
  • The "next" and "previous" track buttons will go to the next or previous track in the playlist
  • pressing and holding "next" and "previous" will start scrubbing through the track
  • The Hold switch will disable user input


Playlists

The playlist files need to have one song filename per line, and can have comments using a pound sign "#". ie:

# an example .mik playlist
mods/u4ia/gocryogo.mod
mods/u4ia/sampledannie.mod
mods/demo/dragonsfunk.mod
mods/spieg/jewel.xm

File paths can either be absolute pathnames, or relative from the directory that the playlist file is in.

With 1.4, a bunch of directories on your ipod will be searched for .mik files (or directory symlinks named with .mik) and will be put into your "Music" directory in podzilla including:

/               /mods           /mods/playlists
/music          /music/mods     /music/playlists
/mnt            /mnt/mods       /mnt/mods/playlists
/mnt/music      /mnt/music/mods /mnt/music/playlists
/music/mods/playlists   /mnt/music/mods/playlists

If all of your mods are in /mods, you can do something like this to get a single playlist, launchable from the menu:

cd (your ipod's root)
cd mods/
ln -s . All_Mods.mik


Known Issues

  • some larger song files (1.5mb or greater) might not load properly
  • Volume adjustments can be a little laggy.
  • high-channel, high intensity mods (eg. spieg-jewel.xm) might "take over" the system while playing back. The MikMod render loop sucks down all the CPU time, disallowing the GUI to update. (This mod for example on 4g or NANO, when it gets to the 28 channel section plays back the audio fine, but does not update the GUI often )

On the other hand, a 7.5mb mod with 53 voices loads and mostly plays (littleli.it), but takes about 45 seconds to load on an iPod Nano.


Future

Things I'd like to do with this in the future;

  • display the playlist, letting the user select which song to play
  • background play (how would this interact with MPD?)

Changelist

  • Release 1.5: 2007-Nov-25 r55
    • Bugfix:
      • numitems in render.c was incorrect - now just compute it
      • fixed a bunch of potential memory issues
    • Render:
      • Render item text is expanded a little
      • songpos circles are now rects to speed up things
      • square dots instead of rects, to speed things up on the pod
      • softened the corners of the squares
      • rewrote the managing render function to be a struct of structs
      • added peaks, with peakcolors as a param
      • rewrote pandots to be color-coded, pretty
      • rewrote voice view from scratch. should be faster
    • Views:
      • Kittbars, with brightness background
      • DANCING TUXES!
      • vertical frequency dots
      • Colorshift


  • Release 1.4: 2007-Nov-20 r35
    • Playlists/Directory Scanning:
      • Playlists can have relative or absolute pathnames in them
      • Added a playlist file scanner - adds entries to the Music menu looks for .mik in various directories (see above)
      • Added SymPlaylists - make a symlink.mik to a directory
      • fixed false positive file OK with directories named XM, etc
      • Errors:
      • Added better error reporting for failed files
      • Added better error reporting for failed playlists/directories
      • Added auto-quit on >8 consecutive load errors
      • Setting: Added autodismissal to error boxes
    • Function:
      • Heuristics added. Just one for now:
        • disable panning for the mod "testlast"
      • Volume stepping gets finer at lower volumes for 5.5 hopefully
    • Visuals:
      • Volume icons for the volume slider
      • Setting: color dots/original FG dots
      • Setting: color brightness gain for brightness bars
      • Brightness bars
      • color dots are always playback level
      • voice dots are always waveform amplitude
      • voice dots display on black if color, and are 1/4 screen H
      • Header text cycles info about the track
    • Misc:
      • priority set to VITAL, to eliminate sleeping (sorta)
      • Added support for the Settings menu grouping


Installing

You should be able to just install this as you install any other module... gunzip/untar the module archive file, and throw that in your "/usr/lib" directory on the iPod. (in the EXT or HFS partition).


Building LibMikMod For iPod

If you don't want to build LibMikMod, you don't need to. The ipod binaries for the library are included with the source package.

This works at least on 4g, 5.0g, Nano, probably all other iPods as well.

First of all, to build this, you need to grab the LibMikMod 3.2.0 sources:

http://mikmod.raphnet.net/#files

or

http://mikmod.raphnet.net/files/libmikmod-3.2.0-beta2.tar.gz

Unzip/untar these somewhere.

NOTE: ONLY if you are on OS X, edit the configure file, on line 7738, and change the conditional to:

        if test "`uname`" == "Linux"

This will force the OSS driver to be built. If you're on a linux desktop system, DO NOT DO THAT EDIT. ;)

Now, configure them as such: (this works on linux as well as osx)

CC=arm-uclinux-elf-gcc LDFLAGS="-Wl,-elf2flt -lm" ./configure --host=arm-uclinux-elf --disable-threads --disable-shared --disable-osx --disable-esd --enable-oss

You should see, near the end of the output:

Drivers to be compiled: oss raw wav aiff pipe stdout

"OSS" should be in that list. If it's not, something is wrong.

You can also eliminate the following drivers: raw, wav, aiff, pipe, stdout to save a little bit of space. The details on how to do that are not covered here and are left as an exercise for the reader.

Now, you should be able to just run "make" and it'll build the library.

make

Since the configure script doesn't get the ranlib line right (on OS X at least), you'll need to run the arm-elf version:

arm-elf-ranlib libmikmod/.libs/libmikmod.a

copy that .a file into the module source directory, along with the mikmod.h file in the includes directory from the mikmod source tree.

Now you can build MikModule as you would any other module.


Building LibMikMod for Windows/DOS

Find a good Linux live-cd and install it.

Continue below


Building LibMikMod for OS X and Linux

In order to get this to work on your desktop, you should be able to untar/unzip it as usual, but you will need to pass one parameter to configure:

./configure --disable-shared

NOTE: this might not be necessary, but it worked for me.

Build and install as usual.

If you're on OS X, an alternative method to download, build, and install mikmod/libmikmod is to use the MacPorts package manager to install it for you:

sudo port install mikmod
Toolbox