m0j0hn / editor-on-fire

Automatically exported from code.google.com/p/editor-on-fire
Other
0 stars 0 forks source link

Feature Request - Midi Track Channelization #290

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
First off, thank you for EOF and providing the new feature to "Save Separate 
Music Midi File".  I have small proposed change and a new feature request that 
will expand the usefulness of the save function.  

A little background ... the Fretlight M-Player program uses standard midi files 
that contains a track that has channelization to activate an LED at the correct 
fret/string position on the guitar.  Fretlight guitar owner's could use EOF to 
produce compatible midi files if midi track channelization is added to the 
"Save Separate Music Midi File" feature.  

Below is an example of Midi Track Channelization for an "A" major chord.

Excerpt of current EOF Output using "Save separate musical MIDI file" - 
notes_music.mid 

Meta TrkName "PART REAL_GUITAR"
Meta Text "A"
NtOn ch=1 n=45 v=64
NtOn ch=1 n=52 v=64
NtOn ch=1 n=57 v=64
NtOn ch=1 n=61 v=64
NtOn ch=1 n=64 v=64
NtOf ch=1 n=45 v=0
NtOf ch=1 n=52 v=0
NtOf ch=1 n=57 v=0
NtOf ch=1 n=61 v=0
NtOf ch=1 n=64 v=0

Proposed EOF Output with Midi Track Channelization 
The track name must be prefixed with "FMP - " for the M-Player program to 
recognize the midi track.  This could even be done by adding a new separate 
track if desired to the existing notes_music.mid format.

Meta TrkName "FMP - Rhythm"
Meta Text "A"
NtOn ch=11 n=64 v=127
NtOn ch=12 n=61 v=127
NtOn ch=13 n=57 v=127
NtOn ch=14 n=52 v=127
NtOn ch=15 n=45 v=127
NtOf ch=11 n=64 v=0
NtOf ch=12 n=61 v=0
NtOf ch=13 n=57 v=0
NtOf ch=14 n=52 v=0
NtOf ch=15 n=45 v=0

Programmatic KEY to Midi Track Channelization

/// <summary>
/// input Guitar String Number 5 - 0 ==> High E, B, G, D, A, low e
/// returns Midi Channel Channel 10 - 15
/// </summary>
public static int StringNum2ChannelNum(int stringNumber)
{
    int midiChannel = 15 - stringNumber;
    return midiChannel;
}

A major benefit of adding midi track channelization is that it would allow a 
new feature to be added to EOF that could "Import" the "Save Separate Music 
Midi File" back into the program that contains the necessary note, string and 
timing data to populate the editor.

Thank you for your consideration.
Cozy1

Original issue reported on code.google.com by cozy...@gmail.com on 19 Feb 2015 at 4:06

GoogleCodeExporter commented 8 years ago

Original comment by raynebc on 25 Jun 2015 at 10:52

GoogleCodeExporter commented 8 years ago
This logic was added in r1417.  Awaiting user testing.

Original comment by raynebc on 26 Jun 2015 at 2:43

GoogleCodeExporter commented 8 years ago
Fretlight MIDI export seems to be done for now.  I don't plan on working on 
musical MIDI import at this time.

Original comment by raynebc on 14 Jul 2015 at 7:11