Jorhlok

Me, my opinion, and things I do.

I made a file format! No app to make them, though.

I made a music file format! It’s to go with my new “virtual sound chip” I made for use in video games what I am/plan to program. The chip has 8 channels which output a 4-bit signal each. Each pulse type has a table of 4-bit samples for each of the 15 possible volume settings (zero is mute and doesn’t need a table). There’s also a table that maps these samples to a 31-bit counter (java doesn’t have unsigned variables) based on the sample length (2-30ish) and pulse width (1/32 to 1/2 or 16/32).

So to make sweet chiptune love with it, I need to make tracks for it. I’m doing it in the style of other trackers such as MilkyTracker, Famitracker, and DefleMask. So I made a text file mapping it out. It looks kind of like this:

#This is a comment.
#Name: Whatevs
#Author: Dude


Pattern 00 {
#Comments in here!
#   N   V W S  FX!
    C:3 F F 00 :::
    ::: B : :: :::
    ::: 7 : :: :::
    --- : : :: :::
    C:3 F F 00 :::
    ::: B : :: :::
    ::: 7 : :: :::
    --- : : :: :::
    C:3 F F 00 :::
    ::: B : :: :::
    ::: 7 : :: :::
    --- : : :: :::
    C:3 F F 00 :::
    ::: B : :: :::
    ::: 7 : :: :::
    --- : : :: :::
    C:3 F F 00 :::
    ::: B : :: :::
    ::: 7 : :: :::
    --- : : :: :::
    C:3 F F 00 :::
    ::: B : :: :::
    ::: 7 : :: :::
    --- : : :: :::
    C:3 F F 00 :::
    ::: B : :: :::
    ::: 7 : :: :::
    --- : : :: :::
    C:3 F F 00 :::
    ::: B : :: :::
    ::: 7 : :: :::
    --- : : :: :::
}


Pattern 01 {
    D#3 F F 00 :::
    ::: B : :: :::
    ::: 7 : :: :::
    --- : : :: :::
   
   
   
   
    D#3 F F 00 :::
    ::: B : :: ::: ...,,.,,.!!!! extra characters are ignored, man
    ::: 7 : :: :::
    --- : : :: :::
    D#3 F F 00 :::
    ::: B : :: :::
    ::: 7 : :: :::
    --- : : :: :::
    D#3 F F 00 :::
    ::: B : :: :::
    ::: 7 : :: :::
    --- : : :: :::
    D#3 F F 00 :::
    ::: B : :: :::
    ::: 7 : :: :::
    --- : : :: :::
    D#3 F F 00 :::
    ::: B : :: :::
    ::: 7 : :: :::
    --- : : :: :::
    D#3 F F 00 :::
    ::: B : :: :::
    ::: 7 : :: :::
    --- : : :: :::
}


Frame 00 { -, 0, -, -, -, -, -, -}

Frame 01 { -, 1, -, -, -, -, -, -}

Track{
    0, 1, 0, 0, 1, 1
}

That’s when I made a text parser. Once I fully debugged everything I had a file format and a program that loads one particular file and plays it infinitely. It can be heard below along with the test version I did in milkytracker.

Next on the agenda is to possibly make a gui tracker like the others I’ve mentioned so I don’t have to mess around with text files all day.

Advertisements

One response to “I made a file format! No app to make them, though.

  1. Pingback: Tracker 0.1: Play Test | Jorhlok

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: