Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: WMCoolmon on August 03, 2004, 05:56:51 am

Title: Playsamp
Post by: WMCoolmon on August 03, 2004, 05:56:51 am
This is a small utility meant to aid music modders, but it can be fun to just play with. Basically what it does is divide WAV music up into sections, and let you individually play those sections. Along with letting you loop a section and play with the pitch... :D

It uses OpenAL (which Ferrium will be using), so you'll need to install (http://developer.creative.com/articles/article.asp?cat=1&sbcat=31&top=38&aid=46) it if you haven't.

It's a simple command-line program, but you can use shortcuts to run it instead. Here's the lowdown (You can get this by running the program w/o any command lines):

Code: [Select]
|-----------------------------|
|PlaySamp by [email][email protected][/email]|
|-----------------------------|
DESCRIPTION:
Plays a given 'measure' of an ordinary .wav file (either 8-bit or 16-bit mono/stereo
----------
USAGE:
Syntax is as follows: Song name, number of measures in song, (optional) samples per measure
eg 'playsamp FS2_Btl_A01.wav 25.8 66150'
----------
TBL-READING:
Optionally, leave out the number of measures to read it in from a music.tbl file
In this case, the values for the first appearance of the song in the .tbl file will be used
----------
IMPORTANT:
ONLY the number of measures per song is used; the samples per measure is calculated


Note that it ONLY works for uncompressed (PCM) wave files; you'll have to uncompress ADPCM wave files since OpenAL doesn't have builtin support for 'em.
Title: Playsamp
Post by: WMCoolmon on August 03, 2004, 05:58:13 am
Oh yeah, here's the program :p
Title: Playsamp
Post by: DaBrain on August 03, 2004, 05:21:48 pm
Good work. Although I'm not that much into audio work, I might probably put this into good use. :) Thanks