Sinus' Branch of Impulse Tracker to AGI Sound: Difference between revisions

From Sierra Wiki
Jump to navigationJump to search
Sinus (talk | contribs)
first draft
Sinus (talk | contribs)
more edits
Line 1: Line 1:
<div align="center"><div style="font-size: 22pt">Sinus's Branch of Impulse Tracker to AGI Sound</div><br />
<div align="center"><div style="font-size: 22pt">Sinus's Branch of Impulse Tracker to AGI Sound</div><br />
Version 0.2.3<br />''Author: [[Adam Skawiński]] and [[Nat Budin]]''<br />2025</div>
Version 0.2.7<br />''Author: [[Adam Skawiński]] and [[Nat Budin]]''<br />2025</div>


{{FanAGISoftwareInfobox
{{FanAGISoftwareInfobox
| Software = Impulse Tracker to AGI Sound (Sinus)
| Software = Impulse Tracker to AGI Sound (Sinus)
| Image =  
| Image =  
| Version = 0.2.3
| Version = 0.2.7
| ReleaseDate = {{2025}}-05-19<ref>https://sciprogramming.com/community/index.php?topic=9284.0</ref>
| ReleaseDate = {{2025}}-05-19<ref>https://sciprogramming.com/community/index.php?topic=9284.0</ref>
| Company = {{N/A}}
| Company = {{N/A}}
Line 35: Line 35:
</blockquote>
</blockquote>


<div class="Quote">
==Features ==
{{Quote|Attrib = {{AdamSkawińskiQ}}<ref> https://sciprogramming.com/community/index.php?topic=9284.msg76242#msg76242 </ref>
}}
On the fourth channel, every even/odd octave defines noise/pattern, and every 4th note pitch defines frequency. C1=C3=C5=E1=E3=G#1=G#3. Play C1 C#1 D1 D#1 C2 C#2 D2 D#2 for a full range of sounds.
Just to clarify: there are no "drums" in IT, it's not MIDI, in trackers you define instruments as you see fit. But for this script, instruments don't matter. First three channels of the IT files are voices, the fourth channel is noises.
</div>


=== Input formats: ===
<blockquote>
<blockquote>
{{TechToDo}}
</blockquote>
==<br /> Features ==
<blockquote>Input formats:
* Impulse Tracker (.it)
* Impulse Tracker (.it)
* Protracker (.mod) - basic support only, no tempo support yet
* Protracker (.mod) - basic support only, no tempo support yet
* MIDI (.mid) - input needs to have monophonic tracks or channels, no tempo support yet
* MIDI (.mid) - input needs to have monophonic tracks or channels, no tempo support yet</blockquote>
Options:
 
== Notes ==
The PCjr sound chip supports only 3 voices and 1 noise channel, so you'll have to use the first 4 channels of an IT file, or use --channels to cherry-pick.


* <code>--channels x,x,x,y</code> - select input channels. Default is <code>--channels 1,2,3,4</code> to output first four channels, with the last being used as noise. <code>--channels 1,2,3</code> would simply omit the noise channel. Midi channels are numbered from 0.
Noise notes are: C-0 (high buzz), C#0 (mid buzz), D-0 (low buzz), D#0 (borrow buzz), C-1 (high noise), C#1 (mid noise), D-1 (low noise), D#1 (borrow noise). "Borrowed" notes play frequencies borrowed from the third channel, though not very precisely. They're good for special effects like explosions or zaps, though, if you play a series of appropriate notes on channel 3 (probably with a volume of 0).
* <code>--tempo-exact</code> - force exact tempo, at the cost of even playback. AGI engine plays using 1/60s ticks, so any playback must either use equal note lengths (at the cost of a different BPM from the original - by default), or try to match the original's BPM exactly by using varied note lengths. MIDI conversion uses exact tempo matching only.
* <code>--auto-drum-offs n</code> - automatically terminate notes on the noise channel after <code>n</code> ticks. Useful when converting input files that use short samples and don't bother terminating them, which would turn into long noise notes in AGI.
* <code>--instr-note x y</code> - force instrument <code>x</code> to play only note <code>y</code> . Useful to force a drum-like instrument to play only valid AGI drum notes. Typical notes are 13 (high noise), 14 (middle noise) and 15 (low noise). Combined with <code>--channels</code> to properly map an input channel to the noise output, and <code>--auto-drum-offs</code> to make output drums shorter, this option can turn a typical "rhythm channel" in the input into proper noise channel output for AGI.
* <code>--instr-shift x y</code> - shift (transpose) instrument <code>x</code> by <code>y</code> semitones. Use when input samples were recorded in a weird pitch, and notes in the input were written to match that. Or, use +12 or -12 to transpose by an octave.</blockquote>


==<br /> Requirements ==
== Requirements ==


<blockquote>
<blockquote>
Line 67: Line 55:
</blockquote>
</blockquote>


==<br /> Version History ==
==Usage ==
 
<blockquote>
* ''0.2.1: Added recognizing MOD, S3M and XM modules, and MIDI files. They're not (yet?) supported, but recognized.''
* ''0.2.2: Experimental option --channels added''
* ''0.2.3: Tempo mode added: --tempo-exact''
* ''0.2.4: Auto drum note-offs added: --auto-drum-offs 1/2/3...''
* ''0.2.5: very basic MOD and MIDI support added''
* ''0.2.6: --auto-drum-offs now use AGI ticks for scale, not rows''
*        ''--instr-drum 1 13  - remap IT/MOD instrument 1 to drum note 13 (13,14,15 are noises, 1,2,3 are buzzes)''
* ''0.2.7: --instr-drum changed to --instr-note, and'' ''#        --instr-oct to --instr-shift''
</blockquote>
 
==<br /> Development Status ==
 
<blockquote>
{{AdamSkawinskiToolDev}} added support for 4-channel output ([[2025]]).<!--<ref>https://sciprogramming.com/community/index.php?topic=9284.msg76239#msg76239</ref>-->
</blockquote>
 
==<br /> Options ==


<blockquote>
<blockquote>
To convert music, type this from the command line:
To convert music, type this from the command line:


     perl it2agi <name>.it
     perl it2agi <name>


The script will produce a file called "<name>.ags".
The script will produce a file called "<name>.ags".
</blockquote>
</blockquote>


==<br /> Usage ==
==Options ==


<blockquote>
<blockquote>
To convert music, type this from the command line:
* <code>--channels x,x,x,y</code> - select input channels. Default is <code>--channels 1,2,3,4</code> to output first four channels, with the last being used as noise. <code>--channels 1,2,3</code> would simply omit the noise channel. You'll probably have to use this to pick channels out of multi-channel input files, or rearrange them to put the noise channel last. Midi channels are numbered from 0.
 
* <code>--tempo-exact</code> - force exact tempo, at the cost of jittery playback. AGI engine plays using 1/60s ticks, so any playback must either use equal note lengths (at the cost of a different BPM from the original - by default), or try to match the original's BPM exactly by using varied note lengths. MIDI conversion uses exact tempo matching only.
* <code>--auto-drum-offs n</code> - automatically terminate notes on the noise channel after <code>n</code> ticks. Useful when converting input files that use short samples and don't bother terminating them, which would turn into long noise notes in AGI.
* <code>--instr-note x y</code> - force instrument <code>x</code> to play only note <code>y</code> . Useful to force a drum-like instrument to play only valid AGI drum notes. Typical notes are 13 (high noise), 14 (middle noise) and 15 (low noise). Combined with <code>--channels</code> to properly map an input channel to the noise output, and <code>--auto-drum-offs</code> to make output drums shorter, this option can turn a typical "rhythm channel" in the input into proper noise channel output for AGI.
* <code>--instr-shift x y</code> - shift (transpose) instrument <code>x</code> by <code>y</code> semitones. Use when input samples were recorded in a weird pitch, and notes in the input were written to match that. Or, use +12 or -12 to transpose by an octave.</blockquote>


    perl it2agi <name>.it
==  Version History ==


The script will produce a file called "<name>.ags".
* ''0.2.1: Added recognizing MOD, S3M and XM modules, and MIDI files. They're not (yet?) supported, but recognized.''
</blockquote>


==<br /> Options ==
* ''0.2.2: Experimental option --channels added''
* ''0.2.3: Tempo mode added: --tempo-exact''
* ''0.2.4: Auto drum note-offs added: --auto-drum-offs 1/2/3...''
* ''0.2.5: very basic MOD and MIDI support added''
* ''0.2.6: --auto-drum-offs now use AGI ticks for scale, not rows;'' ''--instr-drum'' ''added''
* ''0.2.7: --instr-drum changed to --instr-note, and'' ''--instr-oct to --instr-shift''
== Development Status ==


<blockquote>
<blockquote>
To convert music, type this from the command line:
Last updated: 2025-05-29.<!--<ref>https://sciprogramming.com/community/index.php?topic=9284.msg76239#msg76239</ref>-->
 
    perl it2agi <name>.it
 
The script will produce a file called "<name>.ags".
</blockquote>
</blockquote>


==<br /> Download ==
== Download ==


<blockquote>
<blockquote>
Line 122: Line 97:
* <div id="DL">[[Image:ZIP.png|ZIP File]] [[File:Impulse_Tracker_to_AGI_Sound_(ANY2AGI022).zip|IImpulse Tracker to_AGI Sound 0.2.3 (ANY2AGI022).zip]] <span class="DLInfo"> (ZIP file) [6.24 KB]</span><br /><br />'''GitHub:'''
* <div id="DL">[[Image:ZIP.png|ZIP File]] [[File:Impulse_Tracker_to_AGI_Sound_(ANY2AGI022).zip|IImpulse Tracker to_AGI Sound 0.2.3 (ANY2AGI022).zip]] <span class="DLInfo"> (ZIP file) [6.24 KB]</span><br /><br />'''GitHub:'''
<blockquote>
<blockquote>
* https://github.com/SinusPi/any2agi SinusPi/any2agi on GitHub]
* [[github:SinusPi/any2agi|SinusPi/any2agi on GitHub]]  
</blockquote>
</blockquote>
</blockquote>
</blockquote>
Line 129: Line 104:


# IT2AGI doesn't (yet) support changing tempo or speed in the middle of the song.  Don't try this, as it will be cruelly ignored.
# IT2AGI doesn't (yet) support changing tempo or speed in the middle of the song.  Don't try this, as it will be cruelly ignored.
# Volumes aren't supported either, yet.  They will be in the next version.  For now, everything is played full blast.
# Finally, AGI is very limited in what it can do.  If AGI doesn't support something, IT2AGI most likely doesn't either.
# Finally, AGI is very limited in what it can do.  If AGI doesn't support something, IT2AGI most likely doesn't either.



Revision as of 10:25, 29 May 2025

Sinus's Branch of Impulse Tracker to AGI Sound

Version 0.2.7
Author: Adam Skawiński and Nat Budin
2025
Impulse Tracker to AGI Sound (Sinus)
Latest Version:  0.2.7
Release Date:  2025-05-19[1]
Company: Template:N/A
Development Status:  {{{DevStatus}}}
Publication Status:  Published
Developer(s): Adam Skawiński, Nat Budin
Interface: CLI
Language: Perl
Open Source: Open
Source Availability:  Yes
License: None
Type: Template:FanAGISoundConverter
Relevant Engine: AGI2
Platform: Windows, Linux
Localization: English
Website: https://github.com/SinusPi/any2agi




A.K.A.

  • ANY2AGI


Description

Adam 'Sinus' Skawiński's branch of Nat Budin's Impulse Tracker to AGI Sound Perl script adds support for noise channel and more input formats (now: IT, MOD and MIDI), as well as some quality-of-life options.

The Perl language runtime is required to run. Input music files may be created with ImpulseTracker, OpenMPT or any MIDI editor.

Features

Input formats:

  • Impulse Tracker (.it)
  • Protracker (.mod) - basic support only, no tempo support yet
  • MIDI (.mid) - input needs to have monophonic tracks or channels, no tempo support yet

Notes

The PCjr sound chip supports only 3 voices and 1 noise channel, so you'll have to use the first 4 channels of an IT file, or use --channels to cherry-pick.

Noise notes are: C-0 (high buzz), C#0 (mid buzz), D-0 (low buzz), D#0 (borrow buzz), C-1 (high noise), C#1 (mid noise), D-1 (low noise), D#1 (borrow noise). "Borrowed" notes play frequencies borrowed from the third channel, though not very precisely. They're good for special effects like explosions or zaps, though, if you play a series of appropriate notes on channel 3 (probably with a volume of 0).

Requirements

Usage

To convert music, type this from the command line:

perl it2agi <name>

The script will produce a file called "<name>.ags".

Options

  • --channels x,x,x,y - select input channels. Default is --channels 1,2,3,4 to output first four channels, with the last being used as noise. --channels 1,2,3 would simply omit the noise channel. You'll probably have to use this to pick channels out of multi-channel input files, or rearrange them to put the noise channel last. Midi channels are numbered from 0.
  • --tempo-exact - force exact tempo, at the cost of jittery playback. AGI engine plays using 1/60s ticks, so any playback must either use equal note lengths (at the cost of a different BPM from the original - by default), or try to match the original's BPM exactly by using varied note lengths. MIDI conversion uses exact tempo matching only.
  • --auto-drum-offs n - automatically terminate notes on the noise channel after n ticks. Useful when converting input files that use short samples and don't bother terminating them, which would turn into long noise notes in AGI.
  • --instr-note x y - force instrument x to play only note y . Useful to force a drum-like instrument to play only valid AGI drum notes. Typical notes are 13 (high noise), 14 (middle noise) and 15 (low noise). Combined with --channels to properly map an input channel to the noise output, and --auto-drum-offs to make output drums shorter, this option can turn a typical "rhythm channel" in the input into proper noise channel output for AGI.
  • --instr-shift x y - shift (transpose) instrument x by y semitones. Use when input samples were recorded in a weird pitch, and notes in the input were written to match that. Or, use +12 or -12 to transpose by an octave.

Version History

  • 0.2.1: Added recognizing MOD, S3M and XM modules, and MIDI files. They're not (yet?) supported, but recognized.
  • 0.2.2: Experimental option --channels added
  • 0.2.3: Tempo mode added: --tempo-exact
  • 0.2.4: Auto drum note-offs added: --auto-drum-offs 1/2/3...
  • 0.2.5: very basic MOD and MIDI support added
  • 0.2.6: --auto-drum-offs now use AGI ticks for scale, not rows; --instr-drum added
  • 0.2.7: --instr-drum changed to --instr-note, and --instr-oct to --instr-shift

Development Status

Last updated: 2025-05-29.

Download

Download from here:


Known issues

  1. IT2AGI doesn't (yet) support changing tempo or speed in the middle of the song. Don't try this, as it will be cruelly ignored.
  2. Finally, AGI is very limited in what it can do. If AGI doesn't support something, IT2AGI most likely doesn't either.


Credits


References


Also See