GithubHelp home page GithubHelp logo

wohlstand / opn2bankeditor Goto Github PK

View Code? Open in Web Editor NEW
40.0 8.0 8.0 3.09 MB

A small cross-platform editor of the OPN2 FM banks of different formats (Downloads in README below)

License: GNU General Public License v3.0

C++ 90.80% QMake 0.11% C 8.26% CMake 0.62% Python 0.16% AppleScript 0.06%
opn2-emulator opn2-bank-editor opn2-fm-banks ym2612 ym3438 bank-format fm-synthesizer opn2

opn2bankeditor's People

Contributors

atsushieno avatar freq-mod avatar jpcima avatar opna2608 avatar sdhizumi avatar wohlstand avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opn2bankeditor's Issues

Implement WOPN v2

New version of WOPN must have

  • MSB/LSB bank ID alias per every bank
  • Measured sustaining and releasing sounding lengths to allow MIDI player better manage business of chip channels

Notes are played at wrong pitch after modifying parameters

Steps to replicate:

  • Open any bank, select any instrument
  • Play any note, for example 76)
  • Change any paramenter, for example second operator's Decay 2 value (WARNING: you must do it by typing in values, using up/down UI buttons won't work)
  • Hit "Play note" button once again
  • That's it. Most of the time, note will be played at wrong pitch/octave. Changing previously modified parameter will give different results

This bug can be hard to replicate, since it seems to be very random. Tested on Nuked OPN2 core.

cmdline utilites?

I would like to have command line utilities for converting wopn to a format convenient for editing in a regular editor (gedit, geany, mcedit, nano, ...).

Fix UI imperfections

Fix next imperfections:

  • Add description for SSG-EG values
  • Add a right tooltips and replace old tooltips which are came form OPL3 bank editor and wasn't changed after reworking.
  • Add bank rename button as in the OPL3 Bank Editor

Instrument importer cannot import multiple files

I got some patches online for touhou, but the gyb import just imports the same instrument 100 times, which seems wrong (but probably not the converters fault), and the instrument importer, which does read dmp and vgi correctly, will only import them 1 at a time through the menu, please consider allowing people to drag multiple single instrument files into the instrument importer.

Link for 64-bit Windows dev build is broken

404

Just letting you know. It might have something to do with AppVeyor, while win32 artifact is present, 64-bit:
Collecting artifacts...
No artifacts found matching 'opn2-bank-editor\opn2-bank-editor-dev-win32.zip' path

Support for other instrument formats part 2

