ModPlug Central

OpenMPT => Help and Questions => Topic started by: Joshiii-Kun on August 20, 2006, 14:57:49

Title: How do I extract instruments from soundfonts correctly?
Post by: Joshiii-Kun on August 20, 2006, 14:57:49
I need to make one of my modules portable so that it can be used for a game. I used a VSTi with the SMG180 soundfont, and I'm wondering if I could somehow extract some instruments from that soundfont and import those into OpenMPT.
Are there freeware programs for that?
Title: How do I extract instruments from soundfonts correctly?
Post by: KrazyKatz on August 20, 2006, 16:44:12
"CDXTRACT" is the Program you are looking for.

http://www.cdxtract.com/

It is an outstanding program but not free. The Demo however allows you to convert the first instrument and may prove useful.
Title: How do I extract instruments from soundfonts correctly?
Post by: Joshiii-Kun on August 21, 2006, 09:25:21
Hmm it seems to be interesting, yes. Too bad it isn't free :P
Title: How do I extract instruments from soundfonts correctly?
Post by: MisterX on August 21, 2006, 13:20:16
Awave Studio is a great program for converting SoundFonts as well as Akai sample CDs and other formats.  It can convert directly to ITI for use in MODPlug Tracker.  Like CDExtract, it is not free, but does offer a freeware version:

http://www.fmjsoft.com/awavestudio.html
Title: How do I extract instruments from soundfonts correctly?
Post by: LPChip on August 21, 2006, 13:36:05
Do note that multi-layered soundfonts cannot be converted to .ITI files.

Well technically they can, but it will probably sound bad.
Title: How do I extract instruments from soundfonts correctly?
Post by: MisterX on August 21, 2006, 14:34:48
Quote from: "LPChip"Do note that multi-layered soundfonts cannot be converted to .ITI files.

Well technically they can, but it will probably sound bad.

They can, you just need to do each layer as a new ITI. ;)

As an example, I have converted a multilayered GIG violin instrument into several ITI instruments, such as:

violin_f.iti
violin_ff.iti
violin_mf.iti
violin_p.iti

