Using ORG and PXTONE files in other Programms

Oct 16, 2006 at 1:53 PM
Hoxtilicious
"Life begins and ends with Nu."
Join Date: Dec 30, 2005
Location: Germany
Posts: 3218
Age: 32
Well I think this needs a extra Thread ;)

ShInInG PhAnToM said:
Jeh 10/16-18:44 said:
利用できるORGおよびPMD DLLファイルがあるか。 WINAMPのための差込式を作るため。

Google Translation:
Is there ORG and a PMD DLL file which it can utilize? In order to make the inserting system for WINAMP.

hehe 10/16-20:48 said:
pxtoneの再生専用DLLどうやって使うんですかあ?

Google Translation:
The playback exclusive use DLL of pxtone how doing, you use, whether it is, the [a]?

Well, Translation works, but bad... But I think it means: the DLL is in the PXTONE Package but he/she don't know how to use it... ^^

Here is it:

PXTONE DLL
 
Oct 16, 2006 at 2:43 PM
Hoxtilicious
"Life begins and ends with Nu."
Join Date: Dec 30, 2005
Location: Germany
Posts: 3218
Age: 32
10/16-22:17 said:
プログラミングをしないのであれば使い道はありません。 プログラミングをするのであれば言語ごとに方法が違うから、自分で調べましょう。 ヒントになり得るのは使っている言語のリファレンス、コミュニティと、 ptCollage.exeのあるフォルダから、\pxtone_include\pxtone.h も参照して下さい。 意味が分らなければあなたには無用の長物です。諦めましょう。

Google Translation:
If it does not program, there is no use. If it programs, because method is different every language, you will inspect by your. That it can become hint, reference of the language which is used, from the folder which has community and ptCollage.exe, \ pxtone_include \ please refer to also pxtone.h. If meaning does not understand, it is the white elephant to you. You will abandon.

Well I think it means that the PXTONE DLL isnt the DLL for ORGS...
But I'am waiting for Pixels answer...

Well I looked at the pxtone.h, the lib data and the readme...
It seems these are the Important commands for the PXTONE:

pxtone_Tune_GetLastError() ‚ pxtone_GetLastError() ‚
pxtone_Tune_Read(), pxtone_Tune_Vomit(), pxtone_ResetSampling() ‚ pxtone_reset() ‚ pxtone_Tune_Play(), pxtone_Tune_Start(), pxtone_Tune_IsPlaying() ‚ pxtone_Tune_IsStreaming()
pxtone_Tune_Vomit(), pxtone_Release(), pxtone_Ready()

Hmm I could try to use a file in GameMaker
 
Oct 16, 2006 at 6:32 PM
The Bartender
"All your forum are belong to us!"
Join Date: Jun 18, 2006
Location: Montreal, Canada
Posts: 581
Age: 39
A DLL is a series of pre-written functions you can use with a programming language or certain higher-level scripting languages to make things easier. For instance, instead of writing all the complicated code that communicates with your sound card, you can use a DLL like FMOD to have functions that already do this stuff for you.

As such, you can't just dump a random DLL into another program and expect it to work. Generally, these programs expect the DLL to be laid out in a specific way with specific functions - what's IN the functions can vary, but no program is smart enough to guess how to use a DLL when it's in a format they're not expecting. In short, you cannot use the CS DLLs with WinAMP directly.

However, you can write your own plugin if you know how. It would require using the DLL as a basis and wrapping your plugin around it (essentially, this is what a wrapper is - it serves as a bridge between two different systems/modules.)

I've never written any WinAMP plugins so I can't help you get started, but using the DLLs shouldn't be too hard. Making a plugin out of them would be a piece of cake after that, given the proper knowledge for writing plugins.

Edit: What's this business about white elephants? >"<
 
Oct 16, 2006 at 8:01 PM
Been here way too long...
"..."
Join Date: Jun 25, 2005
Location:
Posts: 372
Here's the page for the Winamp Plugin SDK.

I looked at it when I first had the idea of an ORG plugin for Winamp, and I couldn't really understand a lot of it (I'm no C++ wiz.) But there's an example for input plugins, so perhaps that would help anyone who wants to persue it.
 
Nov 8, 2006 at 2:39 AM
Junior Member
"Fresh from the Bakery"
Join Date: Jul 4, 2006
Location:
Posts: 19
Okay, let's get this straight.

Pixel has, as far as I know, developed two (2) different sound formats: organya (.org), the one used in Cave Story, and pxtone (.pttune or .ptcop), his current project. Note that this pxtone format (and the programs associated with it) has absolutely nothing whatsoever to do with the SFX-editor of the same name, which Pixel used to make many of the sounds for Cave Story.

The aforementioned DLL, as far as I can tell, contains functions for dealing with pxtone files, and is therefore pretty much useless to anyone interested in the ORG format. If you want a library for those files, you'll probably have to write it yourself; I don't think Pixel ever released his to the public.

End of thread.
 
