HydrogenAudio

Hydrogenaudio Forum => General Audio => Topic started by: Essem on 2019-02-06 14:49:48

Title: Converting each track of an AHX/HVL tune to WAV?
Post by: Essem on 2019-02-06 14:49:48
Hello,
I was wondering if there was a way to convert each track in an Abyss' Highest eXperience/Hively Tracker file to separate WAV files. I know about the HVL2WAV command line tool, but that seems to only convert the entire track to a single WAV file, not each individual track to different files. Can someone help with this? Thanks in advance.
Title: Re: Converting each track of an AHX/HVL tune to WAV?
Post by: DVDdoug on 2019-02-06 16:38:55
Any audio editor can split a WAV file.   Audacity (https://www.audacityteam.org/) is free.    You can simply select/highlight the songs/tracks one at a time, then Rile -> Export -> Export Selected Audio.    (I usually select a little extra at the beginning & end, then I'll open the files for "final trimming" or to fade-in/fade-out, etc.)

Or, there is a way of labeling the songs and exporting them all at once (https://manual.audacityteam.org/man/faq_opening_and_saving_files.html#split).

Audacity can open and export most audio formats if you install the optional FFmpeg Import/Export Library.  I don't know if it will open an AHX/HVL file, but if it will you can export-as WAV and you won't need the command-line converter.
Title: Re: Converting each track of an AHX/HVL tune to WAV?
Post by: deus-ex on 2019-02-07 00:34:34
You are referring to a Hively Tracker module containing multiple subsongs? Foobar2000 with the Hively Tracker decoder plugin should be able to load the module and list the main song and all subsongs in the playlist. There you can use fooobar2000's internal converter to save each individual song to a separate WAV file.

Alternatively you can use XMPlay with the native AHX/Hively Tracker input plugin. Select 'Write to disk' from the context menu to save the main song and all subsongs to individual files.
Title: Re: Converting each track of an AHX/HVL tune to WAV?
Post by: Essem on 2019-02-07 01:02:55
Any audio editor can split a WAV file.   Audacity (https://www.audacityteam.org/) is free.    You can simply select/highlight the songs/tracks one at a time, then Rile -> Export -> Export Selected Audio.    (I usually select a little extra at the beginning & end, then I'll open the files for "final trimming" or to fade-in/fade-out, etc.)

Or, there is a way of labeling the songs and exporting them all at once (https://manual.audacityteam.org/man/faq_opening_and_saving_files.html#split).

Audacity can open and export most audio formats if you install the optional FFmpeg Import/Export Library.  I don't know if it will open an AHX/HVL file, but if it will you can export-as WAV and you won't need the command-line converter.
Just a bit of clarification: in Hively/AHX, the tracks are equivalent to channels (or whatever you call them) in tracker music. I've tried opening them with Audacity as both the raw file and a WAV conversion (using HVL2WAV); however, the raw file wouldn't load at all, and the WAV file only has 2 stereo channels. AHX/HVL files aren't supported by FFmpeg either.
You are referring to a Hively Tracker module containing multiple subsongs? Foobar2000 with the Hively Tracker decoder plugin should be able to load the module and list the main song and all subsongs in the playlist. There you can use fooobar2000's internal converter to save each individual song to a separate WAV file.

Alternatively you can use XMPlay with the native AHX/Hively Tracker input plugin. Select 'Write to disk' from the context menu to save the main song and all subsongs to individual files.
The file only has one subsong. What I'm looking for is a way to export each individual channel/track to WAV.
Title: Re: Converting each track of an AHX/HVL tune to WAV?
Post by: deus-ex on 2019-02-07 07:47:08
What I'm looking for is a way to export each individual channel/track to WAV.
Load module into tracker, silence all but one channel, save module, repeat accordingly.
Title: Re: Converting each track of an AHX/HVL tune to WAV?
Post by: Essem on 2019-02-07 13:45:01
What I'm looking for is a way to export each individual channel/track to WAV.
Load module into tracker, silence all but one channel, save module, repeat accordingly.
There's only one problem with that: Hively doesn't provide a way to export as WAV, and the fprmat isn't supported by OpenMPT. I know about the Audacity method of recording it, but I need every file to sync up and be the exact length. This is because I'm trying to use the SidWiz software to make an oscilloscope visualization, and it requires separate channel files that are synced up.
Title: Re: Converting each track of an AHX/HVL tune to WAV?
Post by: deus-ex on 2019-02-07 15:26:14
I did not write to export the module but to save it. In order to silence individual channels you probably will have to delete them entirely. In my first post I named two options to load a module and save individual songs out to WAV format.
Title: Re: Converting each track of an AHX/HVL tune to WAV?
Post by: Essem on 2019-02-07 16:59:35
I did not write to export the module but to save it. In order to silence individual channels you probably will have to delete them entirely. In my first post I named two options to load a module and save individual songs out to WAV format.
Once again, the file only has one song in it. I tried to delete/silence the other channels, but it messed up the BPM as well as some other things. This behavior persisted when I saved as AHX and played it in foobar2000.
Title: Re: Converting each track of an AHX/HVL tune to WAV?
Post by: deus-ex on 2019-02-07 17:48:21
Once again, the file only has one song in it.
So your goal is not to save out individual channels, but to get separate savings of each song/subsong. Besides, I never heard of any module where each song/subsong uses its separate set of channels. Please provide a link to the module in question, or attach it to your next post.

Two options:
1. Load the module into foobar2000/XMPlay, save the entire song to a WAV file, load the WAV file into Audacity, mark and save out each individual track.

2. Load the module into Hively tracker, edit the order list to play only the main song, save to a new module, load new module into foobar2000 or XMPlay, export to WAV-file, repeat procedure for each subsong.
Title: Re: Converting each track of an AHX/HVL tune to WAV?
Post by: Essem on 2019-02-07 18:33:15
Once again, the file only has one song in it.
So your goal is not to save out individual channels, but to get separate savings of each song/subsong. Besides, I never heard of any module where each song/subsong uses its separate set of channels. Please provide a link to the module in question, or attach it to your next post.

Two options:
1. Load the module into foobar2000/XMPlay, save the entire song to a WAV file, load the WAV file into Audacity, mark and save out each individual track.

2. Load the module into Hively tracker, edit the order list to play only the main song, save to a new module, load new module into foobar2000 or XMPlay, export to WAV-file, repeat procedure for each subsong.
Sorry for the confusion. What I mean is that the module only has a single song that has 4 channels. My goal is to save each channel to individual WAV files, similar to OpenMPT's channel rendering. I have attached the file in question.
Title: Re: Converting each track of an AHX/HVL tune to WAV?
Post by: [JAZ] on 2019-02-07 18:51:30
@Essem You are on your own here. You will need to carefully edit the track in the tracker.

kode54s openmpt and dumb plugins for modules allow to mute or unmute channels, but that is not available for this one, which is what you could have used.

I don't think there is any other special tool to extract the indiviual channels of the song.
Title: Re: Converting each track of an AHX/HVL tune to WAV?
Post by: deus-ex on 2019-02-07 19:40:06
I had a look at the tracker again, and yeah, the song goes out of sync just by silencing a channel. Weird. Pattern editing is also a pain in the a**.

I found one solution which does seem to work and leaves the song syncing intact, but it implies a lot of manual work in the pattern editor. By deleting all instrument entries from the instrument column of all but one channel, the tracker still plays the module normally, yet you can hear only the instruments of the one channel with the instrument column left unchanged.
Title: Re: Converting each track of an AHX/HVL tune to WAV?
Post by: Essem on 2019-06-10 14:46:13
I've finally found a method for doing this, however it only works with AHX files. You can use 4IRMANN's fork of UADE (https://blog.airmann.de/uade-multichannel-audio-support/) to create a WAV file with 4 channels then use the included bash script to split it into 4 different files.

Thanks for the help! :)
Title: Re: Converting each track of an AHX/HVL tune to WAV?
Post by: kode54 on 2019-06-11 03:06:10
Oh yeah, my component doesn't have muting capability. I could probably add that in a day or two of work and testing, but I haven't gotten around to it.