Dear Anthony,
To implement the -se.some_settings_file option you will need a few more
changes in the LoadSettings() procedure. It should ignore output options
which are now set in the command line.
Variables that will remain significant in the ‘-se’ file are the ones
that need to be stored and retrieved each time the application is
prompted to produce items. Other variables may be temporarily stored on
the interface, but starting the interface will each time set them to
default values.
For instance, the current Grammar page takes care of the output option:
• No file (i.e. real-time MIDI)
• BP data file
• MIDI file
• CSOUND file
and it appends the corresponding option after the command.
LoadSettings() is in SaveLoads1.c.
Below are the names of variables along with their meanings and default
values when necessary. Fot instance, you will replace
"ReadInteger(refnum,&OutMIDI,&pos)" with
"ReadInteger(refnum,&dummy_integer,&pos)" and keep the old line in a
comment just in case…
• Use MIDI in/out = OutMIDI
• Write MIDI files = WriteMIDIfile
• Write Csound scores = OutCsound
• Csound file format = CsoundFileFormat = 2
(Probably obsolete: choosing between MacOS, Windows and Unix. Should
be set to Unix, value is ‘2’.)
• Opcode OMS = *p_oms = 0
• Show messages = ShowMessages
• File save mode = FileSaveMode
(Read below)
• File write mode = FileWriteMode = 0
(This means that the items is immediately written to the file instead
of being first played on MIDI.)
A few more instructions need to be commented out, for instance :
// if(oldoutcsound && !OutCsound && !startup) CloseCsScore();
// if(oldwritemidifile && !WriteMIDIfile && !startup) CloseMIDIFile();
// if(OutMIDI && !oldoutmidi && !InitOn && !startup) ResetMIDI(FALSE);
I am wondering about "File save mode" used to save MIDI and Csound
files. We had the following options:
0 = Prompt for changing filename
1 = Save each item to a new file
2 = Store all items to same file
Mode 1 is probably the only valid one. If we need mode 2 then an
additional option needs to be added, telling that the file should not be
overwritten, it shoud be completed with the produced item(s).
BP2.9.8 used to load ‘-se.startup’ when starting up. This may remain
necessary in case the grammar or data file does not indicate a specific
‘-se’ file. I am enclosing a display of ‘-se.startup’ on the PHP
interface. MIDI input and output filters will be considered later…
In other cases the interface picks up the name of the ‘-se’ file and
appends it as an option of the command. Note that no variable in the
settings file has an impact on compiling grammar and alphabet. Compiling
and producing are 2 separate operations.
All these changes maybe revised if necessary. I am keeping the
definitions and values of obsolete ones on the interface, ready to be
reinstalled if needed.
Bernard
|