[JW Lua] Crash because of extra line feeds

Jan Angermüller jan at angermueller.com
Mon Aug 25 11:50:48 CEST 2014


Am 04.08.2014 09:55, schrieb Jari Williamsson:
> Another thing that has changed is that the way file loads and saves in 
> the editor is very different. The documents should now be consistent 
> between Windows and Mac and pure UTF-8, but you might get some extra 
> line feeds in older documents.

When opening an "old style" script that JW Lua will add
extra line feeds to, you may get a Finale crash when opening
the "Plug-In Def.." dialog on the Development tab and
scrolling down to the parameter options.

Attached is a script where the line feeds were added and
that will crash when doing the above (in Windows 7, Finale 2014, JW Lua 
v0.23).

Maybe you could add a "Replace 0x0d 0x0d 0x0a with 0x0d 0x0a" function.
That will eliminate the added line feed.

Jan
-------------- next part --------------


function plugindef()

   -- This function and the 'finaleplugin' namespace

   -- are both reserved for the plug-in definition.

   finaleplugin.RequireSelection = true

   finaleplugin.MinFinaleVersion = "2010"

   finaleplugin.MinJWLuaVersion = "0.14"

   finaleplugin.Author = "Jan Angermueller"

   finaleplugin.Copyright = "2014 Jan Angermueller"

   finaleplugin.Version = "1.0"

   finaleplugin.Date = "01/18/2014"

   finaleplugin.AuthorEmail = "jan at angermueller.com"

   finaleplugin.Id = "JAMixLRH"

   finaleplugin.CategoryTags = "Note, Percussion, Pitch, UI"

   finaleplugin.ParameterTypes = [[

NumberedList

NumberedList

NumberedList

]]

   finaleplugin.ParameterLists = [[

  0 - C-1,  1 - C#-1,  2 - D-1,  3 - D#-1,  4 - E-1,  5 - F-1,  6 - F#-1,  7 - G-1,  8 - G#-1,  9 - A-1, 10 - A#-1, 11 - B-1, 12 - C0, 13 - C#0, 14 - D0, 15 - D#0, 16 - E0, 17 - F0, 18 - F#0, 19 - G0, 20 - G#0, 21 - A0, 22 - A#0, 23 - B0, 24 - C1, 25 - C#1, 26 - D1, 27 - D#1, 28 - E1, 29 - F1, 30 - F#1, 31 - G1, 32 - G#1, 33 - A1, 34 - A#1, 35 - B1 (Bass Drum 1), 36 - C2 (Bass Drum 2), 37 - C#2 (Side Stick), 38 - D2 (Snare Drum 1), 39 - D#2 (Hand Clap), 40 - E2 (Snare Drum 2), 41 - F2 (Low Tom 2), 42 - F#2 (Closed Hi-hat), 43 - G2 (Low Tom 1), 44 - G#2 (Pedal Hi-hat), 45 - A2 (Mid Tom 2), 46 - A#2 (Open Hi-hat), 47 - B2 (Mid Tom 1), 48 - C3 (High Tom 2), 49 - C#3 (Crash Cymbal 1), 50 - D3 (High Tom 1), 51 - D#3 (Ride Cymbal 1), 52 - E3 (Chinese Cymbal), 53 - F3 (Ride Bell), 54 - F#3 (Tambourine), 55 - G3 (Splash Cymbal), 56 - G#3 (Cowbell), 57 - A3 (Crash Cymbal 2), 58 - A#3 (Vibra Slap), 59 - B3 (Ride Cymbal 2), 60 - C4 (High Bongo), 61 - C#4 (Low Bongo), 62 - D4 (Mute High Conga), 63 - D#4 (Open High Conga), 64 - E4 (Low Conga), 65 - F4 (High Timbale), 66 - F#4 (Low Timbale), 67 - G4 (High Agogo), 68 - G#4 (Low Agogo), 69 - A4 (Cabasa), 70 - A#4 (Maracas), 71 - B4 (Short Whistle), 72 - C5 (Long Whistle), 73 - C#5 (Short Guiro), 74 - D5 (Long Guiro), 75 - D#5 (Claves), 76 - E5 (High Wood Block), 77 - F5 (Low Wood Block), 78 - F#5 (Mute Cuica), 79 - G5 (Open Cuica), 80 - G#5 (Mute Triangle), 81 - A5 (Open Triangle), 82 - A#5, 83 - B5, 84 - C6, 85 - C#6, 86 - D6, 87 - D#6, 88 - E6, 89 - F6, 90 - F#6, 91 - G6, 92 - G#6, 93 - A6, 94 - A#6, 95 - B6, 96 - C7, 97 - C#7, 98 - D7, 99 - D#7,100 - E7,101 - F7,102 - F#7,103 - G7,104 - G#7,105 - A7,106 - A#7,107 - B7,108 - C8,109 - C#8,110 - D8,111 - D#8,112 - E8,113 - F8,114 - F#8,115 - G8,116 - G#8,117 - A8,118 - A#8,119 - B8,120 - C9,121 - C#9,122 - D9,123 - D#9,124 - E9,125 - F9,126 - F#9,127 - G9

  0 - C-1,  1 - C#-1,  2 - D-1,  3 - D#-1,  4 - E-1,  5 - F-1,  6 - F#-1,  7 - G-1,  8 - G#-1,  9 - A-1, 10 - A#-1, 11 - B-1, 12 - C0, 13 - C#0, 14 - D0, 15 - D#0, 16 - E0, 17 - F0, 18 - F#0, 19 - G0, 20 - G#0, 21 - A0, 22 - A#0, 23 - B0, 24 - C1, 25 - C#1, 26 - D1, 27 - D#1, 28 - E1, 29 - F1, 30 - F#1, 31 - G1, 32 - G#1, 33 - A1, 34 - A#1, 35 - B1 (Bass Drum 1), 36 - C2 (Bass Drum 2), 37 - C#2 (Side Stick), 38 - D2 (Snare Drum 1), 39 - D#2 (Hand Clap), 40 - E2 (Snare Drum 2), 41 - F2 (Low Tom 2), 42 - F#2 (Closed Hi-hat), 43 - G2 (Low Tom 1), 44 - G#2 (Pedal Hi-hat), 45 - A2 (Mid Tom 2), 46 - A#2 (Open Hi-hat), 47 - B2 (Mid Tom 1), 48 - C3 (High Tom 2), 49 - C#3 (Crash Cymbal 1), 50 - D3 (High Tom 1), 51 - D#3 (Ride Cymbal 1), 52 - E3 (Chinese Cymbal), 53 - F3 (Ride Bell), 54 - F#3 (Tambourine), 55 - G3 (Splash Cymbal), 56 - G#3 (Cowbell), 57 - A3 (Crash Cymbal 2), 58 - A#3 (Vibra Slap), 59 - B3 (Ride Cymbal 2), 60 - C4 (High Bongo), 61 - C#4 (Low Bongo), 62 - D4 (Mute High Conga), 63 - D#4 (Open High Conga), 64 - E4 (Low Conga), 65 - F4 (High Timbale), 66 - F#4 (Low Timbale), 67 - G4 (High Agogo), 68 - G#4 (Low Agogo), 69 - A4 (Cabasa), 70 - A#4 (Maracas), 71 - B4 (Short Whistle), 72 - C5 (Long Whistle), 73 - C#5 (Short Guiro), 74 - D5 (Long Guiro), 75 - D#5 (Claves), 76 - E5 (High Wood Block), 77 - F5 (Low Wood Block), 78 - F#5 (Mute Cuica), 79 - G5 (Open Cuica), 80 - G#5 (Mute Triangle), 81 - A5 (Open Triangle), 82 - A#5, 83 - B5, 84 - C6, 85 - C#6, 86 - D6, 87 - D#6, 88 - E6, 89 - F6, 90 - F#6, 91 - G6, 92 - G#6, 93 - A6, 94 - A#6, 95 - B6, 96 - C7, 97 - C#7, 98 - D7, 99 - D#7,100 - E7,101 - F7,102 - F#7,103 - G7,104 - G#7,105 - A7,106 - A#7,107 - B7,108 - C8,109 - C#8,110 - D8,111 - D#8,112 - E8,113 - F8,114 - F#8,115 - G8,116 - G#8,117 - A8,118 - A#8,119 - B8,120 - C9,121 - C#9,122 - D9,123 - D#9,124 - E9,125 - F9,126 - F#9,127 - G9

All layers,Layer 1 only,Layer 2 only,Layer 3 only,Layer 4 only

]]

   finaleplugin.ParameterInitValues = [[

37

37

1

]]

   finaleplugin.ParameterDescriptions = [[

Source Note

Destination Note

Select Layer

]]

   return "Mix LH/RH percussion samples", "Mix LH/RH percussion samples", "Alternates LH/RH percussion samples"

end




More information about the JWLua mailing list