Full manual page is placed here: http://sqlitestudio.pl/tclmod/docs/Tclmod.html


Some examples.Simply playing modules is pretty easy:
package require Tclmod set mod [::tclmod::player load music.mod] ::tclmod::player start $modand here is little more advanced code, which builds a simple GUI module player:
package require Tk package require Tclmod wm title . "Modules player" entry .module -textvariable mod -width 50 -state disabled -bd 1 button .browse -text "Browse" -bd 1 -command { set types { {{Module} {.mod .s3m .xm .it .669 .apun .dsm .far .amf .gdm .imf .med .mtm .okt .stm .stx .ult .uni}} } set mod [tk_getOpenFile -filetypes $types \ -title "Choose module file"] .module configure -state normal .module configure -state disabled if {[info exists module]} { ::tclmod::player stop ::tclmod::player unload $module } set module [::tclmod::player load $mod] } button .play -text "Play!" -bd 1 -command { if {[info exists module]} { ::tclmod::player start $module } } button .stop -text "Stop" -bd 1 -command {::tclmod::player stop} grid .module -column 0 -row 0 -sticky we -columnspan 3 grid .browse -column 3 -row 0 grid .play -column 2 -row 1 -sticky we grid .stop -column 3 -row 1 -sticky we
Known bugs
- Loading several modules at the same time and trying to playback any one but the last one causes an application crash - it's also a libmikmod bug (I've sent notice to authors).
DKF: They (modules) originated on the Amiga, and are basically like a combination of a MIDI instrument bank (sample set) and a MIDI file in one. (Well, the formats are completely different, but they are conceptually very similar). The formats are very good at representing complex pieces of instrumental music, but are really quite hostile to "consumer" use. They've fallen a lot out of favour due to being used a lot for doing knock-offs of copyrighted music, even though that was usually a really poor use of the format's power.GPS: There are lots of unique artists too. The scene is rather interesting. It's like a subculture that flourishes on IRC and elsewhere. An archive I like is http://www.modarchive.com/

LV Any thought to the flip side - updating Snack or whatever so that one could create modules from Tcl? And what about some code to convert between MP3 and other popular formats to the .mod format?Googie Firstly I was trying to mix this extension with snack package, but the fact is that music modules works more like MIDI files, than typical audio files (such as mp3, wav). These are two completly different ideas. Converting from modules to wav files can be done - just use [tclmod::driver set 4] (where 4th driver is Wav disk writer (music.wav) v1.2 for me, see [tclmod::driver info] for list of drivers). Converting from wav to modules is impossible, at least for now and I think that it will never be possible.LV Okay, I can understand what you are saying. Is there a way via Tclmod to create new mod files?Googie No, because libmikmod doesn't support this. Only playback is supported.DKF: Just noting that you could reasonably claim that converting from a WAV to a MOD is an interesting AI problem...Googie: I don't get what you mean, hm?