GithubHelp home page GithubHelp logo

Comments (7)

Gumball2415 avatar Gumball2415 commented on May 31, 2024

Can you send the instrument file? I can't seem to recreate the corrupt sample having a 0/1 byte size (mine becomes 4 and 17 bytes, respectively)
Edit: Turns out I'm using version 0.2.1 of Dn-FT, that's probably why the file sizes are different from what you reported. I tried to import the corrupted instrument in j0CC-FT 0.6.3 and the sizes of before and after saving matches what you reported.

My steps to reproduce:

  1. open application, then open the demo module Extends Levant in the "after" folder from 0CC version 0.3.15r3
  2. save the instrument named "dpcm bass"
  3. load it back in a new module. The corrupted sample shows a filesize of 4 bytes. (playing the sample at this point will cause the application to crash)
  4. save the module, then restart the application and open the module again The corrupted sample now shows a filesize of 17 bytes (playing the sample also crashes the application)

from dn-famitracker.

nyanpasu64 avatar nyanpasu64 commented on May 31, 2024

dpcm bass.zip has an empty sample, as exported from Dn-FT (I think).

dpcm bass (no crash).zip omits sample 4, causing N/A (which matches the song it was taken from) when importing the .fti. I don't know what program was used to generate this file. But the file dates back from 2017.

from dn-famitracker.

Gumball2415 avatar Gumball2415 commented on May 31, 2024

Compared the two instruments using a hex editor, they are exactly the same apart from one byte in address 0xC2. The instrument which omits sample 4 has 0x04 as the value, compared to 0x05 in the instrument from Dn-FT. Maybe this has something to do with the instrument export?

from dn-famitracker.

nyanpasu64 avatar nyanpasu64 commented on May 31, 2024
  • instrument export should be fixed, to not write the invalid value (or empty name, idk what's wrong).
  • possibly instrument import should be fixed, to not produce corrupted or empty names when importing broken instruments.
  • maybe we should un-blank all empty sample names when loading .0cc files. if so, it's probably a good idea to fix instrument import too.
  • I don't know of an easy way to fix playback of sample names which are stored in memory as empty.

from dn-famitracker.

Gumball2415 avatar Gumball2415 commented on May 31, 2024

I'm theorizing that FT kinda panics doesn't know how to handle when a N/A sample is assigned to a note in instrument export. Previous versions in 0CC (0.3.15r3) and j0CC (0.6.3) exhibited the same behavior, though vanilla 0.4.6 seems to handle it well (it doesn't load the corrupted instrument, but allows the non-crash one)

from dn-famitracker.

nyanpasu64 avatar nyanpasu64 commented on May 31, 2024

HertzDevil has a separate PlayPreviewSample() which doesn't delete the sample:

https://github.com/HertzDevil/0CC-FamiTracker/blob/3fa2cf46f5e5f53cc880cbbd01ebb699b6f743c8/Source/SoundGen.cpp#L939

from dn-famitracker.

Gumball2415 avatar Gumball2415 commented on May 31, 2024

As of commit b68ff8f, reproducing the bug using the steps described above will send a "DPCM sample index out of range" error when Module Error Level is set to Strict or Default.

from dn-famitracker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.