Nov 8, 2006 at 3:51 AM
Hoxtilicious
"Life begins and ends with Nu."
Join Date: Dec 30, 2005
Location: Germany
Posts: 3218
Age: 32
Snarwin said:
End of thread.

Noway I'am going to post every shit I will find about this *lol* :(
Oh well there are 3 Music Formats! You forget the PMD Music format! Pixel Music Data! And I have editor for this, its a bit like the pxtone format.
 
Nov 8, 2006 at 11:14 AM
Been here way too long...
"..."
Join Date: Jun 25, 2005
Location:
Posts: 372
I also don't think it is conincidence that the WAV samples from Cave Story that don't work in any other program DO work in PXTone.

I know for a fact ORGs are just a MIDI-esque format that tells how to play a predefined set of samples. But I don't think it's very far off to say that the samples from Cave Story could've easily been made in PXTone. This is exactly why I was hoping I could reconstruct them myself.

ORG Playback is what I'm on right now in ORGasm, and the only thing stopping me is that I'm having trouble stretching the samples/making them repeat without skipping in DirectX8 DirectMusic. I've been stalled on it for a few days now, and if it continues I'm going to just move on to other stuff until I can get some word back on the help I've asked for in the VB Community.

Too bad I don't know enough about C++ to work something out for Winamp, which I'm sure would've been a lot easier - I would've been able to skip the last two and a half weeks of UI nightmares which still aren't completely solved. :(
 
Nov 9, 2006 at 12:41 AM
Junior Member
"Fresh from the Bakery"
Join Date: Jul 4, 2006
Location:
Posts: 19
You forget the PMD Music format!
PMD, as far as I can tell, was an early version of ORG. I don't have very much to go on, though. If anyone could track down the editor program--I'm pretty sure it's called "PiyoPiyo"--I would be eternally grateful.

But I don't think it's very far off to say that the samples from Cave Story could've easily been made in PXTone.
I am almost positive that the Cave Story samples were made in this program. The WAV files I posted, on the other hand, were made to work with this program--the one the DLL was made for, which was released long after the completion of Cave Story.

While the two programs both go by the name "PxTone," they have almost nothing in common. The first program, for one, is dated as being released in February 2004, and I have been able to open WAV files made by the first program with programs other than PxTone Collage without any trouble. If by "PXTone," you mean the first program, then you're probably correct. Any connection, however, to Pixel's current project seems extremely unlikely.

What seems to me to be the case is that the WAV files I posted are not the original versions of the samples, but rips of some sort. Whoever ripped them did so for use with PxTone Collage, and is presumably responsible for their incompatibility with other programs.

Fake edit: Looking through the ORG instrument samples, I noticed some rather odd things.
  • They're all exactly 274 bytes.
  • They all have the following header:
    Code:
    RIFF
      WAVEfmt      D¬  D¬      LIST   ORG05032fact   È   data
I don't even know what to think now.

This is exactly why I was hoping I could reconstruct them myself.
What you're looking for, if I understand correctly, is the .pxt data. Unfortunately, I don't think there's any way to get it short of opening OrgMaker in a hex editor and extracting it yourself. After that, you'll still have to figure out Pixel's algorithm for counstructiong the waves.

Not impossible, but it doesn't seem any easier than just ripping WAV samples by hand. The only thing you gain is a smaller file size.
 
Nov 9, 2006 at 2:11 AM
Been here way too long...
"..."
Join Date: Jun 25, 2005
Location:
Posts: 372
Actually, I would gain something. Well, kinda. If I can use this PXT data to figure out the actual algorithm for each note, I could reconstruct the wave in Visual Basic and make it as long or as short as I want, and complete song playback in my ORGasm ORG editor.

One of the roadblocks right now for me is stretching the WAV samples in DirectMusic, and so far I cannot find any answers or help on this. I've moved on to other things while waiting for feedback, but if I had the wave equations, I could easily code in playback and be that much closer to completing it.

I'm assuming I just look through for the headers and rip them out one by one? Shouldn't be too hard. The work required is probably worth it compared to waiting around for DX8 help.

EDIT: Okay, so it's a little more than that. Bah. And I thought I had something there. :( It's certainly not in the same format as that program takes. Well.... hum.
 
Nov 9, 2006 at 5:09 AM
Neophyte Member
"Fresh from the Bakery"
Join Date: Nov 4, 2006
Location:
Posts: 3
I think the way to go with this would be to:
1. Try to create pxtone voices as close to the organya instruments as possible
2. Figure out the pxtone file formats
3. Convert the .orgs to .pttunes
4. Write a wrapper for the pxtone dll
5. Use the wrapper to play the .pttunes.

Steps 1, 2, and 4 can be done in parallel.
 
Nov 9, 2006 at 5:27 AM
Junior Member
"Fresh from the Bakery"
Join Date: Jul 4, 2006
Location:
Posts: 19
Osmose said:
I'm assuming I just look through for the headers and rip them out one by one? Shouldn't be too hard. The work required is probably worth it compared to waiting around for DX8 help.
No, not really.