You can then use the appropriate instrument(s) in your composition.
Title: How do I extract instruments from soundfonts correctly?
Post by: LPChip on August 21, 2006, 14:53:17
Oh, good technique! Does require him to edit his song though (atleast if his song uses multilayered soundfonts.
Title: How do I extract instruments from soundfonts correctly?
Post by: MisterX on August 21, 2006, 21:09:53
Quote from: "LPChip"Oh, good technique! Does require him to edit his song though (atleast if his song uses multilayered soundfonts.

Unless the newer version of MPT allows for triggering different instruments based on velocity (volume), then yeah, the song would have to be edited to replace the instruments with the proper ones.  I don't have that issue since I use the instruments from the beginning. ;)

I assume that multi-layered instruments have been a feature request for some time now?  Perhaps the following:

*.MPI - MODPlug Instrument Format.  Allows the user to load multiple instruments, add them to a "group", and define the sectors of the group using a parameter such as velocity, pitch, panning, MIDI macro, etc.

To use my previous example, I would add each of the above instruments to a group called "Violin", and then define the group using the volume:

00 - 10   violin_pp.iti
11 - 30   violin_mf.iti
31 - 45   violin_f.iti
46 - 64   violin_ff.iti

MPT would then use the appropriate instrument depending on how the group is defined.  If we use the "group" approach, and allow the group to be saved in its own format, it would still allow for each individual instrument of the group to be accessed in the MPT pattern area just by using its instrument ID.  

Therefore, I could load each of the violin ITI files into Instrument #s 1,2,3 and 4 and then Instrument # 5 could be the "group" instrument.

Seems like it would be a good approach to MultiLayered Instruments, but it would require that the instruments be separated to begin with...  :?
Title: How do I extract instruments from soundfonts correctly?
Post by: LPChip on August 22, 2006, 07:53:56
How about those instruments that have samples that play at the same time?
Title: How do I extract instruments from soundfonts correctly?
Post by: MisterX on August 22, 2006, 14:51:26
Quote from: "LPChip"How about those instruments that have samples that play at the same time?

All that my proposed *.MPI format is doing is allowing the mapping of Instruments based on something in addition to the Instrument selected in the Instrument/Sample column of the pattern editor, so the structure of the individual Instrument file, and the internal mapping of the samples within the Instrument itself shouldn't be an issue.  :?
Title: How do I extract instruments from soundfonts correctly?
Post by: LPChip on August 22, 2006, 15:09:12
I have soundfonts that play 2 samples at the same time. One for its "attack strike" with a specified volume, and one with the actual tone, with a different volume.
Title: How do I extract instruments from soundfonts correctly?
Post by: Snu on August 22, 2006, 21:59:41
i still think it would be best to use the sfz format, or even implement a soundfont player; rather then creating yet another file format that does the same thing.
Title: How do I extract instruments from soundfonts correctly?
Post by: MisterX on August 22, 2006, 22:31:29
Quote from: "Snu"i still think it would be best to use the sfz format, or even implement a soundfont player; rather then creating yet another file format that does the same thing.

This is true, I do like that sfz plugin, but I was proposing something that would work with any sample format that MPT supports, not just SF2 files.

As always, it's just an idea... ;)
Title: How do I extract instruments from soundfonts correctly?
Post by: KrazyKatz on August 23, 2006, 08:23:11
Ive been checking out this Awave Studio and have a Question?

Each instrument in a sound library is presented in two layers ( left and right ) which would ordinarily play at the same time. But when I convert the instrument into an *.IT file, it can only convert one channel into the instrument. How do I convert stereo sampled instruments into a single .IT file?

In general I use CdXtract and manually convert the wavs and build them into an .IT in Modplug, but this is a long and painstaking process and I would love to have a program do it at the touch of a button.

Thanks..
Title: How do I extract instruments from soundfonts correctly?
Post by: LPChip on August 23, 2006, 11:27:16
How about extracting only the left channel of the instrument, and use CDExtract to get the stereo samples, then replace the mono samples with the stereo ones?
Title: How do I extract instruments from soundfonts correctly?
Post by: KrazyKatz on August 24, 2006, 21:51:11
QuoteHow about extracting only the left channel of the instrument, and use CDExtract to get the stereo samples, then replace the mono samples with the stereo ones?

Bloody Hell... Now why couldnt I think of that. Good Show! Really useful program I must say. Thanks Mister X!
Title: How do I extract instruments from soundfonts correctly?
Post by: Snu on August 25, 2006, 05:42:20
Quote from: "LPChip"How about extracting only the left channel of the instrument, and use CDExtract to get the stereo samples, then replace the mono samples with the stereo ones?
wow, talk about horribly complicated... still tho, its better than extracting the samples and manually rebuilding the instruments from scratch (which i have done several times).
Title: How do I extract instruments from soundfonts correctly?
Post by: LPChip on August 25, 2006, 08:28:17
I've once tried it too, so I know how tough that job is.
Title: How do I extract instruments from soundfonts correctly?
Post by: KrazyKatz on August 25, 2006, 09:12:53
QuoteI've once tried it too, so I know how tough that job is.

Ive converted probably over 100 instruments, and since theyre mostly classical, some of the ranges span the full 8 octaves. I have some instruments that span almost 50 samples.

I aim for the most realistic sound possible. So no pain, no game.
------------------------------

On a seperate issue, sometimes in the Awave studio, it saves the instruments in too high an octave on the keyboard... would anyone know how to adjust in MPT by somehow dragging all the note references to a lower octave ( or alternatively doing it in Awave) instead of re-assigning each sample?
Title: How do I extract instruments from soundfonts correctly?
Post by: LPChip on August 25, 2006, 09:27:39
Your best aim is in Awave. I've converted a piano SF2 to .iti once, and had the same thing. I first though that the samples could be pitched, but that sounded so wrong. Then I did it in Awave and it was good. Awave had assigned the wrong samples with the keys, but the sounds of them were good. If you pitch down the samples, they will sound lq because they are slower than they suppose to be. You can relink all the samples, but thats a pain to do in MPT.
Title: How do I extract instruments from soundfonts correctly?
Post by: KrazyKatz on August 25, 2006, 09:49:02
the pitches are all fine, its just that if I convert in Awave a flute  ( for example) and since a flute is a higher instrument, it will reference it to play the lowest note on octave 5... I want it to be referenced at octave 4... for my own convenience. So the referencing is fine I just want to drag somehow everying an octave lower... and the only solution I can see is re-linking in modplug.
Title: How do I extract instruments from soundfonts correctly?
Post by: LPChip on August 25, 2006, 11:43:34
Ah I see. You could do that...
Title: How do I extract instruments from soundfonts correctly?
Post by: Joshiii-Kun on August 26, 2006, 09:15:55
Ooh, I somehow forgot about this topic XD
Hmm thanks for the information, y'all.