Git Product home page Git Product logo

nyanpasu64 / j0cc-famitracker Goto Github PK

View Code? Open in Web Editor NEW
15.0 3.0 2.0 6.87 MB

(Archived, see https://github.com/Dn-Programming-Core-Management/Dn-FamiTracker) Numerous bugfixes for 0CC-FamiTracker (based off 0.3.14.5).

Home Page: https://github.com/Dn-Programming-Core-Management/Dn-FamiTracker

License: GNU General Public License v2.0

C 12.05% C++ 84.19% CMake 0.39% Assembly 3.25% Lua 0.11% Batchfile 0.01%
nes famicom nsf emulator chiptune chiptune-tracker

j0cc-famitracker's Introduction

nyanpasu64 0CC-Famitracker

Shutting down

0.6.3 is the final release. This program has been effectively dead for months to years, as my priorities have moved elsewhere, to building a new tracker from scratch, freed from MFC and being chained to Win32, freed from DirectSound and 40-70 ms of audio latency, freed from a fixed row grid that falls apart as soon as you try to use triplets...

Additionally I can't let this program continue under its current name. I can't have people talking to me about the program under its current name. I should've renamed the program earlier, but never picked one.

The official successor to this program is Dn-FamiTracker. That repository has further changes built on top of FamiTracker, like improving and refactoring sound emulation, though it does not address most other design flaws so far.

Readme

This is a fork of HertzDevil's 0CC-Famitracker 0.3.14.5 (since 0.3.15.1 and master are quite buggy and changing rapidly). It contains bugfixes which HertzDevil has not merged yet (some for months, some fixed independently in 0.3.15.1 or master), as well as N163 multi-wave copy-paste support.

Bugfixes:

  • Export N163 FTI instruments properly.
  • Don't corrupt memory when entering MML volume sequences over 252 items long (instead truncate).
  • Fix bug where find-replacing anything with an empty effect creates " 00" effect.
  • Fix text import instrument loop/release (@owomomo, fixed in 0.3.15.1).
  • Update channel count after importing text (like master). Mark file as modified.

Enhancements:

  • N163 file-specific mixing level offset.
  • Typing Pxx (or FDS Zxx) defaults to P80.
  • N163 wave editor's copy/paste buttons copy all waves at once, separated/terminated with semicolons. This allows for highly efficient Audacity-N163 import workflows (see https://gist.github.com/nyanpasu64/424110eab84dad50cf1a6646a72b2627).
  • Save TXT export path properly.
  • Hi-res FFT spectrogram (like master).

Future changes:

0CC-FamiTracker

0CC-FamiTracker is a modified version of FamiTracker that incorporates various bug fixes and new features which work in exported NSFs as well. The name "0CC" comes from the author's favourite arpeggio effect command. The current version includes:

  • Partial FamiTracker 0.5.0 beta support
  • Sound engine extensions:
    • Ad-hoc multichip NSF export
    • Echo buffer access
    • Polyphonic note preview
  • New effects:
    • Hardware volume envelope effects
    • Delayed channel effects
    • FDS automatic FM effects
    • N163 wave buffer access effect
  • Instrument extensions:
    • Arpeggio schemes
    • Instrument recorder
    • Compatible sequence instruments
  • Interface extensions:
    • Find / replace tab
    • Transpose dialog
    • Split keyboard
  • Extra module contents:
    • Detune settings
    • Groove settings
    • Bookmark manager
    • Linear pitch mode

See the change log for the full list of changes made in 0CC-FamiTracker.

This program and its source code are licensed under the GNU General Public License Version 2. Differences to the original FamiTracker source are marked with "// // //"; those to the ASM source with ";;; ;; ;" and "; ;; ;;;".

The current build is based on the version 0.5.0 beta 5 release of the official FamiTracker. 0CC-FamiTracker will be ported to newer official releases once they become available; features added in 0CC-FamiTracker may not have identical behaviour as the corresponding features on the official branch.

Links

j0cc-famitracker's People

Contributors

hertzdevil avatar nyanpasu64 avatar teuthida255 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

j0cc-famitracker's Issues

Save As or holding Ctrl+S results in error

0cc uses "atomic saving" to a temp file, then renaming over the original. The rename tends to fail while holding down Ctrl+S, or saving as a new name.
devenv_2018-03-24_07-22-22
Holding down Ctrl+S is also present in 0.3.15.2 dev. But I've never had "save as" issues.

Reset VRC6 Phase

https://wiki.nesdev.com/w/index.php/VRC6_audio#Pulse_Channels
There's a way to reset the phase of a VRC6 pulse channel.
I would very much like to be able to do that in order to create repeatable phase effects between the two pulse channels. Currently the phase doesn't reset between notes, so the phase gradually drifts, meaning the phasing effect is unpredictable on successive repetitions.

Key signature guide

Can be there a feature where you can assign a key signature in a module track so that it will be easier to type in correct notes when making an original music?

Instrument editor locks up in Wine

When I try to make an instrument in your 0CC mod in Wine, I get the same lockup as on 0CC-FT 0.3.14.5.

Steps to repro:

  1. Install Debian 9 "Stretch" (64-bit)
  2. Save the registry extract posted by B00daW as 0CC-FT.reg
  3. sudo apt install wine
  4. wine --version which should give wine-1.8.7 (Debian 1.8.7-2)
  5. wine regedit 0CC-FT.reg
  6. wine 0CC-FamiTracker-j0.0.1.exe
  7. New 2A03 instrument
  8. Double-click to open it
  9. Under Instrument settings click Duty / Noise

Result: "Size: - 0 +" and "16 steps" blink, and nothing else responds to a click, until I terminate the process.

Occasionally in vanilla FT 0.4.6, I see them blinking for a short time, but it always resolves there.

N163 wave position setting not working as intended

http://hertzdevil.info/forum/index.php/topic,10.0.html
ch2 mistakenly concludes there isn't room, when Z31+. tested on 0.3.14.5 and master.

When you switch instruments, 0CC doesn't realize the wave size changed until 1 row afterwards. This results in incorrect checking of whether Zxx is allowed. If not allowed, the previous Zxx remains (even if OOB).

Test Case: n163-zxx-validation.zip
Bug analysis: https://github.com/jimbo1qaz/0CC-FamiTracker/wiki/N163-Zxx

TXT export doesn't remember path

explicit CFileDialog(BOOL bOpenFileDialog, // TRUE for FileOpen, FALSE for FileSaveAs
LPCTSTR lpszDefExt = NULL,
LPCTSTR lpszFileName = NULL,
DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
LPCTSTR lpszFilter = NULL,
CWnd* pParentWnd = NULL,
DWORD dwSize = 0,
BOOL bVistaStyle = TRUE);
: CFileDialog(bOpenFileDialog, lpszDefExt, lpszFileName, dwFlags, lpszFilter, pParentWnd, dwSize)
: CFileDialog(bOpenFileDialog, lpszDefExt, lpszFileName, dwFlags, lpszFilter, pParentWnd, dwSize)
CFileDialog d {FALSE, NULL, _T("Theme.txt"), OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, fileFilter};
CFileDialog d {TRUE, NULL, _T("Theme.txt"), OFN_HIDEREADONLY, fileFilter};
CFileDialog d(bOpenFileDialog, _T("0cc"), NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
CFileDialog d(FALSE, _T(".csv"), DefFileName, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, _T("Comma-separated values (.csv)|.csv|All files|.||"));
CFileDialog d(FALSE, _T(".txt"), DefFileName, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, fileFilter);
CFileDialog d(FALSE, _T("csv"), (LPCSTR)m_pDocument->GetFileTitle(),
CFileDialog d(FALSE, _T("dmc"), (LPCSTR)pDSample->GetName(), OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, fileFilter);
CFileDialog d(FALSE, _T("fti"), Name, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, filter);
CFileDialog d(FALSE, _T("wav"), FileName, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, fileFilter);
CFileDialog d(FALSE, ASM_FILTER[1], _T("music.asm"), OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, Filter);
CFileDialog d(FALSE, custom_exporter_extension, default_custom_file_name, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, Filter);
CFileDialog d(FALSE, DPCMS_FILTER[1], DEFAULT_SAMPLE_NAME, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, DPCMFilter);
CFileDialog d(FALSE, NES_FILTER[1], DefFileName, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, filter);
CFileDialog d(FALSE, NSF_FILTER[1], DefFileName, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, filter);
CFileDialog d(FALSE, NSF_FILTER[1], DefFileName, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, filter);
CFileDialog d(FALSE, PRG_FILTER[1], _T("music.prg"), OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, Filter);
CFileDialog d(FALSE, RAW_FILTER[1], DEFAULT_MUSIC_NAME, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, MusicFilter);
CFileDialog d(TRUE, 0, 0, OFN_HIDEREADONLY, fileFilter);
CFileDialog d(TRUE, _T("0cc"), 0, OFN_HIDEREADONLY,
CFileDialog d(TRUE, _T("csv"), 0,
CFileDialog d(TRUE, _T("fti"), 0, OFN_HIDEREADONLY | OFN_ALLOWMULTISELECT, filter);
CFileDialog::OnFileNameChange();
CFileDialog::OnFileNameChange();
Famitracker.cpp/ BOOL CDocManager0CC::DoPromptFileName
FamiTrackerDoc.cpp/ DoPromptFileName(newName, AFX_IDS_SAVEFILE, OFN_HIDEREADONLY | OFN_PATHMUSTEXIST, FALSE, NULL)
FamiTracker.cpp/ DoPromptFileName(newName, AFX_IDS_OPENFILE, OFN_HIDEREADONLY | OFN_FILEMUSTEXIST, TRUE, NULL)

Fixed in #29.

WAV export lag, when switching FDS instruments

There is no desync between channels. But WAV exports with FDS desync, relative to WAV without FDS.

Reported by Teuthida.

Explanation: CChannelHandlerFDS::FillWaveRAM(...) delayed vblank, since it called AddCycles() from outside SoundGen::UpdateAPU(), and m_iConsumedCycles was being reset when CSoundGen::UpdateAPU() was called.

Add global constant for app name and version string

App name is found in name.h and included in stdafx.h.
Version string is found in version.h.

Currently both are #define as string literals, which can be passed into _T(). Unfortunately this is a missed opportunity to reduce binary size slightly.

#define APP_NAME            "j0CC-FamiTracker"
#define VERSION_STR         ...
#define APP_NAME_VERSION    APP_NAME " " VERSION_STR

"0CC-FamiTracker.rc" does not use name.h. Unfortunately even if I edit the file to use parameterized name/version, it will be erased by VS's resource editor. Maybe I could move all strings... and menus... and dialogs? to a separate hand-edited .rc file...

  • IDS_ABOUT_VERSION_FORMAT: Do I place string in resource (translatable) or in C++ (parametric)?
  • add git version-tag into version string

The idr_mainframe string contains some seemingly meaningless file associations. Is it used to update registry file assoc?

"Open dialog" folder should track most recent module directory

  • Drag from Explorer
  • Recent modules
  • This path is also used for WAV export.

I hate how Audacity has like 1 .aup path, at least one export path.

  • When I try opening audio through the dialog, it's probably months old. When I try saving a project, the save dialog's path is probably some old path unrelated to the files I'm using in the project.
  • When I try exporting audio, the export dialog's path is nowhere near the folder I inputted my WAV files in this project from.

I think "separate open dialog path, save dialog, export path" is an idea that looks good on paper, but doesn't capture the reality of how people work on one project contiguously (failure of "cache prefetching").

My input AND output folder AND drag-drop inputs tend to be highly clustered, and generally originate from the same set of paths. If I drag a WAV in from "Project X" folder, if I try to Open WAV, it will be from the same folder, and if I save AUP, it's the same folder, and if I export WAV, same again. Now the export dialog often defaults to some months-old project I won't ever touch again.


Does anyone routinely open modules in 1 folder, then WAV export into another fixed folder? Because I broke that usecase months ago, honestly.

Loading a .TXT color scheme results in an all-black color scheme

This issue is also present in 0.3.15.1 0CC-FamiTracker

Description

If the user loads a .TXT color scheme through the configuration dialog, the resulting color scheme is all black (pattern text, pattern background, cursor, etc.).
Color schemes seem to export properly, as the .TXT files are readable.

Reproduction

Assuming a .TXT color scheme is present:

  1. In Configuration > Appearance, click the Load button and load a color scheme.

System Specifications

Operating System
Windows 7 (64-bit, Home Premium)
Processor
Intel Core i7 Q 720 @ 1.60GHz

Configuration locks up in Wine

When I try to open Configuration to change the buffer length and keymap, I get the same lockup as on 0CC 0.3.14.5.

Steps to repro:

  1. Install Debian 9 "Stretch" (64-bit)
  2. Save the registry extract posted by B00daW as 0CC-FT.reg
  3. sudo apt install wine
  4. wine --version which should give wine-1.8.7 (Debian 1.8.7-2)
  5. wine regedit 0CC-FT.reg
  6. wine 0CC-FamiTracker-j0.0.1.exe

Result: Lockup; task needs to be killed

Expected: Configuration opens

Improve Find dialog.

  • Enhanced wildcards.

    • Already exists: Effect "Z" replace by "X".
      Find and Replace screenshot (effect Z to X)
  • Multi-row replace.


  • Find in selection iff you have a selection
  • Better wildcards (* = multiple characters, ? = one character)
  • Keyboard-based find and replace boxes (08 A 42f) is instrument 08, volume A, effect 42F in any effect column
    • 4xx?
  • "Increase or decrease volume by X"
  • (Possibly, find in row X and replace in row X+1)

What does "Remove original data" do? I should try it out!(edited)

Should the 'Register State' display be handled differently if it can't fit with the pattern display?

At the moment, if the Register State display (View > Register State) is too wide to fit with the pattern display, it simply gets cut off from the right. Since this makes some of the information in the Register State display impossible to see, it may be desirable to handle the Register State display differently.
PNG Example of Register State clipping on a VRC7 module; high-width display, moderately-sized font

The Register State option probably goes often unused, and in most cases, Compact View or even just a smaller font is enough to bring the Register State display back into full view. This may be something to look into sometime in the future.

Some ideas:

Smaller Register State font if too wide

  • Does not fix the Register State "bars"
  • Register State font is already pretty small, will quickly become unreadable (unless a low resolution bitmap font is used?)

Wrapping

  • Does not fix the Register State "bars"
  • Looks unsightly if generically wrapped (e.g. by word or by letter)

Allow scrolling across pattern editor

  • Will result in two horizontal scrollbars (one is used as the column position of the cursor)

Vertically oriented layout if too wide
A mock-up for a more vertical layout:

2A03 registers
$4000: $30 $00    pitch = $000 (    0.00Hz --- +00),
       $00 $00    vol = 00, duty = 0
$4004: $30 $00    pitch = $000 (    0.00Hz --- +00),
       $00 $00    vol = 00, duty = 0
$4008: $00 $00    pitch = $000 (    0.00Hz --- +00)
       $00 $00
$400C: $30 $00    pitch = $0, vol = 00, mode = 0
       $00 $00
$4010: $00 $00    pitch = $0 (    0.00Hz --- +00),
       $00 $00    once, size = 1 byte, position: 00
                  delta = $00
  • Does not fix the Register State "bars"
  • Less readable?

Hide the Register State display if too wide

  • Probably easiest to implement

The bars on the Register State are a problem in most cases. I'm not sure how that can be solved since they take up a lot of width. They do seem to be more of an eye-candy thing, so it might be suitable not to display them at all when space is too tight.

Exponential release envelopes (enabled by \xy)

\xy = Enable exponential release (decrease 8-bit volume by volume>>x + 1, every y frames)
\00 = Restore instrument release settings

Use an 8-bit volume counter.

=:

  • Counter = 16 * register +15
  • Counter = chan * instr. If chan, if instr, if counter < 16, counter = 16.
  • Varies by chip (FDS, sawtooth, etc).

Every y frames:

  • Counter -= (volume>>x) + 1, every y frames
  • Write volume>>4 as effective volume.

Channel volume is restored on next note (like Mxy).


5b/vrc7? Set decay rate to x volume every y frames. For vrc7, any slower should use builtin sliders. For 5B, is 1/4 volume after 64 frames too fast?

VRC7: If FM Channel 1 uses a normal patch and any other FM Channel using a custom patch calls the Ixx effect, the Ixx effect doesn't work [j0CC-Dev-67]

This issue does not occur in 0CC-FamiTracker 0.3.15.1, but does occur in 0.3.14.5

Description

If a note is played on FM Channel 1, the Ixx effect stops working on all channels.
FM channels 2, 3, 4, 5, and 6 don't seem to cause this issue.

What doesn't appear to affect the issue
  • Speed
  • Pitch mode (in Module Properties)
What appears to bypass the issue
  • Using the Ixx effect before FM Channel 1 plays a note
  • Muting FM Channel 1
  • Using the same(?) custom patch on FM Channel 1 as any(?) potentially afflicted channels

Example

vrc7_i00_issue.0cc.gz is a gzip archive file containing a .0cc project which (partially) demonstrates the issue in j0CC. (I tried to attach a .zip file, but it was denied for some reason)
Experimenting with patches/instruments/muting/etc. might help in narrowing down the problem further.
(Note: the D00 frame skipping is likely unnecessary, but it's 2 am and i don't feel like taking it out)

A brief text description

A note with instrument 02 (custom patch) plays on FM Channel 6. Two rows after it, a note with instrument 00 (normal patch) plays on FM Channel 1. Two rows after that, the I00 effect is called on FM Channel 6. Nothing happens on FM Channel 6.

Two notes, from FM Channel 1 and 6, are played at the same time, and use the same instrument (thus, patch). Shortly after, FM Channel 6 calls effect I00. The effect goes through normally, and continues to do so even after the previous events are repeated, but with FM Channel 1 swapped for 2. After the module loops and FM Channel 1 plays again, Ixx breaks and the cycle repeats.

Reproduction

The attached file and/or example should (hopefully) be enough to reproduce, or figure out how to reproduce, the issue. Let me know if anything else is needed.

Operating System        Windows 7 (64-bit, Home Premium)

Save As disables backups??

Why does 0CC only create a backup the first time you save a file after opening it? Is this completely unexpected for anyone else other than me?

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.