forked from jwdj/EasyABC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CHANGES
532 lines (402 loc) · 24 KB
/
CHANGES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
1.3.5.P6
self.svg_width, self.svg_height = float(self.svg.get('width')), \
ValueError: invalid literal for float(): 8.50in
causes easy_abc to fail displaying sheet music.
Analysis: later version of abcm2ps contain
Fix: in svgrenderer.py, included the patch for compatibility with
later versions of abcm2ps. Thanks to Frederic Aupepin.
#later versions of abcm2ps adds in suffix after width or height
#self.svg_width, self.svg_height = float(self.svg.get('width')), \
# float(self.svg.get('height'))
if re.search('^\d+$', self.svg.get('width')):
self.svg_width = float(self.svg.get('width'))
else:
self.svg_width = float(self.svg.get('width')[:-2].strip())
if re.search('^\d+$', self.svg.get('height')):
self.svg_height = float(self.svg.get('height'))
else:
self.svg_height = float(self.svg.get('height')[:-2].strip())
#End of patch for width / height in inch
A similar patch was inserted in easy_abc.py for OnPrintPage
m = re.search(r'width="(\d+[.]?\d*)(?:in"|")\s+height="(\d+[.]?\d*)(?:in"|")', svg)
if re.search('^\d+$', m.group(1)):
width = int(m.group(1))
else:
width = float(m.group(1))*72
if re.search('^\d+$', m.group(2)):
height = int(m.group(2))
else:
height = float(m.group(2))*72
the *72 is to convert from inch to pixel.
On Debian 7.0 Linux, the staff lines, bar lines and note stems
appear too dim. The following patch in svgrenderer was created
by Frederic Aupepin.
def set_stroke(self, dc, svg_stroke, line_width=1.0, linecap='butt', dasharray=None):
#Patch to avoid to have too dim lines for staff, bar, note stems
if line_width < 1:
line_width = 1.0
#End Patch
Clear cache fails in case the media player is not installed.
This occurs in Linux, when the MIDI player is not setup correctly.
Analysis: easy_abc attempts to stop a nonexistent media player.
Fix: in def OnClearCache(self, evt):
ensure that the media player exists with the statement
if self.mc != None:
1.3.5.P7
New arguments added to function AbcToMidi to allow having different instrument for chord, bass and each voice
This also impacts function OnExportMidi, On ExportAllMidi and PlayMidi to give the required arguments.
abc_code is modified in a way that MIDI instruction are added just after a V:Id line to set instrument, volume and pan for that voice and also add instruction for gchord in case gchord are defined in that voice
add in abc2midi a patch to write in the cache folder of EasyABC the abc file that is passed to abc2midi
#Write temporary abc_file (for debug purpose)
temp_abc_file = os.path.abspath(os.path.join(cache_dir, 'temp_%s.abc' % hash))
f = open(temp_abc_file, 'wb')
f.write(abc_code)
f.close()
Abcm2psSettingsFrame
Add wx widgets to be able to set instrument for chord and bass and to open a new dialog for setting midi instruction per voice.
MidiChannelInstrumentSettingsFrame
New dialog to be able to define some MIDI instruction per voice
Add management of events MEDIA_FINISHED and MEDIA_STOP to be able to have the first one and relaunch as soon as possible if playback is launched with looping (with a double click on the play button)
self.Bind(wx.media.EVT_MEDIA_FINISHED, self.OnMediaFinished)
self.Bind(wx.media.EVT_MEDIA_STOP, self.OnMediaStop)
Remove the indication Experimental in the menu concerning MusicXML export
1.3.5.P8
Fixed an issue with the arrow keys used to move the cursor in the
abc edit window. The highlighted note in the music panel now shifts
with the cursor in the edit window.
Fixed an issue with regard to playing a tune (converting to MIDI)
which contains none ascii characters. The temp file is now saved
in itu-8 encoding.
The F7 button will stop the MIDI player.
Introducing a new application abccore.py created by Seymour
Shlien. It is still in development.
Updated locale/it (thanks to Guido Gonzato).
Small change to midi/EventDispatcher.py to prevent midi2abc.py from
crashing on a particular MIDI file.
1.3.5.P9
Added options in abc settings menu to specify the path to
ghostscript and ps2pdf converter. (There may be issues with
run time parameters for ps2pdf.)
I am introducing a new function check_settings() in easy_abc.py
which looks and reports possible problems.
I have updated the module xml2abc_interface.py to be compatible
with the latest versions of abc2xml and xml2abc.
The abc settings dialog box was converted into a tabbed book.
The first page contains links to external executables.
The next page contains abc2midi options for specifying
musical instruments.
In event the easyabc does not play MIDI files correctly,
a link to an external MIDI player may be specified in the
abc settings menu.
The retrieving of MIDI files and pdf files from the
cache area has been disabled to allow the program to
run in a more repeatable manner. (Eventually the
caching of MIDI and pdf files be eliminated.)
Two new function available in the 'Internals' menu
item (which is new), allow you to view the error messages
and warnings returned by external programs like abc2midi
and see the abc file that is input to the program.
The PO9 version was developed on Debian Linux. When
the program was tested on Windows 7, two new problems
were exposed. 1) When an external MIDI player was
selected using the Abc Settings, the MIDI player failed
to find the created MIDI file. A message of the sort,
MidiThread object has no attribute 'midiplayer_path'
was returned. Explanation: abc2midi creates the midi
file using a separate thread which runs in parallel with
EasyAbc so as to not disrupt the user interface. Unfortunately,
on Windows, EasyAbc starts to call the midiplayer before
abc2midi is finished. The fix was to force EasyAbc to
wait a half a second prior to calling the midiplayer.
2) Using the built-in MIDI player on Windows 7, another
problem was encountered. The first time a particular
tune is played, there is no problem. However if we
go back to this tune and try to play it again, nothing
happens. Explanation, this problem was introduced
when I disabled the cache. Abc2midi tries to write
the MIDI file again, but the file was locked by the
MIDI player despite the fact that the player had
finished playing it a long time ago. (This is an
issue with DirectShow or the wxpython MediaCtrl
software.) In order to ensure that the MIDI file is
not locked by the player, it was necessary to load
a nonexistant MIDI file after the media player stops.
1.3.6
This is a major revision of the code. The goal of the
changes were to add a few more features and to make
the program more transparent and easier to maintain.
The internals menu item was added in order to allow the user
to see how the program interacts with the external executables such
as abc2midi and abcm2ps.
The abc settings menu was expanded to a tabbed book instead
of a bunch of dialog box. This will leave lots of room for
adding more features.
The operation of the abc file settings has been changed.
In the earlier version, the user would leave an entry blank
in order to indicate that the program should use the default
executables. Now the program shows the path to the executables
when they are found in the easyabc/bin folder.
Version 1.3.5 and earlier would cache all created midi,
svg, postscript, pdf, abc files that it created to save
some computation time. The file names were computed by
a hashing function based on the contents of the abc tune
and were meaningless to the user. If the user was not
careful to purge the cached folder occasionally, it could
grow indefinitely. The caching has been eliminated in
version 1.3.6; all temporary files needed are called
such as temp.abc, temp.midi, temp001.svg and etc. and
are overwritten as the program runs.
The calling sequence to AbcToMidi() was simplified. The
self.settings dictionary is passed, and the function extracts
all the necessary options from that dictionary.
In a similar manner, the call sequence to AbcToSvg was
also simplified. Now it will be easier to add more options
rather than having to expand the calling sequence.
The default loudness was increased from 64 to 96. From my
experience some of the instruments sound to faint at a
volume level of 64.
The handling of channel settings was simplified. Now all
16 channel settings are stored even if they are mostly the
same.
A new tool for searching a folder and all its sub-folders
for tunes containing a certain word in the title was
introduced. The titles of all the matching tunes are put
in a list box. Clicking on one of the titles will cause
easyabc to load the file containing the tune and scroll
down to this tune.
After a lot of work, the new function is almost bug free.
The function find_abc_string locates the character position
of the tune of interest in the input file and stores this
position in the python dictionary type called self.searchlocator
and the path of the input file in self.searchpaths. The index
of the dictionaries reflect the position of the tune title
in the search listbox. When the user selects one of the tunes
in the search listbox, the function OnItemSelected will load
the editor with the corresponding file and editor will set
the position to the location stored in searchlocator. If
everything works correctly, the editor will automatically display
the selected music and highlight the selected tune in the
tune_list listbox.
I had a lot of difficulty getting the editor to position
itself to the correct tune. First there was the issue of
special characters which occupied more than one byte. This
was finally resolved by encoding the text in the file in
the same manner that it is encoded in the editor. Secondly,
Python converts all newline characters to one character
even though it may be a CR/LF. This caused a problem on
Windows but not on Linux. The eventual fix was to read the
input abc file as a binary file in order to bypass this
conversion.
The popup error messages which may occur when an error is
reported by abc2mps has been suppressed in the function
OnMusicUpdateDone(). Instead errors and warnings are indicated
in the status bar which located at the bottom of the interface.
The nature of the warning or error can be determined by clicking
the menu item 'Internals/command messages'. The status bar is also
used to acknowledge the success of certain operations.
The Abc Settings tabbed notebook is still growing.
A progress dialog box appears when exporting an entire collection
of tunes.
1.3.6.1
Version 1.3.6.0 would occasionally hang or fail to display the music
score on some computers due to two threads both attempting to write
on the screen at the same time. As discussed in easy_abc.txt, the
main program starts up a separate thread called self.music_update_thread
which runs in the background during the entire time that EasyAbc is
running. In version 1.3.6.0, the music_update_thread could also
update the screen by updating the statusbar and other frames which
could be open. To avoid this problem, we have removed this function
from the music_update_thread and use a separate method, called
update_statusbar_and_messages which is now called from the main
thread.
All versions of EasyAbc stores its state in a settings file called
settings1.3.dat. Even though the user removes and reinstalls EasyAbc,
the settings1.3.dat file which is hidden away is untouched and
can prevent the reinstalled version of EasyAbc from running correctly.
A new option called 'Cold Restart' was added to the Settings menu.
This function will remove the settings1.3.dat file and perform a
normal shutdown of EasyAbc. When EasyAbc is restarted again, EasyAbc
will behave as if it has started for the first time and create
a new copy of settings1.3.dat with the initial 'factory settings'.
The Abc Settings notebook has been changed significantly. The
'File Settings' page has been moved to the back of the notebook since
this page is normally not modified when EasyAbc is working properly.
In the 'File Settings' page, the path to ps2pdf was removed since
it does not appear to be needed. On the Mac, the ghostscript
function will point to the path /usr/bin/ps2pdf which takes the
place of ghostscript used in Windows and Linux. The box for additional
run time parameters for abcm2ps has been moved to the abcm2ps page
and is called 'Extra Parameters'. There is a new button called
'Check settings' which can be used to restore some of the path names
of the executables to their original factory state. This may be
preferable to performing a cold restart when only one of the path
names needs to be restored. In order that the program knows which
path to restore, first completely erase its contents and then
press Check settings.
In the Abcm2ps page, there are two buttons 'Change abcm2ps path' and
'Restore abcm2ps path' for the few users who wish to try out different
versions of abcm2ps without having to go to the 'File Settings' page.
If you click 'Change abcm2ps path' a browser will allow you to search
for the abcm2ps executable you wish to use and select it. (The
file settings page will be automatically updated.). The 'Restore abcm2ps
path' will reset the path of abcm2ps to the bin folder which comes
with EasyAbc. The abcm2ps page allows you to change the abcm2ps
settings (which may or may not be useful). To access these page
settings be sure that neither of the checkboxes 'No page settings'
or 'EasyAbc defaults' are checked.
1.3.6.2
Except for a few minor corrections there have been no changes to the
user interface; however, there have been major improvements to the
performance of the rendering of the svg files including the support
of the new voicecolor command in abcm2ps 8.5 and higher. All of
these improvements are credited to J.W. de Jong.
New classes, BaseTune, and SvgTune were introduced.
The operation of the MusicUpdateThread has been changed. The flag
self.requests_exists is no longer used to activate the thread; instead
tasks are queued in by the method ConvertAbcToSvg and are run in
the method run as long as want_abort is not set.
In the mainframe, a new attribute self.renderer which is set to SvgRenderer()
was introduced and passed through the class object of MusicScorePanel.
There have been major changes to svgrenderer.py and music_score_panel.py
introduced by J.W. de Jong in order to make the graphics rendering
more efficient. I have added additional documentation to svgrenderer.py.
A new folder called not_used was created and python source code that
is not linked with easy_abc.py was moved to this folder.
A new folder called abcore was created and my experimental code
abccore.py, abccore_setup.py and g2v were moved to this directory.
1.3.6.3
When the caret in the editor moves outside the current page, the correct page is automatically chosen.
The preprocessing of an abc file and generating midi/svg has been split up. This was needed for matching the final
abc-code with the information from the svg-files.
When multiple windows of EasyABC are opened they shared the same midi and svg files (last one wins)
Unique filenames for midi and svg to prevent problems when multiple editor windows are used
Volume-settings still work even when the abc code contains the directive %%MIDI program
The music score can be zoomed in further so notes are large enough on larger then HD displays
MIDI file starts a little faster after pressing play on Windows OS. The Windows Vista/7 version of
wx.media.MediaCtrl (MEDIABACKEND_WMP10) contains a bug that the medialoaded event is never triggered.
The existing code called the medialoaded event after a small delay to bypass this bug, but the delay was too short
and the medialoaded event was called too early. The new workaround for the bug is to call Play before it is ready.
That causes the medialoaded event to get triggered when playing is ready to commence like it should. Therefore any
delays (time.sleep) are no longer necessary.
The play button now acts as pause button while the tune is playing
Several small fixes to the "Processed Abc Tune" window. A fixed font is now used, the text is no longer editable and
resizing is fixed.
More text is translatable now. This is done by using _() around strings, for example _("translateable text").
The result of _() is a unicode string so transforming it with the function unicode() is not needed.
'Check settings' has been renamed to 'Restore settings' for this is a more suitable name
EasyABC-window was sometimes unreachable because the window position was -32000,-32000. Negative values now ignored.
Fixed drawing problems with abcm2ps version 8.7.6
The File Settings tab in ABC Settings has comboboxes now for easier switching between different versions. If a path in
the dropdown combobox does not exist anymore it is removed. Also when you press 'Restore settings' the dropdowns are
cleared. The combobox contains the default path for abcm2ps, abc2midi and abc2abc so the buttons 'Change abcm2ps path'
and 'Restore abcm2ps path' have been removed.
The messages window is cleared when it contains old information. This prevents users from looking at errors that they
already have solved.
The Abc2midi tab in the settings now has the same background color as the other tabs
Sometimes opening the messages window showed the 'processed tune' window
AbcToMidi adds %%MIDI messages in order to apply the user's preferences of the melody and accompaniment instruments
given in the ABC Settings/abc2midi page; however, if the selected tune already contains these %%MIDI messages,
it will suppress some of these additions. (See the code process_abc_for_midi.) This avoids cluttering the
processed abc tune when you click on Internals/Input Processed tune.
The ABC Settings/File Settings now uses a combobox to store the path
names to the various third party executables. In event that you
have several versions of the executables, it is now easier to
switch between them.
The ABC Settings/Abc2midi page has an added entry box, Extra Midi
Player Parameters. If you are using an external midi player,
such as, timidity, you can now pass additional run time arguments
to the program.
For an upcoming feature called 'ABC assist' three new files have been added:
- abc_assist_panel.py
- tune_actions.py
- tune_elements.py
1.3.6.4
Changes to the user interface were made in order to address, the numerous
problems encountered on the Mac system. These problems include, the toolbar
containing the tempo controller and play position not being displayed
correctly. In addition, the comboboxes in the ABC Settings/ File Settings
did not register a change in the entry boxes.
The Abc Assist function has been improved. Sliders to change the Bass
and Chordal volumes for the accompaniment were introduced.
Added an option to cue the music with two metronome bars before playing
the tune.
Added in Internals, a function to view the generated MIDI file in
text form.
1.3.7.0
Despite the version number, there are mainly bug fixes and incremental
improvements to the ABC assist function developed by Jan Wybren.
- fix to EasyAbc not gracefully exiting on Windows computer
when no abc file was opened.
- the most recent version of abcm2ps no longer scales everything by
0.75 introducing an incompatibility with EasyAbc note selection using
the mouse. Jan Wybren introduced a fix so EasyAbc works with all versions
of abcm2ps
- automatic bar line insertion fixed for certain meters
- Abc Assist can be docked or undocked (floating window). Other
panes like the editor and musical score can no longer be docked to
different panes. Tie/untie option added for notes. Broken rhythm
( eg c>d or c<d), triplet, slur, and chord options was introduced.
- Added shortcuts to navigate through pages (when an abc tune has multiple pages)
Ctrl+Alt+PageDown: next page (Alt+PageDown also works)
Ctrl+Alt+PageUp: previous (Alt+PageUp also works)
Ctrl+Alt+Home: first page
Ctrl+Alt+End: last page
- ABC Assist: Added support for microtones
- ABC assist: reduced amount of options to reduce the need for scrolling
- ABC assist: should show images (using absolute path to image now)
- ABC assist: Added action to change duration for measure rest (Z/X)
- Updated Fields and Command Reference
1.3.7.1
- Added Dutch translation
- Much more text can now be translated
- ABC assist: When adding a note or rest a space is added for better legibility
- ABC assist: To preserve space adding a note and a rest have been combined. Multi measure rest can still be attained via 'Change duration' when selecting a regular rest (z)
- ABC assist: To preserve space only the most common options are shown for several actions. To see all the options click on the arrow beside the action.
- ABC assist: Adding notes places bars where needed
- ABC assist: If you select a couple of notes there now is an options to place a beam (in case of eight notes or shorter) to get multiple notes under 1 beam.
- ABC assist: If you add a new tune in an empty file a %abc header is added. If you select the first line you can open the specification the tune is made with.
- ABC assist: an icon to go to the next line has been added too for people who don't want to use a keyboard in combination with the mouse.
- ABC assist: It now is possible to change key/clef, metre, tempo in the body section of a tune
- abc2xml.py has been updated from version 62 to 69
- xml2abc.py has been updated from version 54 to 60
- The class AbcContext has moved from abc_assist_panel.py to abc_context.py
- The InnoSetup configuration file has been updated for the translation to Dutch and renamed to setupEasy137.iss
- setup.py has been updated for the translation to Dutch and a fix for cx_Freeze placing all files in the same folder has been added
1.3.7.2
- Note selection bug on OSX fixed
- 'Add bar' type assist now has option automatic
- when switching tune the first page of that tune is selected
1.3.7.3
- Fixed error when importing MusicXML-files
- Multiple tunes can now be selected to print or export
- Fixed printing pages (score was too small with newer versions of abcm2ps)
- Automatic bars are now placed only when length of measure exactly matches metre (used to be greater or equal)
- Fixed: When double-clicking the play button the tune was paused. Now it starts loop-mode as it should
- Added loop checkbox to toolbar so looping of a tune can be switched on or off during play
- Path selected for format-file is used when using the browse button.
1.3.7.4
- New feature: When playing a checkbox 'Follow score' appears. When checked you can see which notes are being played. The slider next to 'Follow score' can be used to compensate for timing errors.
- Now not only Python 2, but also Python 3 compatible.
- Syntax coloring routines have been optimized and syntax coloring is now three times as fast (but perhaps only noticable when going to last tune of very large abc file)
- Other speed improvements but less noticable like selecting multiple notes when dragging.
- Last used format file folder will be remembered when clearing the format file folder and used when browsing
- 'Export to ABC' added, but only available when multiple tunes have been selected. A new file is created with only the selected tunes
- 'Export to single PDF' added, but only available when multiple tunes have been selected.
- 'File -> Close' does not close EasyABC but only the current file (as suggested by John Burke)
- 'File -> Close' shortcut is now Ctrl-W (was Alt-F4 but only on Windows)
1.3.7.5
- 'Follow score' improved (Windows version)
- better unicode support
- repeat symbol (looks like percent sign) better drawn
- exporting a file generates a non-existing filename to prevent accidental overwrite
- more Python 3 issues fixed
- several minor bugfixes
- Linux only: looks for needed executables in /usr/bin and /usr/local/bin
1.3.7.6
- German translation added (thanks to Bernhard Weichel)
- Small tweaks for 'Follow score'
- Music score window can now be docked elsewhere (for example next to the editor window)
- fixed menus (an error was displayed after opening another abc-file)
- MAC only: a delay was added before playing to fix first notes not being played
- Added to the Help menu a link to 'ABC Quick Reference Card'
- after switching to another format file in abc-settings the music score refreshes