Author Topic: IT2AGI sound converter script - some fixes  (Read 193207 times)

0 Members and 10 Guests are viewing this topic.

Offline Sinus

Re: IT2AGI sound converter script - some fixes
« Reply #15 on: May 24, 2025, 07:35:20 PM »
Since it wasn't obvious, I now made the script recognize some wrong tracker formats.
The first post was updated with a link to a GitHub repo where the script shall now live.

Offline Sinus

Re: IT2AGI sound converter script - some fixes
« Reply #16 on: May 24, 2025, 09:30:57 PM »
0.2.2 update: experimental option --channels added to let you pick which channels to pull from the source files. Default is 1,2,3,4. Use: --channels 1,3,5,8

Offline Sinus

Re: IT2AGI sound converter script - some fixes
« Reply #17 on: May 25, 2025, 09:51:41 PM »
I guess I'm going to bite that bullet and tease you guys a bit.

Header: format ,  tracks, ticksperq=0, negsmpte=, ticksperf=
Reading track 1, 25 bytes
    0: Status 11111111  META58
    0: Status 11111111  META51 03 TMPO 500000
    0: Status 11111111  META59 02 SIGN 0 maj
    0: Status 11111111  META2f 00
Reading track 2, 1399 bytes
    0: Status 11111111  META21
    0: Status 11111111  META03 [   GABRIEL KNIGHT   ]
    0: Status 11000001  1 PCHG 0
 1425: Status 11000001  1 PCHG 33
    0: Status 10110001  1 CTRL 7=121
    0:    ... 10110001  1 CTRL 10=64
    1:    ... 10110001  1 CTRL 64=0
    0: Status 11100001  1 PWHL 64=0
    1: Status 10110001  1 CTRL 7=88
 1534: Status 10010001  1 N-ON 45=74
    0:    ... 10010001  1 N-ON 33=74
    1:    ... 10010001  1 N-ON 52=74
  166: Status 10000001  1 N-OF 45=64
   26:    ... 10000001  1 N-OF 33=64
   45: Status 10010001  1 N-ON 45=70
    6:    ... 10010001  1 N-ON 33=80
 1298: Status 10000001  1 N-OF 33=64
    0:    ... 10000001  1 N-OF 45=64
    0:    ... 10000001  1 N-OF 52=64
    1: Status 10010001  1 N-ON 45=74


We're on our way to having the script read MID files. From there, it's only a short hop towards a direct MID2AGI converter, without going through a ROL, with built-in note overlap fixing, with the ability to pick channels from command line, and - why not? - drum support. We'll see. :)

Offline bokkers

Re: IT2AGI sound converter script - some fixes
« Reply #18 on: May 26, 2025, 02:44:35 PM »
Hey hey my my, Rock N Roll is finally coming to AGI town, it would seem. :)

Thanks to the IT2AGI script, I have now produced an AGI sound file, with drum sounds converted from the original MIDI arrangement. Bass drum and snare already have good sounds / the right noise freqs, but I can't seem to control the length of the noise bit. How can I get these short and snappy sounds like in the KQ6 tune?

Here's what I have so far:

Offline Sinus

Re: IT2AGI sound converter script - some fixes
« Reply #19 on: May 26, 2025, 06:08:16 PM »
Quote from: bokkers
How can I get these short and snappy sounds like in the KQ6 tune?
You need to insert note-off or note-cut commands in the IT patterns where appropriate - by pressing the backtick or equal keys, if you're using OpenMPT. They'll look like ~~ or ^^.
In theory, you should be able to set volume to 0 on the appropriate row, as it was done in Protracker MODs, but that trick isn't supported yet (it may be, perhaps).
« Last Edit: May 26, 2025, 06:24:36 PM by Sinus »

Offline bokkers

Re: IT2AGI sound converter script - some fixes
« Reply #20 on: May 26, 2025, 07:18:34 PM »
Thanks man! That helps. Finally I got a workflow that lets me have drums. :) I use Sekaiju for the MIDI handling, then OpenMPT for the IT part. Together with your script I now have control over all 4 AGI sound channels for the first time. Amazing! :)

Offline Sinus

Re: IT2AGI sound converter script - some fixes
« Reply #21 on: May 27, 2025, 12:48:33 PM »
Version 0.2.3 is out on GitHub.
New option:
--tempo-exact - the script should exactly match the BPM of the input file - possibly pushing some rows out of sync, if there's no way to fit the original BPM into the 1/60ths of a second that AGI uses.

With tracker mods, all rows should play evenly, even if slower or faster than the input intended - you'll probably never want to use "exact", unless in very special cases.
For rowless formats like MIDI (soon!), "exact" will be default, and not changeable. Sadly, quantization of some weirdly timed or "crowded" note patterns into 1/60s ticks will always be a mess.
« Last Edit: May 27, 2025, 12:55:04 PM by Sinus »

Offline Sinus

Re: IT2AGI sound converter script - some fixes
« Reply #22 on: May 27, 2025, 01:36:03 PM »
And version 0.2.4 is out, too! I'm on a roll.

--auto-drum-offs 1/2/3... - will automatically shorten drum notes to n rows if there's no note-off command in the input file. A good value is 2.

Offline Sinus

Re: IT2AGI sound converter script - some fixes
« Reply #23 on: May 27, 2025, 03:20:56 PM »
Fixed: notes with 0 volume will be properly output. This makes it possible to use the special feature of the drum channel - borrowing frequency from the 3rd channel.

Offline Collector

Re: IT2AGI sound converter script - some fixes
« Reply #24 on: May 27, 2025, 03:40:34 PM »
KQII Remake Pic

Offline Sinus

Re: IT2AGI sound converter script - some fixes
« Reply #25 on: May 27, 2025, 04:05:52 PM »
Splendid! May I get edit permission to keep it updated? Or, if not, please correct that it DOES now support volumes, and the noise notes aren't quite correct anymore, as D#1/D#2 has been confirmed to properly borrow frequency from the 3rd channel (enabling effects such as wind blowing, explosions, zaps, etc.)

Offline Sinus

Re: IT2AGI sound converter script - some fixes
« Reply #26 on: May 27, 2025, 04:29:27 PM »
By the way - here's how to make a BZOOOOT sound effect! :)

Offline Sinus

Re: IT2AGI sound converter script - some fixes
« Reply #27 on: May 27, 2025, 08:13:34 PM »
As of 5 minutes ago, the script converted its first MIDI file. A very simple one, with tempo out of whack, and multi-track multi-channels are a menace, but overlaps are handled and it could work in a very pinchy pinch. Work continues! \m/

... Oh, and a MOD file just got converted, too. Of course most samples are hand-tuned, so the result might need commandline args dictating how to detune each sample... So maybe I'll leave _that_ bit out. But hey, MOD reading, even if useless! :D
« Last Edit: May 27, 2025, 09:18:09 PM by Sinus »

Offline Collector

Re: IT2AGI sound converter script - some fixes
« Reply #28 on: May 28, 2025, 06:12:09 AM »
Just go to the "Request account" link at the top of the page and I'll activate it when I see it.
KQII Remake Pic

Offline bokkers

Re: IT2AGI sound converter script - some fixes
« Reply #29 on: May 28, 2025, 10:37:07 AM »
Arranging drums is so much fun now, thanks to the script and Sinus's great support.
Here's a tune that went through the MIDI 2 IT 2 AGI pipeline, with --auto-drum-offs set to 2:



SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.173 seconds with 23 queries.