LABELs in NGC?

Would it, could it, or will it ever be possible to include LABEL definitions in an NGC file?

Its nice to be able to write the definition close to where it is being used.

No, too difficult due to various reasons.

 

Best Regards, Thorsten.

Fair enough. Anyway, it’s not too difficult open an extra editor window. With the script/macro approach it’s easy enough to split the LABEL lines to a separate file for output, anyhow.

http://discourse.midibox.org/t/topic/17501

 

Here a hint: with following perl script:

while( <STDIN> ) {
  if( /^\s*#\s*NGL:\s*(.*)/ ) {
    print "$1\n";
  }
}

 

 

you could simply *extract* NGL commands from a .NGC file.

 

Example:

# this is a .NGC file

# we've some EVENT definitions here
EVENT_xxx ...

# and following commands should go into the .NGL file:
# NGL: COND_LABEL octave
# NGL: COND <28 "128'"
# NGL: COND <40 " 64'"
# NGL: COND <52 " 32'"
# NGL: COND <64 " 16'"
# NGL: COND <76 " 8'"
# NGL: COND <88 " 4'"
# NGL: COND <100 " 2'"
# NGL: COND <112 " 1'"
# NGL: COND <124 "1/2'"
# NGL: COND_ELSE "???'"

 

call:

perl my_ngl_filter.pl < test.ngc > test.ngl

 

and you are done! :smile:

 

->

 

COND_LABEL octave
COND <28 "128'"
COND <40 " 64'"
COND <52 " 32'"
COND <64 " 16'"
COND <76 " 8'"
COND <88 " 4'"
COND <100 " 2'"
COND <112 " 1'"
COND <124 "1/2'"
COND_ELSE "???'" 

 

Best Regards, Thorsten.

Thanks for the hint, TK!

(I’ll continue discussion in the other thread)