CMYKilluminatiNetwork logo

About
Screenshots
Videos
Blog
Forums
Git
Downloads
Documentation
Donate
Contact

Blog

BooBoo's "MML" Music Language Examples

2024-12-28

The best way is to see it in action. You can download the entire audio of Dog-O which includes some samples (some may not be used with MML, but most of the SFX and all the music are MML) here:

Dog-O Audio
(~1 MB)

It's all made by yours truly, this is one of the games I made entirely alone (can you tell? LOL)

You can play these with play_mml, included with BooBoo, without writing any code.

Two useful command line switches to play_mml (and any Shim app) are +freq xxx (audio frequency) and +float-samples to use floating point samples.

In order for play_mml command line app to work, the samples need to be in the same directory as the MML files.

Want an easier way to play the Dog-O Soundtrack? This BooBoo app is a mini soundtrack player. Just double click BooBoo.exe.

Screenshot of Dog-O Soundtrack app

Dog-O Sountrack
(~3 MB)

Here is the code for the Dog-O Soundtrack:

vector mmls
vector files
file_list files
number nfiles
vector_size files nfiles
number i
for i 0 (< i nfiles) 1 check_file
	number matches
	string_matches matches [files i] "mml$"
	if (== TRUE matches) add_it
		string file
		= file [files i]
		string_replace file ".*\\/(.*\\.mml)" "$1"
		vector_add mmls file
	:add_it
:check_file
number size
vector_size mmls size

number font
font_load font "font.ttf" 16 1
number fh
font_height font fh

number selected
= selected 0

number W H
get_screen_size W H

number my_mml
= my_mml -1

function draw
{
	number y
	= y 10

	number i
	for i 0 (< i size) 1 draw_mml_name
		number r g b
		= r 255
		= g 255
		= b 255
		if (== selected i) draw_bar
			= r 0
			= g 0
			= b 0
			filled_rectangle 255 216 0 255 255 216 0 255 255 216 0 255 255 216 0 255 0 y W fh
		:draw_bar
		font_draw font r g b 255 [mmls i] 10 y
		+ y fh
	:draw_mml_name

	font_draw font 255 216 0 255 "Press ENTER to play. Press SPACE to stop." 10 (- 360 fh 10)
}

function event type a b c d
{
	if (== type EVENT_KEY_DOWN) its_a_key
		if (&& (== a KEY_UP) (> selected 0)) dec (&& (== a KEY_DOWN) (< selected (- size 1))) inc
			- selected 1
		:dec
			+ selected 1
		:inc
		if (&& (== a KEY_SPACE) (!= my_mml -1)) stop_it (== a KEY_RETURN) play_it
			mml_stop my_mml
			= my_mml -1
		:stop_it
			if (!= my_mml -1) stop_it2
				mml_stop my_mml
			:stop_it2
			mml_load my_mml [mmls selected]
			mml_play my_mml 1.0 TRUE
		:play_it
	:its_a_key
}

Here is a file list of the Dog-O Soundtrack app. You can see how simple a BooBoo app can be!

.
├── BooBoo.exe
├── SDL2.dll
└── data
    ├── audio
    │   ├── mml
    │   │   ├── battle.mml
    │   │   ├── boss.mml
    │   │   ├── cave2.mml
    │   │   ├── cave3.mml
    │   │   ├── credits.mml
    │   │   ├── end.mml
    │   │   ├── gameover.mml
    │   │   ├── sensei.mml
    │   │   ├── title.mml
    │   │   ├── town.mml
    │   │   ├── underground.mml
    │   │   └── victory.mml
    │   └── samples
    │       ├── clap.flac
    │       ├── hat.flac
    │       ├── kick.flac
    │       └── snare.flac
    ├── gfx
    │   ├── fonts
    │   │   └── font.ttf
    │   └── images
    │       └── misc
    │           ├── icon16.png
    │           ├── icon24.png
    │           ├── icon256.png
    │           └── icon32.png
    └── scripts
        └── main.boo

Image Dump Source Code

2024-12-28

<html>
	<head>
		<title>Image Dump</title>
		<style>
			img {
				max-width: 46%;
				max-height: 200px;
				padding: 5px;
			}
		</style>
	</head>
	<body>
		<h1>Image Dump</h1>
<?php
$files = scandir('/path/to/dump/images/');
foreach ($files as $file) {
	if ($file !== "." && $file !== "..") {
            echo "<a href='images/$file'><img alt='Screenshot/artwork' src='images/$file'></a>\n";
	}
}
?>
		<p>Made with <a href="https://cmykilluminati.net/blog.html#imgdump">imgdump</a>! Go on, take a dump!</p>

	</body>
</html>

Put this in index.php, along with a directory called images with all your images. Rename them to their md5 hash with this:

md5sum * | sed -e 's/\([^ ]*\) \(.*\(\..*\)\)$/mv -v \2 \1\3/e'

Careful! This will rename every file in the current directory to its md5 hash, keeping the extension the same!

Add more images, by running the script on them then copying them to images/. They will be positioned randomly, but always keep the same order of older images.

Go on, take a dump!

Bug Tracker Nightmares

2024-12-27

They're such a nightmare to install and maintain... and cost a fortune if you get someone else to maintain them. I put my 2 Linux boxes on a shelf in the closet. So with quite a bit of trouble I got BugTracker.NET working on a Windows machine on my network, less trouble than anything else was I guess, so that's what I'm using for now. If people want to send me bug reports, send me an email. Because this thing isn't close to securely setup and my ISP doesn't allow port 80/443 anyway.