K5KEditor NG Alpha 4 is out

This is a bug fix release. Now, envelopes are correctly displayed.
Check it here :
binary k5keditorA4.zip
sources k5keditorA4-src.zip

Short K5KEditor NG user's guide

Before starting the software
You must plug your midi interface then you can start the editor.
It is quite long to start (up to 15 secondes). Once it is started, check midi setting in the "Edit->Settings" window. Choose your midi device, and your midi channel. The two others parameters are used by the sysex subsystem's buffer (SysexManager).
For Apple users, something can be missing on your OSX system, it's the so-called MidiDeviceProvider component for Java, which has been missing on OSX by some odd tradition. You can get one here: http://www.mandolane.co.uk/

 
SysexManager
As you already know, the K5000 serie own a lot of data. If you send them too quickly to the synthesizer, it can miss some information. That is why I wrote a special SysexManager that sends data in a separate thread. The K5KEditor sends its data to the SysexManager and the SysexManager sends the data to the synthesizer. That give more responsiveness to the IHM as it does not need to wait the sending of the data.
The SysexManager shows its buffer's status the low left part of the main windows (info bar) : "XX bytes remaining".
 
Source selector
In the toolbar, you select the source that is currently edited.
 
Menus
There are 4 main menus.
1- The first one manages files, you can load KA1 file format (K5000 specific) and K5K file format (K5KEditor specific). You also can load and save separate source in a K5K file format.
2- The second one allows you to copy sources. First select in the Source selector the one you want to copy. Click "Edit->Copy Source". Select the destination source and click "Edit->paste Source".
3- The third one manage source data. Just click on each submenu to shows what you can do with it. Almost each comboBox can be edited by just moving the mouse wheel over it. The most important screen manages harmonics. Left Click on "Loud", "Attack Rate", "Release level", ... it shows its data in the "Edit" histogram. Choose the type of edition you want to perform in "edition Type" ("Normal", "Octave", "Bright", ...). Choose the depth of the edition in "Edition depth" (it only affect some type of edition). Then move your mouse wheel over the "Edit" Histogram to edit data.
You can right click on "Loud",  "Attack Rate", "Release level", ... to copy/paste/load/save/... part of data.
4- The last one manage contributions by ohters.

Short K5KEditor NG developer's guide

Here is a short guide for people that want to add some tools to the K5KEditor NG
 
The K5KEditor NG is composed of 3 layers :
- the first one manages sysex communications, loads and saves files.
- the second one manages all the data logic (k5keditor.model)
- the third one manages the GUI (k5keditor.view).
 
Retreiving and managing K5000 data
- The data structure uses a Composite pattern (http://en.wikipedia.org/wiki/Composite_pattern). The top class is the AbstractK5KObject. It has three subclass K5KObjectComposite, K5KObjectLeaf and NullK5KObject.
- each K5KObject owns a K5KType (LFO, LEVELS, DCA, FORMANT_BAND, ...) that allows to retrieve a specific object with this uniq information. 
- There is only one class that allows to access to the data structure : ModelManager. It is a Singleton and Facade pattern (http://en.wikipedia.org/wiki/Singleton_pattern, http://en.wikipedia.org/wiki/Facade_pattern). To get the tone model just call ModelManager.getInstance().getToneModel(). To get the DCA from the second source just call ModelManager.getInstance().findFirst(K5KType.SOURCES[1], K5KType.DCA).
- ModelManager allows you do other actions : ModelManager.getInstance().copy(AbstractK5KObject),  ModelManager.getInstance().paste(AbstractK5KObject), ModelManager.getInstance().load(AbstractK5KObject, File), ModelManager.getInstance().save(AbstractK5KObject, File).
- Once you have the desired K5KObject, you can access its data with de getData(Index) and setData(index, Value) methods. When you call setData(Index, value), the modified data is automaticaly send to the SysexManager.
- To perform specific actions you can use some Decorator (http://en.wikipedia.org/wiki/Decorator_pattern) in k5keditor.model.decorator. For example you can decorate the Common object like this :
AbstractK5KObject object = ModelManager.getInstance().getToneModel();
Common common = new Common(object);
 
i18n
K5KEditor NG support the internationalization.
You just have to put your strings in k5keditor.i18n.i18n.properties for default name. You just have to add a file in your language to translate the K5KEditor. A k5keditor.i18n.i18n_fr_FR.properties will contain french translation.
To obtain the string in your language, just call Constant.getI18n("yourString")
 
Creating custom screen
The main Frame is called MainWindow. It handles K5kInternalFrames. A K5kInternalFrame shows K5KPanels.
- A K5kInternalFrame must contain two method : initGUI that places all the K5KPanel and refreshData() that calls the refreshData() method of the handled K5KPanels.
- A K5KPanel must contain 3 methods : initGUI that places all the components (ComboBox, TextField, Histogram, ...). refreshData() that refreshes all the components and refreshView() that only refreshes histograms. 
 
K5KPanel
To easily add components the K5KPanel contains several usefull methods :
    - addTitle() that add a title
    - addlabel() that add a label
    - addInnerComponent that add a non final component in the line
    - addFinalComponent that add a final component
    - getComponent that create a ComboBox with all the needed listener
    - getComponentAndUpdateView that create a ComboBox with all the needed listener and update the desired histogram
    - setComponentPopupMenu that add a popup menu to a component.
 
Give a look at k5keditor.view.dco.DcoPanel to understand how to create a simple screen with Integer values, String values and an envelope automatically refreshed when you move your mouse wheel over the attack time ComboBox.

Sortie du K5KEditor NG Alpha 3