origamiscienceguy / FurnITure_Audio_Engine

Furnace Tracker and Impulse Tracker audio driver and library for the GameBoy Advance
MIT License
9 stars 1 forks source link

Emitted source won't compile for some IT files #1

Closed aronson closed 3 weeks ago

aronson commented 3 weeks ago

I tried to compile the emitted files after running the script using a project based on meson-gba that does not import or use tonc types by default.

Ran into this:

../audio/assets_processed/_MENU_a_menu.c:8:1: error: expected expression before 'cu8'
    8 | cu8 _MENU_a_menuPattern0[] = {
      | ^~~

I believe the emitted files and/or headers they include should include the headers for the tonc types they depend on. However... perhaps it would be better to use standard type identifiers? Including the tonc_types header globally is not an option in all projects.

aronson commented 3 weeks ago

I seem to be mistaken, reviewing the files they import everything! What I'm getting is a duplicate line or something

InstrumentData _MENU_a_menuInstruments[] = {
cu8 _MENU_a_menuPattern0[] = {
    0x81, 0x3, 0x47, 0x11, 0x82, // ....
}

I think it's because the tracks I used failed to parse:

Now working on MENU_a_menu.it

writing to file _MENU_a_menu.c

(141374/141374) bytes read successfully. Extracting data.

Asset Name: veryshorty
(8/8) sequenced patterns successfully formatted.
(0/0) instruments successfully formatted.
(3/3) patterns successfully formatted.
    (1/31) Sample: _xtndforthp successfully formatted.
    (2/31) Sample: _bysupernao successfully formatted.
    (3/31) Sample: _mostofthesamples successfully formatted.
    (4/31) Sample: _byshortyhopeyou successfully formatted.
    (5/31) Sample: _wontmind successfully formatted.
    (6/31) Sample: _ is a blank sample, unnamed samples are not permitted.
    (7/31) Sample: _ is a blank sample, unnamed samples are not permitted.
    (8/31) Sample: _ is a blank sample, unnamed samples are not permitted.
    (9/31) Sample: _ is a blank sample, unnamed samples are not permitted.
    (10/31) Sample: _ is a blank sample, unnamed samples are not permitted.
    (11/31) Sample: _ is a blank sample, unnamed samples are not permitted.
    (12/31) Sample: _ is a blank sample, unnamed samples are not permitted.
    (13/31) Sample: _ is a blank sample, unnamed samples are not permitted.
    (14/31) Sample: _ is a blank sample, unnamed samples are not permitted.
    (15/31) Sample: _4 successfully formatted.
    (16/31) Sample: _junglebreak1 successfully formatted.
    (17/31) Sample: _ is a blank sample, unnamed samples are not permitted.
    (18/31) Sample: _ is a blank sample, unnamed samples are not permitted.
    (19/31) Sample: _ is a blank sample, unnamed samples are not permitted.
    (20/31) Sample: _ is a blank sample, unnamed samples are not permitted.
    (21/31) Sample: _ is a blank sample, unnamed samples are not permitted.
    (22/31) Sample: _ is a blank sample, unnamed samples are not permitted.
    (23/31) Sample: _ is a blank sample, unnamed samples are not permitted.
    (24/31) Sample: _ is a blank sample, unnamed samples are not permitted.
    (25/31) Sample: _ is a blank sample, unnamed samples are not permitted.
    (26/31) Sample: _ is a blank sample, unnamed samples are not permitted.
    (27/31) Sample: _ is a blank sample, unnamed samples are not permitted.
    (28/31) Sample: _ is a blank sample, unnamed samples are not permitted.
    (29/31) Sample: _ is a blank sample, unnamed samples are not permitted.
    (30/31) Sample: _ is a blank sample, unnamed samples are not permitted.
    (31/31) Sample: _smokumifyougotany successfully formatted.
(8/31) Samples successfully formatted
Asset: veryshorty completed with 23 failed samples

A lot of old .IT files are going to have data like this, are they unusable by this project? I can send the files along if that would help

EDIT: The file can be found here

origamiscienceguy commented 3 weeks ago

Hello, right now, the name of the sample is used to detect duplicate samples (in order to save ROM space) which means that samples with no names are not permitted. Try giving each sample a unique name in OpenMPT, and running the script again.

I recognize that this is not a convenient requirement, which is why I will be utilizing a better method of duplication detection in version 2.

aronson commented 3 weeks ago

Thank you for the prompt response! I've managed to work around these issues with your assistance. Hyped for the update that will make this easier.