Recent

Author Topic: Midi to Wav Converter  (Read 305 times)

Tomxe

  • Jr. Member
  • **
  • Posts: 63
Midi to Wav Converter
« on: April 21, 2026, 08:41:54 am »
.Midi to .Wav converter, uses .SF2 fonts, sounds pretty well

Requires no dependencies, no DLLs, no exes, nothing installed in the system.

License: MIT

https://github.com/Xelitan/HQ-Free-Pascal-Midi-to-Wave-converter-using-.SF2-soundfonts

Thaddy

  • Hero Member
  • *****
  • Posts: 19129
  • Glad to be alive.
Re: Midi to Wav Converter
« Reply #1 on: April 21, 2026, 10:54:01 am »
That looks like very nice code indeed!

Although the accent on sound programming by me (ASIO engine, VST's) lay in the early 2000's I am certainly going to try that code: I just wrote a triplet composer for every common scale, so I will try and connect that code to it.
BTW: I see you write the wav on the fly: I'd like to see you using TWaveFormat or preferably TWaveFormatEx, because then it is easier to integrate with other wav dependent software like audio studio's. But as is it should also work.

Keep you posted about my results.
« Last Edit: April 21, 2026, 10:56:26 am by Thaddy »
objects are fine constructs. You can even initialize them with constructors.

Tomxe

  • Jr. Member
  • **
  • Posts: 63
Re: Midi to Wav Converter
« Reply #2 on: April 21, 2026, 11:55:50 am »
I didn't know about TWaveFormat. But it's easy to change that in WriteWavHeader() so with next release it can be changed. Or, if you think it might be integrated with something, perhaps it should be converted into a function like Midi2Wav() or a class.

Thaddy

  • Hero Member
  • *****
  • Posts: 19129
  • Glad to be alive.
Re: Midi to Wav Converter
« Reply #3 on: April 21, 2026, 12:28:47 pm »
@Tomxe

Btw: to compile clean add this:
Code: Pascal  [Select][+][-]
  1. program Midi2Wav;
  2. {$notes off}{$hints off}
:)
I have checked: in your code those make no sense, so skip them and the code looks cleaner. (My compile rules are rather strict)

Now testing...some more...
« Last Edit: April 21, 2026, 12:34:14 pm by Thaddy »
objects are fine constructs. You can even initialize them with constructors.

 

TinyPortal © 2005-2018