I'm not sure where the headers came from, or what they mean, if anything. I doubt they'd be much help in finding the PXT data though. A .pxt file looks like this (this one is the ORG snare drum):

Code:
use  :1
size :5000
main_model   :0
main_freq    :20.00
main_top     :30
main_offset  :0
pitch_model  :3
pitch_freq   :1.00
pitch_top    :44
pitch_offset :0
volume_model :0
volume_freq  :0.00
volume_top   :32
volume_offset:0
initialY:63
ax      :64
ay      :63
bx      :111
by      :19
cx      :255
cy      :0

use  :1
size :10000
main_model   :5
main_freq    :14.00
main_top     :41
main_offset  :0
pitch_model  :5
pitch_freq   :3.00
pitch_top    :32
pitch_offset :0
volume_model :0
volume_freq  :0.00
volume_top   :32
volume_offset:0
initialY:63
ax      :64
ay      :18
bx      :91
by      :12
cx      :255
cy      :0

use  :0
size :0
main_model   :0
main_freq    :0.00
main_top     :0
main_offset  :0
pitch_model  :0
pitch_freq   :0.00
pitch_top    :0
pitch_offset :0
volume_model :0
volume_freq  :0.00
volume_top   :0
volume_offset:0
initialY:0
ax      :0
ay      :0
bx      :0
by      :0
cx      :0
cy      :0

use  :0
size :0
main_model   :0
main_freq    :0.00
main_top     :0
main_offset  :0
pitch_model  :0
pitch_freq   :0.00
pitch_top    :0
pitch_offset :0
volume_model :0
volume_freq  :0.00
volume_top   :0
volume_offset:0
initialY:0
ax      :0
ay      :0
bx      :0
by      :0
cx      :0
cy      :0

{1,5000,0,20.00,30,0,3,1.00,44,0,0,0.00,32,0,63,64,63,111,19,255,0},
{1,10000,5,14.00,41,0,5,3.00,32,0,0,0.00,32,0,63,64,18,91,12,255,0},
{0,0,0,0.00,0,0,0,0.00,0,0,0,0.00,0,0,0,0,0,0,0,0,0},
{0,0,0,0.00,0,0,0,0.00,0,0,0,0.00,0,0,0,0,0,0,0,0,0},
Each of the four blocks corresponds to one of four "tracks." The last part, though, with all of the numbers in braces, is probably what you'll find in the actual EXE, and what the equation uses.

I think the way to go with this would be to:
1. Try to create pxtone voices as close to the organya instruments as possible
2. Figure out the pxtone file formats
3. Convert the .orgs to .pttunes
4. Write a wrapper for the pxtone dll
5. Use the wrapper to play the .pttunes.
That's just silly. Why do that when you can design a plugin to play the ORG files themselves?

Please, just forget the pxtone DLL for now.
 
Nov 9, 2006 at 10:37 AM
Hoxtilicious
"Life begins and ends with Nu."
Join Date: Dec 30, 2005
Location: Germany
Posts: 3218
Age: 32
Snarwin said:
That's just silly. Why do that when you can design a program to play the ORG files themselves?

Please, just forget the pxtone DLL for now.

Why is it Silly? Shush! Design? There is already orgmaker so use it -_-
We wanna have 1 for WINAMP, things are not that easy :D
 
Nov 9, 2006 at 2:06 PM
Been here way too long...
"..."
Join Date: Jun 25, 2005
Location:
Posts: 372
Note: Guy who's making the DS Cave Story port and was given the source by Pixel for that purpose hints that the 100 Organya samples are each 256 bytes long.
 
Dec 10, 2006 at 2:21 PM
Been here way too long...
"..."
Join Date: Jun 25, 2005
Location:
Posts: 372
Snarwin said:
Fake edit: Looking through the ORG instrument samples, I noticed some rather odd things.
  • They're all exactly 274 bytes.
  • They all have the following header:
    Code:
    RIFF
      WAVEfmt      D¬  D¬      LIST   ORG05032fact   È   data
I don't even know what to think now.

I do. At least, I do now. That is the actual wave sample - I've been reading up on the wave file format while trying to handle playback problems with drums (Instruments are working marvelously, though), and now see that this is a WAV file embedded within the program.

It works like this: WAVs are IFF files, meaning that they are stored in identifiable chunks: That "fmt " after the WAVE you see there is the beginning of the first chunk, the format chunk, which gives us info on how to treat the file. Also, reading the header chunk, I find that, disregarding the RIFF and four bytes after, the file is actually 5036 bytes long.

What you need to do is simply cut out everything you call the header. After "data" there's four bytes you also need to cut out, and then after that simply go all the way down to the next sample, but don't copy any extra padding "00"s. Import it as raw data into Audacity and WAHBAM. Sampled.

This doesn't help me particularly, but no one ever said having more info is a bad thing.
 
Top