Since OPN instrument format support was brought back, it seems that there are more formats that could be supported here:

  • VGI (created for VGM Music maker, very close to TFI, specs: https://vgmrips.net/wiki/VGI_File_Format
  • S98 (info and specs: https://vgmrips.net/wiki/S98_File_Format, supports both 2608 and 2612)
    BambooTracker formats, specs are provided with a source code:
    • BTI
    • BTI 1.4.0+
    • BTM
    • BTB
  • YM2608 VGMs
  • YM2151 VGMs and S98s
  • MML text formats
  • PMD .FF file format
  • YM2203 VGMs
  • YM2608 Tone Editor .bank files
  • PMD .M(2) song data files

examples.zip

Rework layout for smaller screens

Anything below OP3 and OP4 "Detune" parameter is invisible, including piano keys and there is no way to resize the window for it to fit.
The same applies to OPL3BE.

Implement the instrument import from the VGM files

With using of VGM specification, implement the import of YM2612 instruments from the VGM files
http://vgmrips.net/wiki/VGM_Specification

Algorithm is simple:

  • make the memory block that replicates YM2612's memory
  • every command write any register data into it (if DAC flag is toggled on, drop any commands related to channel 6, or export catched sample sequences as WAV files)
  • every non-zero delay fetch the data of registers, compare with existing instruments and append if case was not passed

Allow detuning percussion instruments by n cents

In OPL3-BE you can detune second voice against the first. Here, I would like to ask about option to change the pitch of OPN2 voice by up to 128 cents up or down. Reason for that - some OPNA FM percussion instruments aren't compatible with OPN2... unless you turn the pitch down by some cents (for C6, it's around 70).

Tomsoft instruments

Below is an archive which contains the melodic set.
Tomsoft.tar.gz

This file has:

  • a rom which has two songs, which go through all the melodics 0-127 or drums 0-127 and play them
  • a gym dump of the 2 songs
  • a wopn file of the melodics

I took the melodics from a GYM dump and a slightly modified importer, such that there are the 128 of them in the GM order, and allowing duplicates (as the bank has a few).
For the drums, I have not found how to make sense of the percussive dump.

Definition of rate scale level [question]

Rate Scale Level.
Attenuates level output towards higher pitch.

It just a question at this point. I think it rathers shortens the ADSR envelope towards higher pitch rather than attenuating modulation/output. Take a look:

Notice that volume and timbre of instrument didn't changed, its envelope did instead. Even release rates got compressed. If you want, you may create an instrument thats just sine wave with attack rate=31 and release rate=15 and then play with RSL. Output will stay the same.

Looks like description was copied from OPL3 bank edit, key scale level rate. OPN/OPM don't have it.

VGM importer glitchy behaviour

On some rare occasions, VGM importer won't detect every instrument in .vgm file.
example - 15 - Expander.zip - importer sees only 3 instruments, while there are much more than that (such as detuned piano playing on YM2612 Channel 0 and 1, is missing).

YMX banks

Found a format of banks and its documentation : https://segaretro.org/YMX

The format is present in multiple software and there exist some instruments to be found.
In the software "Sonic QX" there are banks : S2b-81.ymx Saxman.ymx

Bug when importing instrument with no item selected on a main window list

Rather minor bug, but anyway:

  1. Open bank editor with no bank loaded, don't click on any item on an instrument list yet
  2. Import an external instrument (either single one, or from a bank)
  3. When attempting to import it, an error will pop up, so select any target instrument from main window and proceed...
  4. Instrument will get imported properly, but there won't be any sound until you change any FM parameter or move to different blank entry on instrument list and forth.

Happens on OPL bank editor as well.

Open importer when dropping sole instrument files into main window

It's inconvenient to open importer and load instrument file into it each time to just import one small silly instrument. It's would be a good thing when attempt to drop the single-instrument file into the main bank editor window, will automatically open the Importer and will load the instrument into it to let user choice the import destination or quickly preview the instrument itself.

Crash on attempt to import non-GM instrument on a case of bank absence

When you have count of bank less than importing instrument, the crash will happen as the reason of instruments store arrays mismatch. To fix this, it's need to check the instrument number, and then automatically expand the banks set to let instruments be correctly imported.

P.S. It's absolutely same crash on OPL3 Bank Editor as the same importer code was used in both cases.

Feature request: ability to detune an instrument by n cents

Some instruments, like cymbals, hi-hats, triangles, etc would greatly benefit from it. The same can apply to OPL3-BE - when having dual 2-op voice, second voice can be detuned. If the voice 2 is pasted as voice 1, when creating a normal 2-op instr, detune information is lost.

[Measurer] Too long sounding delays values calculated on MAME emulator

Originally, coefficients was calibrated on GENS and channel management worked fine. However, after switching into MAME as sounding delays computation, resulted values are became too long. In result, OneStop.mid began to break synth strings in begin. When re-calculate full xg.wopn bank with GENS, everything is playing fine. It's need to re-calibrate all coefficients to give correct values on MAME emulator are will don't harm channel management in libOPNMIDI.

Problem exporting to WOPN format

When a GEMS banks is open and then saved as WOPN file, this WOPN file cannot be opened again.
An error is raised about a bad format.
My suspicion in on the exporter, as it is not able to open this file the wopn_file library either.

[Bug]Instrument list keeps jumping to GM1 Melodic bank after changing LSB

This bug is weird, it seems to occur consistently, yet with many prerequisites. Only steps to replicate I can come up with:

  1. Open this bank: toho.zip (WIP Pc-98 bank, might be used as example libOPNMIDI FM bank when it's finished)
  2. Change MIDI standard to "Roland GS"
  3. Go to SC-88 Map Var 16
  4. Change LSB to 3 and then back to 2
  5. You will be thrown to default GM1 bank.

There might be other ways to replicate this behaviour, I guess.

Definitions of banks for XG and other standards

It has these XG percussion banks.
Some numbers disagree with the naming, with value off by 1.

Name MSB LSB
48 - Orchestra 000 048
26 - AnalogKit 000 025
25 - ElectroKit 000 024
2 - StandardKit2 000 001

In contrast, this is the data I collected from Sekaiju's MU1000 instruments.
On the left is MSB:Program with 0-indexing.

P127:048  "YAMAHA MU1000/MU2000 #049 SymphKit"
P127:025  "YAMAHA MU1000/MU2000 #026 AnalgKit"
P127:024  "YAMAHA MU1000/MU2000 #025 ElctrKit"
P127:001  "YAMAHA MU1000/MU2000 #002 StndKit2"

(in comparison, XG spec indicates MSB in 0-indexing, LSB constant at 0, and Program in 1-indexing)

Check out the OPNA chip

https://www.vogons.org/viewtopic.php?p=704730#p704730

SLON: What about the possibility of using the YM2608 core? It was distinguished by the presence of additional SSG and ADPCM (and RHY-channels), and also, as far as I know, a higher-quality DAC. True, I do not know how useful this will be for MIDI.

Wohlstand: It's dependent on the availability of necessary emulator and the chip specification I can use to provide an interface. For now, libOPNMIDI doesn't use DAC, but its support is WIP. On side of libOPNMIDI are three emulators: Nuked OPN2 is implemented YM3438 chip, but it's very powerful and won't work on slow hardware in real-time if you running more than 3 chips; MAME OPN2 is implemented YM2612, doesn't using much power, but is a most balanced emulator that gives well-accurate and doesn't eat too much CPU; And the GENS 2.10, the old and inaccurate emulator, but, the fastest emulator I have at me.

If the OPNA chip has compatible ABI, we can try to use it as an alternative chip together with existing OPN2 chips. For the case of DAC-equipped chips, they are all will have the sample-streamer on the side of ChipSet base backend, and necessary to do that from outside. The only exception would be for OPNA that does support of ADPCM.

  • Provide at least one OPNA emulator at libOPNMIDI
  • Provide at least one OPNA emulator at OPN2BankEditor
  • Provide a support for file formats are related to OPNA bank / instrument formats
  • Add PMDWinS036 OPNA emulator to verify FM block behaviour (https://github.com/pbarfuss/PMDWinS036)
  • Add MAME OPNA emulator code
  • Add support for OPNA-specific bank / instrument file formats are also can be used here
  • Make WOPNv3 know about OPNA Rhythm instruments (NP2 supports custom samples passed, I wanna check this at evening)
  • Research SSG-EG capabilities
  • Research and implement PSG support
  • Research and implement OPNA Rhythm
  • Wohlstand/libOPNMIDI#5

Build error on delay_analysis.cpp

I'm trying to build the package on the AUR (package opn2bankeditor-git), and I've been having this error:

/home/yohanan/.cache/paru/clone/opn2bankeditor-git/src/OPN2BankEditor/src/delay_analysis.cpp: In member function ‘virtual double DelayAnalysisDialog::PlotData::y(double) const’:
/home/yohanan/.cache/paru/clone/opn2bankeditor-git/src/OPN2BankEditor/src/delay_analysis.cpp:250:15: error: cannot declare variable ‘spline’ to be of abstract type ‘QwtSpline’
  250 |     QwtSpline spline;
      |               ^~~~~~
In file included from /home/yohanan/.cache/paru/clone/opn2bankeditor-git/src/OPN2BankEditor/src/delay_analysis.cpp:29:
/usr/include/qwt/qwt_spline.h:57:18: note:   because the following virtual functions are pure within ‘QwtSpline’:
   57 | class QWT_EXPORT QwtSpline
      |                  ^~~~~~~~~
/usr/include/qwt/qwt_spline.h:176:26: note:     ‘virtual QPainterPath QwtSpline::painterPath(const QPolygonF&) const’
  176 |     virtual QPainterPath painterPath( const QPolygonF& ) const = 0;
      |                          ^~~~~~~~~~~
/home/yohanan/.cache/paru/clone/opn2bankeditor-git/src/OPN2BankEditor/src/delay_analysis.cpp:251:12: error: ‘class QwtSpline’ has no member named ‘setPoints’
  251 |     spline.setPoints(poly);
      |            ^~~~~~~~~
/home/yohanan/.cache/paru/clone/opn2bankeditor-git/src/OPN2BankEditor/src/delay_analysis.cpp:254:35: error: ‘class QwtSpline’ has no member named ‘value’
  254 |     double interpolatedY = spline.value(x);
      |                                   ^~~~~
make[2]: *** [CMakeFiles/OPN2BankEditor.dir/build.make:361: CMakeFiles/OPN2BankEditor.dir/src/delay_analysis.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:238: CMakeFiles/OPN2BankEditor.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
error: failed to build 'opn2bankeditor-git-1.3.beta.r80.g78c2a34-1':
:: Packages failed to build: opn2bankeditor-git-1.3.beta.r80.g78c2a34-1

Any clue on what this could be? I believe it's versioning related but I'm not sure what version of what program I should switch to.

Importer usability

After some work on improving the importer, I find importer use to be kind of confusing by some aspects, and it's possible to improve the user-friendlyness.

  • when an instrument is imported into the selected slot, you can't play it; you have to select another and go back to this instrument, to allow it to play.

  • when under "assign" mode, the instruments assign to the melodic/percussive side of banks depending on which panel it is that is selected in the main window. In my opinion, it is not intuitive.

I prefer if the importer had a choice which says: "Where do you want the instruments to go into?".

  • Same (the default choice)
  • Melodics
  • Percussions

Copy and paste with textual instrument formats

If it can copy and paste instruments using text formats, OPN2-BE is able exchange to quickly with other software, without needing to involve files in the workflow.

(software: BambooTracker, Mucom88, and mine, as a feature that I will add)

We already have OPM implemented, for which BT has support, I guess it would be an adequate choice.

Options for VGM importer

Because of the case noticed by @freq-mod, there is a big source of duplicated instruments that appear because they were altered by the original driver. To resolve this, it's reasonable to provide some options to specify different conditions on how instrument differences will be recognized (for example, ignore any LFO changes, etc).

Global clipboard support

It's would be cool to be able open two separated bank editors and copy / paste instruments between of them. For now, the clipboard is only internal and can copy and paste instruments inside of same instance of BE. It can be solved by any of ways:

  • Shared memory block that will store the raw structure copy and some helpful meta-data (And, the version of BE to avoid cross-version conflicts).
  • Temp file where instrument will be stored, which can be auto-imported from another instance of BE.
  • Dump instrument structure as bytes array and export into OS regular clipboard.

P.S. The task is same for OPL3-BE too. Why I wrote here? I have tried to organize GENS bank into GM, but I have found it would be more convenient to open two instances of same BE and paste copied instruments into another opened bank.

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.