1 #include <libguile.h>
2 #include "scripting/scheme-identifiers.h"
3 #include "scripting/scheme-callbacks.h"
4 #include "core/view.h"
5
6 #ifdef DEVELOPER
7 static FILE *DEV_fp;
8 #define DEV_CODE gint idx = lookup_command_from_name(Denemo.map, name+strlen(DENEMO_SCHEME_PREFIX));\
9 gchar *tooltip = (idx<0)? "To be documented":(gchar*)lookup_tooltip_from_idx(Denemo.map, idx);\
10 if(!DEV_fp) DEV_fp = fopen("functions.xml", "w");
11 #endif
12
13 void
install_scm_function(gint nbargs,gchar * tooltip,gchar * name,gpointer callback)14 install_scm_function (gint nbargs, gchar* tooltip, gchar * name, gpointer callback)
15 {
16 #ifdef DEVELOPER
17 DEV_CODE;
18 if (DEV_fp)
19 fprintf (DEV_fp, "<listitem>%s %i parameter: %s </listitem>\n", name, nbargs, tooltip);
20 #endif
21 switch(nbargs){
22 case 0:
23 scm_c_define_gsubr (name, 0, 1, 0, callback);
24 break;
25 case 1:
26 scm_c_define_gsubr (name, 1, 1, 0, callback);
27 break;
28 case 2:
29 scm_c_define_gsubr (name, 2, 0, 0, callback);
30 break;
31 default:
32 scm_c_define_gsubr (name, 0, nbargs, 0, callback);
33 break;
34 }
35
36 gchar* helpname = g_strconcat("Help-", name, NULL);
37 define_scheme_variable(helpname, tooltip, "Value is the help string of the variable");
38 g_free(helpname);
39 }
40
41 #undef DEV_CODE
42
43 void
create_scheme_identfiers(void)44 create_scheme_identfiers (void)
45 {
46
47 /* test with
48 (d-EditMode)
49 (d-2)
50 (d-PutNoteName "cis''")
51 */
52
53 /* create scheme functions d-<name> for all the menuitem callbacks of <name> that are not check/radio items
54 The scheme functions are defined to take one optional parameter which by denemo convention will be a String type,
55 not necessarily null terminated, which is then passed as a GString * to the callback routines (with the first parameter, the GtkAction*, passed as NULL.
56 */
57 #include "generated/scheme.h"
58 init_denemo_notenames ();
59
60 install_scm_function (0, "Hides all the menus", DENEMO_SCHEME_PREFIX "HideMenus", scheme_hide_menus);
61 install_scm_function (0, "Hides Score buttons or shows them if passed #f", DENEMO_SCHEME_PREFIX "HideButtons", scheme_hide_buttons);
62 install_scm_function (0, "Removes Score buttons", DENEMO_SCHEME_PREFIX "DestroyButtons", scheme_destroy_buttons);
63 install_scm_function (0, "Hides the Denemo.project or shows it if passed #f", DENEMO_SCHEME_PREFIX "HideWindow", scheme_hide_window);
64
65 install_scm_function (1, "Takes the the name of a scripted command. Runs the script stored for that command. Scripts which invoke other scripted commands use this (implicitly?) ", DENEMO_SCHEME_PREFIX "ScriptCallback", scheme_script_callback);
66
67 install_scm_function (1, "create a dialog with the options (null separated string) & return the one chosen, of #f if the user cancels, takes optional title", DENEMO_SCHEME_PREFIX "GetOption", scheme_get_option);
68 /* test with (display (d-GetOption "this\0and\0that\0")) */
69 install_scm_function (0, "Returns the text on the clipboard", DENEMO_SCHEME_PREFIX "GetTextSelection", scheme_get_text_selection);
70 install_scm_function (0, "Returns the padding that has been set by dragging in the Print view window", DENEMO_SCHEME_PREFIX "GetPadding", scheme_get_padding);
71 install_scm_function (0, "Deprecated - gets an integer from the user via a dialog", DENEMO_SCHEME_PREFIX "GetRelativeFontSize", scheme_get_relative_font_size);
72 /* install the scheme functions for calling extra Denemo functions created for the scripting interface */
73 install_scm_function (1, "Takes a command name. called by a script if it requires initialization the initialization script is expected to be in init.scm in the menupath of the command passed in.", DENEMO_SCHEME_PREFIX "InitializeScript", scheme_initialize_script);
74 install_scm_function (1, " pass in a path (from below menus) to a command script. Loads the command from .denemo or system if it can be found. It is used at startup in .denemo files like ReadingNoteNames.denemo which executes (d-LoadCommand \"MainMenu/Educational/ReadingNoteNames\") to ensure that the command it needs is in the command set.", DENEMO_SCHEME_PREFIX "LoadCommand", scheme_load_command);
75
76 install_scm_function (1, "Takes a string, a menu path (from below menus). It executes the command for that menu item. Returns #f for no menu item.", DENEMO_SCHEME_PREFIX "ActivateMenuItem", scheme_activate_menu_item);
77
78
79 install_scm_function (0, "Returns the directory holding the user's preferences", DENEMO_SCHEME_PREFIX "LocateDotDenemo", scheme_locate_dotdenemo);
80 install_scm_function (0, "Returns the name of the type of object at the cursor, or None if none. If not passed #f returns Appending if cursor is in appending after an object.", DENEMO_SCHEME_PREFIX "GetType", scheme_get_type);
81 install_scm_function (0, "Returns the lilypond typesetting text for object at the cursor or #f if the object has not yet been typeset", DENEMO_SCHEME_PREFIX "GetLilyPond", scheme_get_lilypond);
82
83 install_scm_function (0, "Returns a string numerator/denominator for a tuplet open object or #f if cursor not on a tuplet open", DENEMO_SCHEME_PREFIX "GetTuplet", scheme_get_tuplet);
84 install_scm_function (0, "Set passed string as numerator/denominator for a tuplet open at cursor", DENEMO_SCHEME_PREFIX "SetTuplet", scheme_set_tuplet);
85
86 install_scm_function (0, "Set passed 24 bit number as RGB color of background.", DENEMO_SCHEME_PREFIX "SetBackground", scheme_set_background);
87
88 install_scm_function (2, "Takes a staff number m and a object number n. Returns the type of object at the (m, n)th position on the Denemo Clipboard or #f if none.", DENEMO_SCHEME_PREFIX "GetClipObjType", scheme_get_clip_obj_type);
89 install_scm_function (1, "Takes a staff number m, Returns the number of objects in the mth staff on the Denemo Clipboard or #f if none.", DENEMO_SCHEME_PREFIX "GetClipObjects", scheme_get_clip_objects);
90
91
92 install_scm_function (2, "Takes a staff number m and a object number n. Inserts the (m, n)th Denemo Object from Denemo Clipboard into the staff at the cursor position", DENEMO_SCHEME_PREFIX "PutClipObj", scheme_put_clip_obj);
93 install_scm_function (0, "Clears the Denemo Music Clipboard", DENEMO_SCHEME_PREFIX "ClearClipboard", scheme_clear_clipboard);
94 install_scm_function (0, "Gives the number of staffs in the Denemo Music Clipboard", DENEMO_SCHEME_PREFIX "GetStaffsInClipboard", scheme_get_staffs_in_clipboard);
95
96 install_scm_function (0, "Gives the number of measures in the current staff", DENEMO_SCHEME_PREFIX "GetMeasuresInStaff", scheme_get_measures_in_staff);
97 install_scm_function (0, "Lessens the display height for the current staff", DENEMO_SCHEME_PREFIX "ShortenStaffHeight", scheme_shorten_staff_height);
98 install_scm_function (0, "Sets the number of lines for the current staff", DENEMO_SCHEME_PREFIX "SetLinesInStaff", scheme_set_lines_in_staff);
99 install_scm_function (0, "Sets the highest note playable for the current staff", DENEMO_SCHEME_PREFIX "SetStaffRangeHi", scheme_set_staff_range_hi);
100 install_scm_function (0, "Sets the lowest note playable for the current staff", DENEMO_SCHEME_PREFIX "SetStaffRangeLo", scheme_set_staff_range_lo);
101 install_scm_function (0, "Sets the range of notes playable for the current staff from the chord at the cursor.", DENEMO_SCHEME_PREFIX "SetStaffRange", scheme_set_staff_range);
102 install_scm_function (0, "Sets the display color for the current staff", DENEMO_SCHEME_PREFIX "SetColorOfStaff", scheme_set_color_of_staff);
103 install_scm_function (0, "Gives the number of staffs in the current movement", DENEMO_SCHEME_PREFIX "GetStaffsInMovement", scheme_get_staffs_in_movement);
104
105 install_scm_function (0, "Makes the current staff a voice belonging to the staff above", DENEMO_SCHEME_PREFIX "StaffToVoice", scheme_staff_to_voice);
106
107 install_scm_function (0, "Makes the current voice a independent staff", DENEMO_SCHEME_PREFIX "VoiceToStaff", scheme_voice_to_staff);
108 install_scm_function (0, "Returns #f if the current staff is not a voice else true", DENEMO_SCHEME_PREFIX "IsVoice", scheme_is_voice);
109
110 install_scm_function (0, "Adjusts the horizontal (x-) positioning of notes etc after paste", DENEMO_SCHEME_PREFIX "AdjustXes", scheme_adjust_xes);
111
112 install_scm_function (0, "Turn highlighting of cursor off/on returning #t, or given a boolean parameter sets the highlighting returning the previous value", DENEMO_SCHEME_PREFIX "HighlightCursor", scheme_highlight_cursor);
113
114 install_scm_function (0, "Returns #t if there is an object at the cursor which has any printing behavior it may have overridden", DENEMO_SCHEME_PREFIX "GetNonprinting", scheme_get_nonprinting);
115
116 install_scm_function (0, "Sets the Non Printing attribute of a chord (or note/rest) at the cursor. For a rest this makes a non printing rest, for a note it makes it ia pure rhythm (which will not print, but can be assigned pitch, e.g. via a MIDI keyboard. Pass in #f to unset the attribute", DENEMO_SCHEME_PREFIX "SetNonprinting", scheme_set_nonprinting);
117
118 install_scm_function (0, "Returns #t if there is a grace note/chord at cursor, else #f", DENEMO_SCHEME_PREFIX "IsGrace", scheme_is_grace);
119 install_scm_function (0, "Returns #t if there is a tied note/chord at cursor, else #f", DENEMO_SCHEME_PREFIX "IsTied", scheme_is_tied);
120
121 install_scm_function (0, "Returns #t if there is a chord with slur starting at cursor, else #f", DENEMO_SCHEME_PREFIX "IsSlurStart", scheme_is_slur_start);
122
123 install_scm_function (0, "Returns #t if there is a chord with slur ending at cursor, else #f", DENEMO_SCHEME_PREFIX "IsSlurEnd", scheme_is_slur_end);
124
125 install_scm_function (0, "Returns #t if there is a chord with crescendo starting at cursor, else #f", DENEMO_SCHEME_PREFIX "IsCrescStart", scheme_is_cresc_start);
126 install_scm_function (0, "Returns #t if there is a chord with crescendo ending at cursor, else #f", DENEMO_SCHEME_PREFIX "IsCrescEnd", scheme_is_cresc_end);
127
128 install_scm_function (0, "Returns #t if there is a chord with diminuendo starting at cursor, else #f", DENEMO_SCHEME_PREFIX "IsDimStart", scheme_is_dim_start);
129 install_scm_function (0, "Returns #t if there is a chord with diminuendo ending at cursor, else #f", DENEMO_SCHEME_PREFIX "IsDimEnd", scheme_is_dim_end);
130
131
132
133 install_scm_function (0, "Returns #t if the cursor is in the selection area, else #f", DENEMO_SCHEME_PREFIX "IsInSelection", scheme_is_in_selection);
134 install_scm_function (0, "Returns #t if there is a selection, else #f", DENEMO_SCHEME_PREFIX "HasSelection", scheme_has_selection);
135
136 install_scm_function (0, "Returns #t if the cursor is in the appending position, else #f", DENEMO_SCHEME_PREFIX "IsAppending", scheme_is_appending);
137
138 install_scm_function (0, "Shifts the cursor up or down by the integer amount passed in", DENEMO_SCHEME_PREFIX "ShiftCursor", scheme_shift_cursor);
139
140
141 install_scm_function (0, "Returns the movement number counting from 1", DENEMO_SCHEME_PREFIX "GetMovement", scheme_get_movement);
142 install_scm_function (0, "Returns the LilyPond identifier for the current voice", DENEMO_SCHEME_PREFIX "GetVoiceIdentifier", scheme_get_voice_identifier);
143 install_scm_function (0, "Returns the staff/voice number counting from 1", DENEMO_SCHEME_PREFIX "GetStaff", scheme_get_staff);
144 install_scm_function (0, "With parameter #t or #f makes the staff hidden/visible in the display, returns the hidden status. Typesetting is unaffected", DENEMO_SCHEME_PREFIX "StaffHidden", scheme_staff_hidden);
145 install_scm_function (0, "Returns the measure number counting from 1", DENEMO_SCHEME_PREFIX "GetMeasure", scheme_get_measure);
146 install_scm_function (0, "Sets the display width of the object at the cursor to the value passed (in pixels)", DENEMO_SCHEME_PREFIX "SetObjectDisplayWidth", scheme_set_object_display_width);
147 install_scm_function (0, "Returns the cursor horizontal position in current measure.\n 1 = first position in measure, n+1 is appending position where n is the number of objects in current measure", DENEMO_SCHEME_PREFIX "GetHorizontalPosition", scheme_get_horizontal_position);
148
149 install_scm_function (0, "Returns the note name for the line or space where the cursor is", DENEMO_SCHEME_PREFIX "GetCursorNote", scheme_get_cursor_note);
150 install_scm_function (0, "Returns the note name and octave in LilyPond notation for the line or space where the cursor is", DENEMO_SCHEME_PREFIX "GetCursorNoteWithOctave", scheme_get_cursor_note_with_octave);
151
152
153 install_scm_function (0, "Prints out information about the object at the cursor", DENEMO_SCHEME_PREFIX "DebugObject", scheme_debug_object);
154 install_scm_function (0, "Displays information about the object at the cursor position.", DENEMO_SCHEME_PREFIX "DisplayObject", scheme_display_object);
155 install_scm_function (0, "Prints out the cumulative time spent editing this score.\nThe time counts any period between starting to edit and saving to disk\nThe time is accumulated over different editing sessions.", DENEMO_SCHEME_PREFIX "GetEditingTime", scheme_get_editing_time);
156 install_scm_function (0, "Remove the user's customized buttons and other scheme startup stuff created by the user in actions/denemo.scm", DENEMO_SCHEME_PREFIX "DestroySchemeInit", scheme_destroy_scheme_init);
157
158 install_scm_function (0, "Returns the name of the (highest) note in any chord at the cursor position, or #f if none", DENEMO_SCHEME_PREFIX "GetNoteName", scheme_get_note_name);
159 install_scm_function (0, "Insert a rest at the cursor in the prevailing duration, or if given a integer, in that duration, setting the prevailing duration. If MIDI in is active, the cursor stays on the rest after inserting it, else it moves right.", DENEMO_SCHEME_PREFIX "InsertRest", scheme_insert_rest);
160 install_scm_function (0, "Insert rests at the cursor to the value of the one whole measure in the key signature and return the number of rests inserted", DENEMO_SCHEME_PREFIX "PutWholeMeasureRests", scheme_put_whole_measure_rests);
161 install_scm_function (0, "Takes optional integer parameter n = 1..., returns LilyPond representation of the nth note of the chord at the cursor counting from the lowest, or #f if none", DENEMO_SCHEME_PREFIX "GetNote", scheme_get_note);
162 install_scm_function (0, "Takes optional integer parameter n = 1..., returns LilyPond representation of the nth note of the chord at the cursor counting from the highest, or #f if none", DENEMO_SCHEME_PREFIX "GetNoteFromTop", scheme_get_note_from_top);
163 install_scm_function (0, "Takes optional integer parameter n = 1..., returns MIDI key for the nth note of the chord at the cursor counting from the highest, or #f if none", DENEMO_SCHEME_PREFIX "GetNoteFromTopAsMidi", scheme_get_note_from_top_as_midi);
164 install_scm_function (0, "Returns a space separated string of LilyPond notes for the chord at the cursor position or #f if none", DENEMO_SCHEME_PREFIX "GetNotes", scheme_get_notes);
165 install_scm_function (0, "Returns LilyPond note at the cursor position or #f if none", DENEMO_SCHEME_PREFIX "GetNoteAtCursor", scheme_get_note_at_cursor);
166 install_scm_function (0, "Returns the number of dots on the note at the cursor, or #f if no note", DENEMO_SCHEME_PREFIX "GetDots", scheme_get_dots);
167 install_scm_function (0, "Returns the base duration of the note at the cursor number=0, 1, 2 for whole half quarter note etc, or #f if none", DENEMO_SCHEME_PREFIX "GetNoteBaseDuration", scheme_get_note_base_duration);
168 install_scm_function (0, "Returns the duration in LilyPond syntax of the note at the cursor, or #f if none", DENEMO_SCHEME_PREFIX "GetNoteDuration", scheme_get_note_duration);
169
170 install_scm_function (1, "Takes an integer, Sets the number of ticks (PPQN) for the object at the cursor, returns #f if none; if the object is a chord it is set undotted", DENEMO_SCHEME_PREFIX "SetDurationInTicks", scheme_set_duration_in_ticks);
171 install_scm_function (1, "Takes an index, returns the time in seconds, time signature and tempo in seconds per quarter note of the index'th MIDI tempo event in the recorded MIDI stream.", DENEMO_SCHEME_PREFIX "GetRecordedMidiTempo", scheme_get_recorded_midi_tempo);
172 install_scm_function (1, "Takes an track number 1,2 ..., makes that MIDI track of the loaded MIDI stream the current recorded track.", DENEMO_SCHEME_PREFIX "GetImportedMidiTrack", scheme_get_imported_midi_track);
173 install_scm_function (0, "Delete the current imported/recorded MIDI track fails if playing, returning #f.", DENEMO_SCHEME_PREFIX "DeleteImportedMidi", scheme_delete_imported_midi);
174 install_scm_function (0, "Returns the MIDI track number of the current imported track.", DENEMO_SCHEME_PREFIX "GetCurrentMidiTrack", scheme_get_current_midi_track);
175 install_scm_function (0, "Returns the number of MIDI tracks of the loaded/recorded MIDI.", DENEMO_SCHEME_PREFIX "GetImportedMidiTracks", scheme_get_imported_midi_tracks);
176 install_scm_function (0, "Returns the duration in seconds of the recorded MIDI track or #f if none", DENEMO_SCHEME_PREFIX "GetRecordedMidiDuration", scheme_get_recorded_midi_duration);
177
178 install_scm_function (0, "Returns the number of ticks (PPQN) for the object at the cursor, or #f if none", DENEMO_SCHEME_PREFIX "GetDurationInTicks", scheme_get_duration_in_ticks);
179 install_scm_function (0, "Returns the number of ticks (PPQN) for the chord without dots or tuplet effects at the cursor, or #f if not a chord. The value is -ve for special durations (i.e. non-standard notes)", DENEMO_SCHEME_PREFIX "GetBaseDurationInTicks", scheme_get_base_duration_in_ticks);
180
181 install_scm_function (0, "Returns the tick count (PPQN) for the end of the object at the cursor, or #f if none", DENEMO_SCHEME_PREFIX "GetEndTick", scheme_get_end_tick);
182 install_scm_function (0, "Returns the tick count (PPQN) for the start of the object at the cursor, or #f if none", DENEMO_SCHEME_PREFIX "GetStartTick", scheme_get_start_tick);
183
184 install_scm_function (0, "Returns the measure number at cursor position.", DENEMO_SCHEME_PREFIX "GetMeasureNumber", scheme_get_measure_number);
185 install_scm_function (0, "Returns the value set on the current measure by which the measure numbers in the Denemo Displayed should be offset from this point on.", DENEMO_SCHEME_PREFIX "GetMeasureNumberOffset", scheme_get_measure_number_offset);
186 install_scm_function (1, "Takes a value to set on the current measure. The measure numbers in the Denemo Display will be offset from this point on by this amount. No effect on the typesetting.", DENEMO_SCHEME_PREFIX "SetMeasureNumberOffset", scheme_set_measure_number_offset);
187
188
189 install_scm_function (0, "Takes LilyPond note name string. Moves the cursor to the line or space", DENEMO_SCHEME_PREFIX "CursorToNote", scheme_cursor_to_note);
190 install_scm_function (1, "Takes a number 1 ... n. Moves the cursor to the nth note from the bottom of the chord at the cursor, returning #f if it fails.", DENEMO_SCHEME_PREFIX "CursorToNthNoteHeight", scheme_cursor_to_nth_note_height);
191 install_scm_function (0, "Moves the cursor up to the next higher note of the chord at the cursor, returning #f if it fails.", DENEMO_SCHEME_PREFIX "CursorToNextNoteHeight", scheme_cursor_to_next_note_height);
192
193 install_scm_function (0, "Returns the prevailing key signature at the cursor", DENEMO_SCHEME_PREFIX "GetPrevailingKeysig", scheme_get_prevailing_keysig);
194 install_scm_function (0, "Returns the prevailing time signature at the cursor", DENEMO_SCHEME_PREFIX "GetPrevailingTimesig", scheme_get_prevailing_timesig);
195 install_scm_function (0, "Returns the prevailing clef at the cursor. Note that non-builtin clefs like drum are not handled yet.", DENEMO_SCHEME_PREFIX "GetPrevailingClef", scheme_get_prevailing_clef);
196
197 install_scm_function (0, "Returns the LilyPond typesetting syntax for prevailing clef at the cursor.", DENEMO_SCHEME_PREFIX "GetPrevailingClefAsLilyPond", scheme_get_prevailing_clef_as_lilypond);
198 install_scm_function (0, "Returns the LilyPond typesetting syntax for prevailing key signature at the cursor.", DENEMO_SCHEME_PREFIX "GetPrevailingKeysigAsLilyPond", scheme_get_prevailing_keysig_as_lilypond);
199 install_scm_function (0, "Returns the LilyPond typesetting syntax for prevailing time signature at the cursor.", DENEMO_SCHEME_PREFIX "GetPrevailingTimesigAsLilyPond", scheme_get_prevailing_timesig_as_lilypond);
200
201
202 install_scm_function (0, "Returns the prevailing duration, ie duration which will be used for the next inserted note, with a parameter 0 ... 8 sets the prevailing duration.", DENEMO_SCHEME_PREFIX "GetPrevailingDuration", scheme_get_prevailing_duration);
203
204 //more work needed, see above install_scm_function (0, "Sets the prevailing keysignature at the cursor to the string of 7 steps passed. Each step can be -1, 0 or 1",DENEMO_SCHEME_PREFIX"SetPrevailingKeysig", scheme_set_prevailing_keysig);
205
206 install_scm_function (0, "Makes the initial keysig sharper/flatter", DENEMO_SCHEME_PREFIX "IncrementInitialKeysig", scheme_increment_initial_keysig);
207 install_scm_function (0, "Makes the keysig sharper/flatter, affects keysig change when cursor is on one or appending after one, otherwise affects initial keysig", DENEMO_SCHEME_PREFIX "IncrementKeysig", scheme_increment_keysig);
208 install_scm_function (0, "Appends a new movement without copying staff structure.", DENEMO_SCHEME_PREFIX "AddMovement", scheme_add_movement);
209
210
211
212 install_scm_function (0, "Takes a string of LilyPond note names. Replaces the notes of the chord at the cursor with these notes, preserving other attributes", DENEMO_SCHEME_PREFIX "ChangeChordNotes", scheme_change_chord_notes);
213 install_scm_function (0, "Takes a LilyPond note name, and changes the note at the cursor to that note", DENEMO_SCHEME_PREFIX "PutNoteName", scheme_put_note_name);
214 install_scm_function (0, "Takes a LilyPond note name, changes the note at the cursor to have the accidental passed in either LilyPond string or integer -2..+2. Returns #f if cursor is not on a note position. ", DENEMO_SCHEME_PREFIX "SetAccidental", scheme_set_accidental);
215
216 install_scm_function (0, "Inserts a rest at the cursor; either passed in duration or if none passed the prevailing duration.", DENEMO_SCHEME_PREFIX "PutRest", scheme_put_rest);
217 install_scm_function (0, "Inserts a note at the cursor; either passed in duration or if none passed the prevailing duration.", DENEMO_SCHEME_PREFIX "PutNote", scheme_put_note);
218
219
220
221 install_scm_function (0, "Takes a LilyPond note name, and adds that note to the chord", DENEMO_SCHEME_PREFIX "InsertNoteInChord", scheme_insert_note_in_chord);
222
223
224 install_scm_function (0, "Moves the note at the cursor by the number of diatonic steps passed in", DENEMO_SCHEME_PREFIX "DiatonicShift", scheme_diatonic_shift);
225 install_scm_function (0, "Moves the cursor to the right returning #t if this was possible", DENEMO_SCHEME_PREFIX "NextObject", scheme_next_object);
226 install_scm_function (0, "Moves the cursor to the left returning #t if the cursor moved", DENEMO_SCHEME_PREFIX "PrevObject", scheme_prev_object);
227 install_scm_function (0, "Moves the cursor to the next object in the current measure, returning #f if there were no more objects to the left in the current measure", DENEMO_SCHEME_PREFIX "NextObjectInMeasure", scheme_next_object_in_measure);
228 install_scm_function (0, "Moves the cursor to the previous object in the current measure, returning #f if the cursor was on the first object", DENEMO_SCHEME_PREFIX "PrevObjectInMeasure", scheme_prev_object_in_measure);
229 install_scm_function (0, "Moves the cursor to the next object in the selection. Returns #t if the cursor moved", DENEMO_SCHEME_PREFIX "NextSelectedObject", scheme_next_selected_object);
230 install_scm_function (0, "Moves the cursor to the previous object in the selection. Returns #t if the cursor moved", DENEMO_SCHEME_PREFIX "PrevSelectedObject", scheme_prev_selected_object);
231 install_scm_function (0, "Moves the cursor the the next object of type CHORD in the current staff. Returns #f if the cursor did not move", DENEMO_SCHEME_PREFIX "NextChord", scheme_next_chord);
232 install_scm_function (0, "Moves the cursor the the previous object of type CHORD in the current staff. Returns #f if the cursor did not move", DENEMO_SCHEME_PREFIX "PrevChord", scheme_prev_chord);
233
234 install_scm_function (0, "Moves the cursor the the next object of type CHORD in the current measure. Returns #f if the cursor did not move", DENEMO_SCHEME_PREFIX "NextChordInMeasure", scheme_next_chord_in_measure);
235 install_scm_function (0, "Moves the cursor the the previous object of type CHORD in the current measure. Returns #f if the cursor did not move", DENEMO_SCHEME_PREFIX "PrevChordInMeasure", scheme_prev_chord_in_measure);
236
237
238 install_scm_function (0, "Moves the cursor the next object of type CHORD which is not a rest in the current staff. Returns #f if the cursor did not move", DENEMO_SCHEME_PREFIX "NextNote", scheme_next_note);
239 install_scm_function (0, "Moves the cursor the previous object of type CHORD which is not a rest in the current staff. Returns #f if the cursor did not move", DENEMO_SCHEME_PREFIX "PrevNote", scheme_prev_note);
240 install_scm_function (0, "Creates a music Snippet comprising the object at the cursor Returns #f if not possible, otherwise an identifier for that snippet", DENEMO_SCHEME_PREFIX "CreateSnippetFromObject", scheme_create_snippet_from_object);
241
242 install_scm_function (0, "Selects music Snippet from passed id Returns #f if not possible", DENEMO_SCHEME_PREFIX "SelectSnippet", scheme_select_snippet);
243
244 install_scm_function (1, "Inserts music Snippet from passed id Returns #f if not possible, a second boolean parameter determines if the snippet becomes selected. ", DENEMO_SCHEME_PREFIX "InsertSnippet", scheme_insert_snippet);
245
246
247
248 install_scm_function (0, "Moves the cursor the next object that is a Denemo Directive in the current staff. Returns #f if the cursor did not move", DENEMO_SCHEME_PREFIX "NextStandaloneDirective", scheme_next_standalone_directive);
249 install_scm_function (0, "Moves the cursor the previous object that is a Denemo Directive in the current staff. Returns #f if the cursor did not move", DENEMO_SCHEME_PREFIX "PrevStandaloneDirective", scheme_prev_standalone_directive);
250 install_scm_function (0, "Moves the cursor within the current measure to the next object that is a Denemo Directive in the current staff. Returns #f if the cursor did not move", DENEMO_SCHEME_PREFIX "NextStandaloneDirectiveInMeasure", scheme_next_standalone_directive_in_measure);
251 install_scm_function (0, "Moves the cursor within the current measure to the previous object that is a Denemo Directive in the current staff. Returns #f if the cursor did not move", DENEMO_SCHEME_PREFIX "PrevStandaloneDirectiveInMeasure", scheme_prev_standalone_directive_in_measure);
252
253
254 install_scm_function (0, "Enforces the treatment of the note at the cursor as a chord in LilyPond", DENEMO_SCHEME_PREFIX "Chordize", scheme_chordize);
255 install_scm_function (0, "Takes xml representation of a preference and adds it to the Denemo preferences", DENEMO_SCHEME_PREFIX "SetPrefs", scheme_set_prefs);
256
257 install_scm_function (0, "Takes string name of a boolean-valued preference and returns the current value. Non-existent prefs return #f, ensure that the preference name is correct before using.", DENEMO_SCHEME_PREFIX "GetBooleanPref", scheme_get_boolean_pref);
258 install_scm_function (0, "Takes string name of an int-valued preference and returns the current value. Non-existent prefs return #f", DENEMO_SCHEME_PREFIX "GetIntPref", scheme_get_int_pref);
259 install_scm_function (0, "Takes string name of a string-valued preference and returns the current value. Non-existent prefs return #f", DENEMO_SCHEME_PREFIX "GetStringPref", scheme_get_string_pref);
260
261 install_scm_function (0, "Takes a script as a string, which will be stored. All the callbacks are called when the musical score is closed", DENEMO_SCHEME_PREFIX "AttachQuitCallback", scheme_attach_quit_callback);
262 install_scm_function (0, "Removes a callback from the current musical score", DENEMO_SCHEME_PREFIX "DetachQuitCallback", scheme_detach_quit_callback);
263 install_scm_function (0, "Returns DENEMO_INPUTMIDI, DENEMO_INPUTKEYBOARD, DENEMO_INPUTAUDIO depending on the source of input to Denemo.", DENEMO_SCHEME_PREFIX "GetInputSource", scheme_get_input_source);
264 install_scm_function (0, "Pops up a menu given by the list of pairs in the argument. Each pair should be a label string and an expression, the expression for the chosen label is returned. Alternatively the label string can be replaced by a pair of strings, label . tooltip. The third syntax is just a list of string labels, the chosen string is returned.", DENEMO_SCHEME_PREFIX "PopupMenu", scheme_popup_menu);
265 install_scm_function (1, "Pops up a dialog of check buttons given by the list of pairs in the argument and optional title argument. Each pair should be a label string and a boolean, the list is returned with booleans as chosen or #f returned of camce;;ed.", DENEMO_SCHEME_PREFIX "CheckBoxes", scheme_check_boxes);
266 install_scm_function (0, "Returns a list of the target type and grob (if a directive). Target is set by clicking on the typeset version of the score at a link that LilyPond has inserted.", DENEMO_SCHEME_PREFIX "GetTargetInfo", scheme_get_target_info);
267 install_scm_function (0, "Interactively sets a target (a click on a LilyPond link in the printview window) from the user ", DENEMO_SCHEME_PREFIX "GetNewTarget", scheme_get_new_target);
268 install_scm_function (0, "Interactively sets a point in the printview window from the user", DENEMO_SCHEME_PREFIX "GetNewPoint", scheme_get_new_point);
269 install_scm_function (0, "Interactively sets a reference point (a click on a point in the printview window) from the user showing a cross hairs prompt ", DENEMO_SCHEME_PREFIX "GetReferencePoint", scheme_get_reference_point);
270 install_scm_function (0, "Interactively gets an offset from the user in the print view window. The offset is from the last clicked object in the print view window. Returns pair of numbers x is positive to the right, y is positive upwards.", DENEMO_SCHEME_PREFIX "GetOffset", scheme_get_offset);
271 install_scm_function (0, "Interactively sets a control point for a curve in the print view window. Takes one parameter the number 1-4 of the control point to set.", DENEMO_SCHEME_PREFIX "GetControlPoint", scheme_get_control_point);
272 install_scm_function (0, "Interactively gets a curve from the user in the print view window. Returns a list of pairs of numbers, the control points of the curve.", DENEMO_SCHEME_PREFIX "GetCurve", scheme_get_curve);
273 install_scm_function (0, "Interactively gets two positions from the user in the print view window. Returns pair of pairs numbers.", DENEMO_SCHEME_PREFIX "GetPositions", scheme_get_positions);
274
275 install_scm_function (4, "Takes 4 parameters and makes http transaction with www.denemo.org", DENEMO_SCHEME_PREFIX "HTTP", scheme_http);
276
277 install_scm_function (4, "Move to given Movement, voice measure and object position. Takes 4 parameters integers starting from 1, use #f for no change. Returns #f if it fails", DENEMO_SCHEME_PREFIX "GoToPosition", scheme_goto_position);
278
279
280 install_scm_function (5, "Takes a palette name, label, tooltip and script", DENEMO_SCHEME_PREFIX "CreatePaletteButton", scheme_create_palette_button);
281 install_scm_function (4, "Takes a palette name, boolean, and limit", DENEMO_SCHEME_PREFIX "SetPaletteShape", scheme_set_palette_shape);
282 install_scm_function (1, "Hides/Un-hides a palette. Pass a palette name (or #t to choose a palette) with second parameter #f hides the palette otherwise show.", DENEMO_SCHEME_PREFIX "ShowPalettes", scheme_show_palettes);
283 install_scm_function (0, "Returns the current palette name. The palette status is not changed - it may be hidden. Pass a palette name to become the current palette or pass #t to choose a palette as the current palette.", DENEMO_SCHEME_PREFIX "SelectPalette", scheme_select_palette);
284 install_scm_function (0, "Allows the user to type a label to activate a palette button.", DENEMO_SCHEME_PREFIX "ActivatePaletteButton", scheme_activate_palette_button);
285
286
287 install_scm_function (4, "Takes up to three strings, title, prompt and initial value. Shows these to the user and returns the user's string. Fourth parameter makes the dialog not block waiting for input", DENEMO_SCHEME_PREFIX "GetUserInput", scheme_get_user_input);
288 install_scm_function (4, "Takes up to three strings, title, prompt and initial value. Shows these to the user with a text editor for the user to return a string. Buttons are present to insert snippets which are bracketed with section characters. Fourth parameter makes the dialog not block waiting for input. Returns a pair comprising the user's text and formatted LilyPond syntax.", DENEMO_SCHEME_PREFIX "GetUserInputWithSnippets", scheme_get_user_input_with_snippets);
289 install_scm_function (0, "Allows the user to select a font returns a string describing the font. Takes an optional title.", DENEMO_SCHEME_PREFIX "SelectFont", scheme_select_font);
290 install_scm_function (0, "Allows the user to select a color returns a list of r g b values between 0-255.\nTakes an optional title.", DENEMO_SCHEME_PREFIX "SelectColor", scheme_select_color);
291 install_scm_function (0, "Takes a message as a string. Pops up the message for the user to take note of as a warning", DENEMO_SCHEME_PREFIX "WarningDialog", scheme_warningdialog);
292 install_scm_function (1, "Takes a message as a string amd a script. Pops up the message for the user to take note of as a informative message, runs the script when dismissed.", DENEMO_SCHEME_PREFIX "InfoWithHook", scheme_info_with_hook);
293 install_scm_function (1, "Takes a message as a string and boolean noblock parameter. Pops up the message for the user to take note of as a informative message, blocks if noblock is #f", DENEMO_SCHEME_PREFIX "InfoDialog", scheme_infodialog);
294 install_scm_function (0, "Takes a message as a string. Pops up the message inside of a pulsing progressbar", DENEMO_SCHEME_PREFIX "ProgressBar", scheme_progressbar);
295 install_scm_function (0, "If running, Stops the ProgressBar.", DENEMO_SCHEME_PREFIX "ProgressBarStop", scheme_progressbar_stop);
296 install_scm_function (0, "Typesets the score. Takes a script which will be called when Refresh is performed on the typeset window.", DENEMO_SCHEME_PREFIX "TypesetForScript", scheme_typeset_for_script);
297 install_scm_function (0, "Prints from the PDF file generated by TypesetForScript.", DENEMO_SCHEME_PREFIX "PrintTypesetPDF", scheme_print_typeset_pdf);
298 install_scm_function (2, "Displays the SVG file generated by LilyPond for playback. Takes a scale and a boolean (true if only the current part is to be typeset)", DENEMO_SCHEME_PREFIX "DisplayTypesetSvg", scheme_display_typeset_svg);
299 install_scm_function (0, "Returns #t if continuous typsetting is in operation else #f", DENEMO_SCHEME_PREFIX "ContinuousTypesetting", scheme_continous_typsetting);
300
301
302 install_scm_function (0, "Intercepts the next keypress and returns a string containing the character. Returns #f if keyboard interception was not possible.", DENEMO_SCHEME_PREFIX "GetChar", scheme_get_char);
303 install_scm_function (0, "Intercepts the next keypress and returns a string containing the name of the keypress (the shortcut name). Returns #f if keyboard interception was not possible.", DENEMO_SCHEME_PREFIX "GetKeypress", scheme_get_keypress);
304 install_scm_function (0, "Returns the last keypress that successfully invoked a command ", DENEMO_SCHEME_PREFIX "GetCommandKeypress", scheme_get_command_keypress);
305
306 install_scm_function (0, "Intercepts the next keypress and returns the name of the command invoked, before invoking the command. Returns #f if the keypress is not a shortcut for any command", DENEMO_SCHEME_PREFIX "GetCommand", scheme_get_command);
307 install_scm_function (0, "Intercepts the next keyboard shortcut and returns the name of the command invoked, before invoking the command. Returns #f if the keypress(es) are not a shortcut for any command", DENEMO_SCHEME_PREFIX "GetCommandFromUser", scheme_get_command_from_user);
308 install_scm_function (0, "Locks the standalone directive at the cursor so that it runs its delete action when deleted. The tag should be the name of a command that responds to the delete parameter.", DENEMO_SCHEME_PREFIX "LockDirective", scheme_lock_directive);
309
310 install_scm_function (2, "Sets an \"action script\" on the directive of the given tag", DENEMO_SCHEME_PREFIX "SetDirectiveTagActionScript", scheme_set_action_script_for_tag);
311 install_scm_function (1, "Inserts a Denemo Directive of the given tag, even if one already exists at the cursor, a pixel width can be passed as well", DENEMO_SCHEME_PREFIX "PutStandaloneDirective", scheme_put_standalone_directive);
312 install_scm_function (1, "Changes the tag of the Denemo Directive at the cursor", DENEMO_SCHEME_PREFIX "DirectiveChangeTag", scheme_directive_change_tag);
313 install_scm_function (0, "Choose a Denemo Directive at the cursor. Returns the tag or, if the directive is on a chord, a pair whose first element is the tag and second a boolean, true if the directive is on the note at the cursor, false if it is on the chord.", DENEMO_SCHEME_PREFIX "ChooseTagAtCursor", scheme_choose_tag_at_cursor);
314
315 #define INSTALL_GET_TAG(what)\
316 install_scm_function (0, "Takes a optional tag. Returns that tag if a "#what" directive exists at the cursor, else returns the tag of the first such directive at the cursor, or #f if none", DENEMO_SCHEME_PREFIX"DirectiveGetForTag" "-" #what, scheme_##what##_directive_get_tag);
317 INSTALL_GET_TAG (object);
318 INSTALL_GET_TAG (standalone);
319 INSTALL_GET_TAG (chord);
320 INSTALL_GET_TAG (note);
321 INSTALL_GET_TAG (staff);
322 INSTALL_GET_TAG (voice);
323 INSTALL_GET_TAG (score);
324 INSTALL_GET_TAG (clef);
325 INSTALL_GET_TAG (timesig);
326 INSTALL_GET_TAG (tuplet);
327 INSTALL_GET_TAG (stemdirective);
328 INSTALL_GET_TAG (keysig);
329 INSTALL_GET_TAG (scoreheader);
330 INSTALL_GET_TAG (header);
331 INSTALL_GET_TAG (paper);
332 INSTALL_GET_TAG (layout);
333 INSTALL_GET_TAG (movementcontrol);
334 #undef INSTALL_GET_TAG
335
336 #define INSTALL_GET_NTH_TAG(what)\
337 install_scm_function (1, "Takes a number n. Returns the tag of the nth "#what" directive if it exists else returns #f if none", DENEMO_SCHEME_PREFIX"DirectiveGetNthTag" "-" #what, scheme_##what##_directive_get_nth_tag);
338 INSTALL_GET_NTH_TAG (chord);
339 INSTALL_GET_NTH_TAG (note);
340 INSTALL_GET_NTH_TAG (staff);
341 INSTALL_GET_NTH_TAG (voice);
342 INSTALL_GET_NTH_TAG (score);
343 INSTALL_GET_NTH_TAG (clef);
344 INSTALL_GET_NTH_TAG (timesig);
345 INSTALL_GET_NTH_TAG (tuplet);
346 INSTALL_GET_NTH_TAG (stemdirective);
347 INSTALL_GET_NTH_TAG (keysig);
348 INSTALL_GET_NTH_TAG (scoreheader);
349 INSTALL_GET_NTH_TAG (header);
350 INSTALL_GET_NTH_TAG (paper);
351 INSTALL_GET_NTH_TAG (layout);
352 INSTALL_GET_NTH_TAG (movementcontrol);
353 #undef INSTALL_GET_NTH_TAG
354 #define INSTALL_PRIORITIZE_TAG(what)\
355 install_scm_function (1, "Takes a tag. The "#what" directive with that tag if it exists becomes the first to be processed; else returns #f if none", DENEMO_SCHEME_PREFIX"DirectivePrioritizeTag" "-" #what, scheme_##what##_directive_prioritize_tag);
356 INSTALL_PRIORITIZE_TAG (chord);
357 INSTALL_PRIORITIZE_TAG (note);
358 INSTALL_PRIORITIZE_TAG (staff);
359 INSTALL_PRIORITIZE_TAG (voice);
360 INSTALL_PRIORITIZE_TAG (score);
361 INSTALL_PRIORITIZE_TAG (clef);
362 INSTALL_PRIORITIZE_TAG (timesig);
363 INSTALL_PRIORITIZE_TAG (tuplet);
364 INSTALL_PRIORITIZE_TAG (stemdirective);
365 INSTALL_PRIORITIZE_TAG (keysig);
366 INSTALL_PRIORITIZE_TAG (scoreheader);
367 INSTALL_PRIORITIZE_TAG (header);
368 INSTALL_PRIORITIZE_TAG (paper);
369 INSTALL_PRIORITIZE_TAG (layout);
370 INSTALL_PRIORITIZE_TAG (movementcontrol);
371 #undef INSTALL_PRIORITIZE_TAG
372
373 install_scm_function (0, "Offers a list of Score-wide or Movement-wide directives for editing\n", DENEMO_SCHEME_PREFIX"EditSystemDirective", scheme_edit_system_directive);
374 install_scm_function (2, "Takes a directive type and a tag, displays the text editor for that directive (if any).\n", DENEMO_SCHEME_PREFIX"DisplayDirectiveTextEditor", scheme_display_directive_text_editor);
375 install_scm_function (1, "Takes a number n. Returns the tag of the nth note directive if it exists at the cursor height else returns #f if none", DENEMO_SCHEME_PREFIX"DirectiveGetNthTagStrictNote", scheme_directive_get_nth_tag_strict_note);
376 install_scm_function (1, "Takes a tag and returns #t if a note directive exists with that tag at the cursor height, with no argument returns the first tag on the note at cursor height, else returns #f", DENEMO_SCHEME_PREFIX"DirectiveGetForTagStrictNote", scheme_directive_get_for_tag_strict_note);
377
378
379
380 #define INSTALL_EDIT(what)\
381 install_scm_function (1, "Deletes a "#what" directive of the passed in tag. Returns #f if not deleted", DENEMO_SCHEME_PREFIX"DirectiveDelete" "-" #what, scheme_delete_##what##_directive); \
382 install_scm_function (1, "Activates a "#what" directive widget of the passed in tag. Returns #f if not a button", DENEMO_SCHEME_PREFIX"DirectiveActivate" "-" #what, scheme_activate_##what##_directive); \
383 install_scm_function (1, "Takes a tag. Lets the user edit (by running the editscript named by the tag) a "#what" directive of the passed in tag. Returns #f if none", DENEMO_SCHEME_PREFIX"DirectiveTextEdit" "-" #what, scheme_text_edit_##what##_directive);
384 INSTALL_EDIT (note);
385 INSTALL_EDIT (chord);
386 INSTALL_EDIT (staff);
387 INSTALL_EDIT (voice);
388 INSTALL_EDIT (score);
389 install_scm_function (0, "Start a low-level edit of the standalone directive at the cursor", DENEMO_SCHEME_PREFIX "DirectiveTextEdit-standalone", scheme_text_edit_standalone_directive);
390
391 install_scm_function (1, NULL, DENEMO_SCHEME_PREFIX "DirectiveDelete-object", scheme_delete_object_directive);
392
393
394 #define INSTALL_PUT(what, field)\
395 install_scm_function (2, "Writes the " #field" field (a string) of the " #what" directive with the passed int tag. Creates the directive of the given type and tag if it does not exist.",DENEMO_SCHEME_PREFIX"DirectivePut" "-" #what "-" #field, scheme_##what##_directive_put_##field);
396
397 #define INSTALL_GET(what, field)\
398 install_scm_function (1, "Gets the value of the " #field" field (a string) of the " #what" directive with the passed tag.",DENEMO_SCHEME_PREFIX"DirectiveGet" "-" #what "-" #field, scheme_##what##_directive_get_##field);
399
400 INSTALL_GET (object, minpixels);
401 INSTALL_PUT (object, minpixels);
402
403 //block to repeat for new directive fields
404
405 INSTALL_GET (standalone, minpixels);
406 INSTALL_GET (chord, minpixels);
407 INSTALL_GET (note, minpixels);
408 INSTALL_GET (staff, minpixels);
409 INSTALL_GET (voice, minpixels);
410 INSTALL_GET (score, minpixels);
411 INSTALL_GET (clef, minpixels);
412 INSTALL_GET (timesig, minpixels);
413 INSTALL_GET (tuplet, minpixels);
414 INSTALL_GET (stemdirective, minpixels);
415 INSTALL_GET (keysig, minpixels);
416
417 INSTALL_GET (scoreheader, minpixels);
418 INSTALL_GET (header, minpixels);
419 INSTALL_GET (paper, minpixels);
420 INSTALL_GET (layout, minpixels);
421 INSTALL_GET (movementcontrol, minpixels);
422
423 INSTALL_PUT (standalone, minpixels);
424 INSTALL_PUT (chord, minpixels);
425 INSTALL_PUT (note, minpixels);
426 INSTALL_PUT (staff, minpixels);
427 INSTALL_PUT (voice, minpixels);
428 INSTALL_PUT (score, minpixels);
429 INSTALL_PUT (clef, minpixels);
430 INSTALL_PUT (timesig, minpixels);
431 INSTALL_PUT (tuplet, minpixels);
432 INSTALL_PUT (stemdirective, minpixels);
433 INSTALL_PUT (keysig, minpixels);
434
435
436 INSTALL_PUT (scoreheader, minpixels);
437 INSTALL_PUT (header, minpixels);
438 INSTALL_PUT (paper, minpixels);
439 INSTALL_PUT (layout, minpixels);
440 INSTALL_PUT (movementcontrol, minpixels);
441
442 //end block to repeat for new directive fields
443 INSTALL_GET (standalone, data);
444 INSTALL_GET (chord, data);
445 INSTALL_GET (note, data);
446 INSTALL_GET (staff, data);
447 INSTALL_GET (voice, data);
448 INSTALL_GET (score, data);
449 INSTALL_GET (clef, data);
450 INSTALL_GET (timesig, data);
451 INSTALL_GET (tuplet, data);
452 INSTALL_GET (stemdirective, data);
453 INSTALL_GET (keysig, data);
454
455 INSTALL_GET (scoreheader, data);
456 INSTALL_GET (header, data);
457 INSTALL_GET (paper, data);
458 INSTALL_GET (layout, data);
459 INSTALL_GET (movementcontrol, data);
460
461 INSTALL_PUT (standalone, data);
462 INSTALL_PUT (chord, data);
463 INSTALL_PUT (note, data);
464 INSTALL_PUT (staff, data);
465 INSTALL_PUT (voice, data);
466 INSTALL_PUT (score, data);
467 INSTALL_PUT (clef, data);
468 INSTALL_PUT (timesig, data);
469 INSTALL_PUT (tuplet, data);
470 INSTALL_PUT (stemdirective, data);
471 INSTALL_PUT (keysig, data);
472
473
474 INSTALL_PUT (scoreheader, data);
475 INSTALL_PUT (header, data);
476 INSTALL_PUT (paper, data);
477 INSTALL_PUT (layout, data);
478 INSTALL_PUT (movementcontrol, data);
479
480 INSTALL_GET (standalone, grob);
481 INSTALL_GET (chord, grob);
482 INSTALL_GET (note, grob);
483 INSTALL_GET (staff, grob);
484 INSTALL_GET (voice, grob);
485 INSTALL_GET (score, grob);
486 INSTALL_GET (clef, grob);
487 INSTALL_GET (timesig, grob);
488 INSTALL_GET (tuplet, grob);
489 INSTALL_GET (stemdirective, grob);
490 INSTALL_GET (keysig, grob);
491 INSTALL_GET (standalone, grob);
492
493 // INSTALL_GET(scoreheader, grob);
494 // INSTALL_GET(header, grob);
495 // INSTALL_GET(paper, grob);
496 // INSTALL_GET(layout, grob);
497 // INSTALL_GET(movementcontrol, grob);
498
499 INSTALL_PUT (standalone, grob);
500 INSTALL_PUT (chord, grob);
501 INSTALL_PUT (note, grob);
502 //INSTALL_PUT(staff, grob);
503 //INSTALL_PUT(voice, grob);
504 INSTALL_PUT (score, grob);
505 INSTALL_PUT (clef, grob);
506 INSTALL_PUT (timesig, grob);
507 INSTALL_PUT (tuplet, grob);
508 INSTALL_PUT (stemdirective, grob);
509 INSTALL_PUT (keysig, grob);
510
511
512 // INSTALL_PUT(scoreheader, grob);
513 // INSTALL_PUT(header, grob);
514 // INSTALL_PUT(paper, grob);
515 // INSTALL_PUT(layout, grob);
516 // INSTALL_PUT(movementcontrol, grob);
517 //end of grob
518
519
520
521
522
523 INSTALL_GET (standalone, midibytes);
524 INSTALL_GET (chord, midibytes);
525 INSTALL_GET (note, midibytes);
526 INSTALL_GET (staff, midibytes);
527 INSTALL_GET (voice, midibytes);
528 INSTALL_GET (score, midibytes);
529 INSTALL_GET (movementcontrol, midibytes);
530 INSTALL_PUT (standalone, midibytes);
531 INSTALL_PUT (chord, midibytes);
532 INSTALL_PUT (note, midibytes);
533 INSTALL_PUT (staff, midibytes);
534 INSTALL_PUT (voice, midibytes);
535 INSTALL_PUT (score, midibytes);
536 INSTALL_PUT (movementcontrol, midibytes);
537
538
539
540
541
542 INSTALL_GET (standalone, override);
543 INSTALL_GET (chord, override);
544 INSTALL_GET (note, override);
545 INSTALL_GET (staff, override);
546 INSTALL_GET (voice, override);
547 INSTALL_GET (score, override);
548
549 INSTALL_PUT (standalone, override);
550 INSTALL_PUT (chord, override);
551 INSTALL_PUT (note, override);
552 INSTALL_PUT (staff, override);
553 INSTALL_PUT (voice, override);
554 INSTALL_PUT (score, override);
555
556
557 //graphic
558 INSTALL_PUT (note, graphic);
559 //INSTALL_GET(note, graphic);
560
561 INSTALL_PUT (chord, graphic);
562 //INSTALL_GET(chord, graphic);
563
564 INSTALL_PUT (standalone, graphic);
565 //INSTALL_GET(standalone, graphic);
566
567
568 INSTALL_PUT (staff, graphic);
569 INSTALL_PUT (voice, graphic);
570
571 INSTALL_PUT (score, graphic);
572 //graphic
573
574
575
576 INSTALL_PUT (chord, display);
577 INSTALL_PUT (chord, prefix);
578 INSTALL_PUT (chord, postfix);
579
580 INSTALL_GET (chord, display);
581 INSTALL_GET (chord, prefix);
582 INSTALL_GET (chord, postfix);
583
584
585 INSTALL_PUT (note, display);
586 INSTALL_PUT (note, prefix);
587 INSTALL_PUT (note, postfix);
588
589 INSTALL_GET (note, display);
590 INSTALL_GET (note, prefix);
591 INSTALL_GET (note, postfix);
592
593 INSTALL_PUT (standalone, display);
594 INSTALL_PUT (standalone, prefix);
595 INSTALL_PUT (standalone, postfix);
596
597 INSTALL_GET (standalone, display);
598 INSTALL_GET (standalone, prefix);
599 INSTALL_GET (standalone, postfix);
600
601
602 INSTALL_PUT (staff, display);
603 INSTALL_PUT (staff, prefix);
604 INSTALL_PUT (staff, postfix);
605
606 INSTALL_GET (staff, display);
607 INSTALL_GET (staff, prefix);
608 INSTALL_GET (staff, postfix);
609
610 INSTALL_PUT (voice, display);
611 INSTALL_PUT (voice, prefix);
612 INSTALL_PUT (voice, postfix);
613
614 INSTALL_GET (voice, display);
615 INSTALL_GET (voice, prefix);
616 INSTALL_GET (voice, postfix);
617
618 INSTALL_PUT (score, display);
619 INSTALL_PUT (score, prefix);
620 INSTALL_PUT (score, postfix);
621
622 INSTALL_GET (score, display);
623 INSTALL_GET (score, prefix);
624 INSTALL_GET (score, postfix);
625
626
627 INSTALL_GET (score, width);
628 INSTALL_GET (score, height);
629
630
631
632 INSTALL_GET (score, x);
633 INSTALL_GET (score, gx);
634 INSTALL_GET (score, tx);
635 INSTALL_PUT (score, x);
636 INSTALL_PUT (score, gx);
637 INSTALL_PUT (score, tx);
638
639 INSTALL_GET (score, y);
640 INSTALL_GET (score, gy);
641 INSTALL_GET (score, ty);
642 INSTALL_PUT (score, y);
643 INSTALL_PUT (score, gy);
644 INSTALL_PUT (score, ty);
645
646
647
648
649 INSTALL_PUT (note, x);
650 INSTALL_GET (note, x);
651 INSTALL_PUT (chord, x);
652 INSTALL_GET (chord, x);
653 INSTALL_PUT (note, y);
654 INSTALL_GET (note, y);
655 INSTALL_PUT (chord, y);
656 INSTALL_GET (chord, y);
657
658 INSTALL_PUT (note, tx);
659 INSTALL_GET (note, tx);
660 INSTALL_PUT (chord, tx);
661 INSTALL_GET (chord, tx);
662 INSTALL_PUT (note, ty);
663 INSTALL_GET (note, ty);
664 INSTALL_PUT (chord, ty);
665 INSTALL_GET (chord, ty);
666
667
668
669 INSTALL_PUT (note, gx);
670 INSTALL_GET (note, gx);
671 INSTALL_PUT (chord, gx);
672 INSTALL_GET (chord, gx);
673 INSTALL_PUT (note, gy);
674 INSTALL_GET (note, gy);
675 INSTALL_PUT (chord, gy);
676 INSTALL_GET (chord, gy);
677
678
679 INSTALL_PUT (standalone, x);
680 INSTALL_GET (standalone, x);
681 INSTALL_PUT (standalone, y);
682 INSTALL_GET (standalone, y);
683
684 INSTALL_PUT (standalone, tx);
685 INSTALL_GET (standalone, tx);
686 INSTALL_PUT (standalone, ty);
687 INSTALL_GET (standalone, ty);
688
689 INSTALL_PUT (standalone, gx);
690 INSTALL_GET (standalone, gx);
691 INSTALL_PUT (standalone, gy);
692 INSTALL_GET (standalone, gy);
693
694
695
696
697 INSTALL_GET (note, width);
698 INSTALL_GET (chord, width);
699 INSTALL_GET (standalone, width);
700 INSTALL_GET (note, height);
701 INSTALL_GET (chord, height);
702 INSTALL_GET (standalone, height);
703
704
705
706 //block to copy for new type of directive
707 INSTALL_PUT (clef, display);
708 INSTALL_PUT (clef, prefix);
709 INSTALL_PUT (clef, postfix);
710 INSTALL_PUT (clef, graphic);
711
712
713 INSTALL_GET (clef, display);
714 INSTALL_GET (clef, prefix);
715 INSTALL_GET (clef, postfix);
716
717 INSTALL_PUT (clef, x);
718 INSTALL_PUT (clef, y);
719 INSTALL_PUT (clef, tx);
720 INSTALL_PUT (clef, ty);
721 INSTALL_PUT (clef, gx);
722 INSTALL_PUT (clef, gy);
723 INSTALL_PUT (clef, override);
724 INSTALL_GET (clef, x);
725 INSTALL_GET (clef, y);
726 INSTALL_GET (clef, tx);
727 INSTALL_GET (clef, ty);
728 INSTALL_GET (clef, gx);
729 INSTALL_GET (clef, gy);
730 INSTALL_GET (clef, override);
731 INSTALL_GET (clef, width);
732 INSTALL_GET (clef, height);
733 INSTALL_EDIT (clef);
734 // end of block to copy for new type of directive
735
736 INSTALL_PUT (timesig, display);
737 INSTALL_PUT (timesig, prefix);
738 INSTALL_PUT (timesig, postfix);
739 INSTALL_PUT (timesig, graphic);
740
741
742 INSTALL_GET (timesig, display);
743 INSTALL_GET (timesig, prefix);
744 INSTALL_GET (timesig, postfix);
745
746 INSTALL_PUT (timesig, x);
747 INSTALL_PUT (timesig, y);
748 INSTALL_PUT (timesig, tx);
749 INSTALL_PUT (timesig, ty);
750 INSTALL_PUT (timesig, gx);
751 INSTALL_PUT (timesig, gy);
752 INSTALL_PUT (timesig, override);
753 INSTALL_GET (timesig, x);
754 INSTALL_GET (timesig, y);
755 INSTALL_GET (timesig, tx);
756 INSTALL_GET (timesig, ty);
757 INSTALL_GET (timesig, gx);
758 INSTALL_GET (timesig, gy);
759 INSTALL_GET (timesig, override);
760 INSTALL_GET (timesig, width);
761 INSTALL_GET (timesig, height);
762 INSTALL_EDIT (timesig);
763
764 INSTALL_PUT (tuplet, display);
765 INSTALL_PUT (tuplet, prefix);
766 INSTALL_PUT (tuplet, postfix);
767 INSTALL_PUT (tuplet, graphic);
768
769
770 INSTALL_GET (tuplet, display);
771 INSTALL_GET (tuplet, prefix);
772 INSTALL_GET (tuplet, postfix);
773
774 INSTALL_PUT (tuplet, x);
775 INSTALL_PUT (tuplet, y);
776 INSTALL_PUT (tuplet, tx);
777 INSTALL_PUT (tuplet, ty);
778 INSTALL_PUT (tuplet, gx);
779 INSTALL_PUT (tuplet, gy);
780 INSTALL_PUT (tuplet, override);
781 INSTALL_GET (tuplet, x);
782 INSTALL_GET (tuplet, y);
783 INSTALL_GET (tuplet, tx);
784 INSTALL_GET (tuplet, ty);
785 INSTALL_GET (tuplet, gx);
786 INSTALL_GET (tuplet, gy);
787 INSTALL_GET (tuplet, override);
788 INSTALL_GET (tuplet, width);
789 INSTALL_GET (tuplet, height);
790 INSTALL_EDIT (tuplet);
791
792 INSTALL_PUT (stemdirective, display);
793 INSTALL_PUT (stemdirective, prefix);
794 INSTALL_PUT (stemdirective, postfix);
795 INSTALL_PUT (stemdirective, graphic);
796
797
798 INSTALL_GET (stemdirective, display);
799 INSTALL_GET (stemdirective, prefix);
800 INSTALL_GET (stemdirective, postfix);
801
802 INSTALL_PUT (stemdirective, x);
803 INSTALL_PUT (stemdirective, y);
804 INSTALL_PUT (stemdirective, tx);
805 INSTALL_PUT (stemdirective, ty);
806 INSTALL_PUT (stemdirective, gx);
807 INSTALL_PUT (stemdirective, gy);
808 INSTALL_PUT (stemdirective, override);
809 INSTALL_GET (stemdirective, x);
810 INSTALL_GET (stemdirective, y);
811 INSTALL_GET (stemdirective, tx);
812 INSTALL_GET (stemdirective, ty);
813 INSTALL_GET (stemdirective, gx);
814 INSTALL_GET (stemdirective, gy);
815 INSTALL_GET (stemdirective, override);
816 INSTALL_GET (stemdirective, width);
817 INSTALL_GET (stemdirective, height);
818 INSTALL_EDIT (stemdirective);
819
820 INSTALL_PUT (keysig, display);
821 INSTALL_PUT (keysig, prefix);
822 INSTALL_PUT (keysig, postfix);
823 INSTALL_PUT (keysig, graphic);
824
825
826 INSTALL_GET (keysig, display);
827 INSTALL_GET (keysig, prefix);
828 INSTALL_GET (keysig, postfix);
829
830 INSTALL_PUT (keysig, x);
831 INSTALL_PUT (keysig, y);
832 INSTALL_PUT (keysig, tx);
833 INSTALL_PUT (keysig, ty);
834 INSTALL_PUT (keysig, gx);
835 INSTALL_PUT (keysig, gy);
836 INSTALL_PUT (keysig, override);
837 INSTALL_GET (keysig, x);
838 INSTALL_GET (keysig, y);
839 INSTALL_GET (keysig, tx);
840 INSTALL_GET (keysig, ty);
841 INSTALL_GET (keysig, gx);
842 INSTALL_GET (keysig, gy);
843 INSTALL_GET (keysig, override);
844 INSTALL_GET (keysig, width);
845 INSTALL_GET (keysig, height);
846 INSTALL_EDIT (keysig);
847
848
849 INSTALL_PUT (scoreheader, display);
850 INSTALL_PUT (scoreheader, prefix);
851 INSTALL_PUT (scoreheader, postfix);
852 INSTALL_PUT (scoreheader, graphic);
853
854
855 INSTALL_GET (scoreheader, display);
856 INSTALL_GET (scoreheader, prefix);
857 INSTALL_GET (scoreheader, postfix);
858
859 INSTALL_PUT (scoreheader, x);
860 INSTALL_PUT (scoreheader, y);
861 INSTALL_PUT (scoreheader, tx);
862 INSTALL_PUT (scoreheader, ty);
863 INSTALL_PUT (scoreheader, gx);
864 INSTALL_PUT (scoreheader, gy);
865 INSTALL_PUT (scoreheader, override);
866 INSTALL_GET (scoreheader, x);
867 INSTALL_GET (scoreheader, y);
868 INSTALL_GET (scoreheader, tx);
869 INSTALL_GET (scoreheader, ty);
870 INSTALL_GET (scoreheader, gx);
871 INSTALL_GET (scoreheader, gy);
872 INSTALL_GET (scoreheader, override);
873 INSTALL_GET (scoreheader, width);
874 INSTALL_GET (scoreheader, height);
875 INSTALL_EDIT (scoreheader);
876
877
878 INSTALL_PUT (header, display);
879 INSTALL_PUT (header, prefix);
880 INSTALL_PUT (header, postfix);
881 INSTALL_PUT (header, graphic);
882
883
884 INSTALL_GET (header, display);
885 INSTALL_GET (header, prefix);
886 INSTALL_GET (header, postfix);
887
888 INSTALL_PUT (header, x);
889 INSTALL_PUT (header, y);
890 INSTALL_PUT (header, tx);
891 INSTALL_PUT (header, ty);
892 INSTALL_PUT (header, gx);
893 INSTALL_PUT (header, gy);
894 INSTALL_PUT (header, override);
895 INSTALL_GET (header, x);
896 INSTALL_GET (header, y);
897 INSTALL_GET (header, tx);
898 INSTALL_GET (header, ty);
899 INSTALL_GET (header, gx);
900 INSTALL_GET (header, gy);
901 INSTALL_GET (header, override);
902 INSTALL_GET (header, width);
903 INSTALL_GET (header, height);
904 INSTALL_EDIT (header);
905
906
907 INSTALL_PUT (paper, display);
908 INSTALL_PUT (paper, prefix);
909 INSTALL_PUT (paper, postfix);
910 INSTALL_PUT (paper, graphic);
911
912
913 INSTALL_GET (paper, display);
914 INSTALL_GET (paper, prefix);
915 INSTALL_GET (paper, postfix);
916
917 INSTALL_PUT (paper, x);
918 INSTALL_PUT (paper, y);
919 INSTALL_PUT (paper, tx);
920 INSTALL_PUT (paper, ty);
921 INSTALL_PUT (paper, gx);
922 INSTALL_PUT (paper, gy);
923 INSTALL_PUT (paper, override);
924 INSTALL_GET (paper, x);
925 INSTALL_GET (paper, y);
926 INSTALL_GET (paper, tx);
927 INSTALL_GET (paper, ty);
928 INSTALL_GET (paper, gx);
929 INSTALL_GET (paper, gy);
930 INSTALL_GET (paper, override);
931 INSTALL_GET (paper, width);
932 INSTALL_GET (paper, height);
933 INSTALL_EDIT (paper);
934
935
936 INSTALL_PUT (layout, display);
937 INSTALL_PUT (layout, prefix);
938 INSTALL_PUT (layout, postfix);
939 INSTALL_PUT (layout, graphic);
940
941
942 INSTALL_GET (layout, display);
943 INSTALL_GET (layout, prefix);
944 INSTALL_GET (layout, postfix);
945
946 INSTALL_PUT (layout, x);
947 INSTALL_PUT (layout, y);
948 INSTALL_PUT (layout, tx);
949 INSTALL_PUT (layout, ty);
950 INSTALL_PUT (layout, gx);
951 INSTALL_PUT (layout, gy);
952 INSTALL_PUT (layout, override);
953 INSTALL_GET (layout, x);
954 INSTALL_GET (layout, y);
955 INSTALL_GET (layout, tx);
956 INSTALL_GET (layout, ty);
957 INSTALL_GET (layout, gx);
958 INSTALL_GET (layout, gy);
959 INSTALL_GET (layout, override);
960 INSTALL_GET (layout, width);
961 INSTALL_GET (layout, height);
962 INSTALL_EDIT (layout);
963
964 INSTALL_PUT (movementcontrol, display);
965 INSTALL_PUT (movementcontrol, prefix);
966 INSTALL_PUT (movementcontrol, postfix);
967 INSTALL_PUT (movementcontrol, graphic);
968
969
970 INSTALL_GET (movementcontrol, display);
971 INSTALL_GET (movementcontrol, prefix);
972 INSTALL_GET (movementcontrol, postfix);
973
974 INSTALL_PUT (movementcontrol, x);
975 INSTALL_PUT (movementcontrol, y);
976 INSTALL_PUT (movementcontrol, tx);
977 INSTALL_PUT (movementcontrol, ty);
978 INSTALL_PUT (movementcontrol, gx);
979 INSTALL_PUT (movementcontrol, gy);
980 INSTALL_PUT (movementcontrol, override);
981 INSTALL_GET (movementcontrol, x);
982 INSTALL_GET (movementcontrol, y);
983 INSTALL_GET (movementcontrol, tx);
984 INSTALL_GET (movementcontrol, ty);
985 INSTALL_GET (movementcontrol, gx);
986 INSTALL_GET (movementcontrol, gy);
987 INSTALL_GET (movementcontrol, override);
988 INSTALL_GET (movementcontrol, width);
989 INSTALL_GET (movementcontrol, height);
990 INSTALL_EDIT (movementcontrol);
991
992
993 #undef INSTALL_EDIT
994 #undef EDIT_DELETE_FN_DEF
995 #undef INSTALL_PUT
996 #undef INSTALL_GET
997 #undef GETFUNC_DEF
998 #undef PUTFUNC_DEF
999
1000 #undef INT_PUTFUNC_DEF
1001 #undef INT_GETFUNC_DEF
1002 #undef PUTGRAPHICFUNC_DEF
1003
1004
1005
1006
1007 /* test with (display (d-DirectivePut-note-display "LHfinger" "test")) after attaching a LH finger directive */
1008 /* test with (display (d-DirectivePut-note-minpixels "LHfinger" 80)) after attaching a LH finger directive */
1009 /* test with (display (d-DirectiveGet-note-minpixels "LHfinger")) after attaching a LH finger directive */
1010
1011 /* test with (display (d-DirectiveGet-note-display "LHfinger")) after attaching a LH finger directive */
1012 install_scm_function (1, "The passed string is placed on the system clipboard", DENEMO_SCHEME_PREFIX "PutTextClipboard", scheme_put_text_clipboard);
1013
1014 install_scm_function (0, "Asks the user for a user name which is returned", DENEMO_SCHEME_PREFIX "GetUserName", scheme_get_username);
1015 install_scm_function (0, "Asks the user for a password which is returned", DENEMO_SCHEME_PREFIX "GetPassword", scheme_get_password);
1016
1017 install_scm_function (0, "Returns an integer value, a set of bitfields representing the keyboard state, e.g. GDK_SHIFT_MASK etc", DENEMO_SCHEME_PREFIX "GetKeyboardState", scheme_get_keyboard_state);
1018 install_scm_function (0, "Routes the MIDI in to MIDI out if it is not intercepted by d-GetMidi", DENEMO_SCHEME_PREFIX "SetMidiThru", scheme_set_midi_thru);
1019
1020 install_scm_function (0, "Returns the ticks of the next event on the recorded MIDI track -ve if it is a NOTEOFF or #f if none. Advances to the next note.", DENEMO_SCHEME_PREFIX "GetRecordedMidiOnTick", scheme_get_recorded_midi_on_tick);
1021
1022 install_scm_function (0, "Returns the LilyPond representation of the passed MIDI key number, using the current enharmonic set.", DENEMO_SCHEME_PREFIX "GetNoteForMidiKey", scheme_get_note_for_midi_key);
1023
1024
1025
1026 install_scm_function (0, "Returns the ticks of the next event on the recorded MIDI track -ve if it is a NOTEOFF or #f if none", DENEMO_SCHEME_PREFIX "GetRecordedMidiNote", scheme_get_recorded_midi_note);
1027
1028 install_scm_function (0, "Rewinds the recorded MIDI track returns #f if no MIDI track recorded", DENEMO_SCHEME_PREFIX "RewindRecordedMidi", scheme_rewind_recorded_midi);
1029
1030 install_scm_function (0, "Intercepts a MIDI event and returns it as a 4 byte number", DENEMO_SCHEME_PREFIX "GetMidi", scheme_get_midi);
1031
1032 install_scm_function (0, "Takes one bool parameter - MIDI events will be captured/not captured depending on the value passed in, returns previous value.", DENEMO_SCHEME_PREFIX "SetMidiCapture", scheme_set_midi_capture);
1033
1034
1035 install_scm_function (0, "Switches to playalong playback. When playing or recording playback will not advance beyond the cursor position unless then mouse is moved or the next note is played in via MIDI in.", DENEMO_SCHEME_PREFIX "TogglePlayAlong", scheme_toggle_playalong);
1036 install_scm_function (0, "Switches to mouse conducting playback. Playback will not advance beyond the cursor position unless then mouse is moved in the drawing area.", DENEMO_SCHEME_PREFIX "ToggleConduct", scheme_toggle_conduct);
1037
1038 install_scm_function (1, "Starts playback and synchronously records from MIDI in. any script passed in is run at the end of the recording. The recording will play back with future play until deleted. The recording is not saved with the score - convert to notation first,", DENEMO_SCHEME_PREFIX "MidiRecord", scheme_midi_record);
1039 install_scm_function (0, "Computes durationss for recorded/imported MIDI notes based on tempo and timing of note off from previous note off or start.", DENEMO_SCHEME_PREFIX "ComputeMidiNoteDurations", scheme_compute_midi_note_durations);
1040
1041 install_scm_function (0, "Gets the marked recorded midi note as LilyPond", DENEMO_SCHEME_PREFIX "GetMarkedMidiNote", scheme_get_marked_midi_note);
1042 install_scm_function (0, "Gets the time in seconds of marked recorded midi note or #f if none", DENEMO_SCHEME_PREFIX "GetMarkedMidiNoteSeconds", scheme_get_marked_midi_note_seconds);
1043 install_scm_function (1, "Advances the marked recorded midi note can take an integer for number of steps to advance, or #f to clear the mark. Returns #f if no more marks.", DENEMO_SCHEME_PREFIX "AdvanceMarkedMidi", scheme_advance_marked_midi);
1044 install_scm_function (0, "Inserts the marked recorded or imported MIDI note using the duration guessed from the note length. Returns #f if nothing marked.", DENEMO_SCHEME_PREFIX "InsertMarkedMidiNote", scheme_insert_marked_midi_note);
1045
1046 install_scm_function (0, "Generates the MIDI timings for the music of the current movement. Returns TRUE if the MIDI was re-computed else FALSE (call was unnecessary).", DENEMO_SCHEME_PREFIX "CreateTimebase", scheme_create_timebase);
1047
1048
1049
1050 install_scm_function (1, "Takes and int as MIDI data and simulates a midi event, avoiding capturing of midi by scripts. Value 0 is special and is received by scripts.", DENEMO_SCHEME_PREFIX "PutMidi", scheme_put_midi);
1051 install_scm_function (1, "Takes and int as MIDI data and sends it directly to the MIDI out backend", DENEMO_SCHEME_PREFIX "OutputMidi", scheme_output_midi);
1052
1053
1054 install_scm_function (1, "Takes a string of space-separated bytes. The $ char stands for the current channel. Sends the passed bytes to the MIDI out", DENEMO_SCHEME_PREFIX "OutputMidiBytes", scheme_output_midi_bytes);
1055 install_scm_function (1, "Deprecated - takes an integer which is decomposed into a MIDI note played for 100ms", DENEMO_SCHEME_PREFIX "PlayMidiKey", scheme_play_midikey);
1056 install_scm_function (1, "Takes a midi note key and plays it with next rhythm effect", DENEMO_SCHEME_PREFIX "PendingMidi", scheme_pending_midi);
1057 install_scm_function (4, "Takes midi key number, volume 0-255, duration in ms and channel 0-15 and plays the note on midi out.", DENEMO_SCHEME_PREFIX "PlayMidiNote", scheme_play_midi_note);
1058
1059 install_scm_function (1, "Takes duration and executable scheme script. Executes the passed scheme code after the passed duration milliseconds", DENEMO_SCHEME_PREFIX "OneShotTimer", scheme_one_shot_timer);
1060 install_scm_function (1, "Takes a duration and scheme script, starts a timer that tries to execute the script after every duration ms. It returns a timer id which must be passed back to destroy the timer", DENEMO_SCHEME_PREFIX "Timer", scheme_timer);
1061 install_scm_function (0, "Takes a timer id and destroys the timer", DENEMO_SCHEME_PREFIX "KillTimer", scheme_kill_timer);
1062
1063 install_scm_function (0, "Returns #f if the current staff has no figures (or will not print out figured bass. See d-ShowFiguredBass)", DENEMO_SCHEME_PREFIX "HasFigures", scheme_has_figures);
1064
1065 install_scm_function (2, "Returns a string for the bass figure for the two MIDI keys passed in", DENEMO_SCHEME_PREFIX "BassFigure", scheme_bass_figure);
1066
1067
1068 install_scm_function (0, "returns #t if the passed list of MIDI keys fails the pitch spellcheck", DENEMO_SCHEME_PREFIX "SpellCheckMidiChord", scheme_spell_check_midi_chord);
1069
1070 install_scm_function (0, "Gets the MIDI key number for the note-position where the cursor is", DENEMO_SCHEME_PREFIX "GetCursorNoteAsMidi", scheme_get_cursor_note_as_midi);
1071 install_scm_function (0, "Returns the MIDI key number for the note at the cursor, or 0 if none", DENEMO_SCHEME_PREFIX "GetNoteAsMidi", scheme_get_note_as_midi);
1072 install_scm_function (0, "Re-draws the Denemo display, which can have side effects on the data, updates status bar ... ", DENEMO_SCHEME_PREFIX "RefreshDisplay", scheme_refresh_display);
1073 install_scm_function (0, "Computes cached values (normally done while drawing)", DENEMO_SCHEME_PREFIX "RefreshCache", scheme_refresh_cache);
1074 install_scm_function (0, "Sets the status of the current musical score to saved, or unsaved if passed #f", DENEMO_SCHEME_PREFIX "SetSaved", scheme_set_saved);
1075 install_scm_function (0, "Gets the saved status of the current musical score", DENEMO_SCHEME_PREFIX "GetSaved", scheme_get_saved);
1076 install_scm_function (0, "Sets/Gets the changecount of the current musical score", DENEMO_SCHEME_PREFIX "Changecount", scheme_changecount);
1077 install_scm_function (0, "Returns #f if mark is not set", DENEMO_SCHEME_PREFIX "MarkStatus", scheme_mark_status);
1078 install_scm_function (0, "Takes a command name and returns the tooltip or #f if none", DENEMO_SCHEME_PREFIX "GetHelp", scheme_get_help);
1079
1080 install_scm_function (0, "Takes a file name, loads keybindings from actions/menus returns #f if it fails", DENEMO_SCHEME_PREFIX "LoadKeybindings", scheme_load_keybindings);
1081
1082 install_scm_function (0, "Takes a file name, saves keybindings from actions/menus returns #f if it fails", DENEMO_SCHEME_PREFIX "SaveKeybindings", scheme_save_keybindings);
1083
1084 install_scm_function (0, "Clears all keybindings returns #t", DENEMO_SCHEME_PREFIX "ClearKeybindings", scheme_clear_keybindings);
1085
1086 install_scm_function (0, "Takes a file name for xml format commandset, loads commands, returns #f if it fails", DENEMO_SCHEME_PREFIX "LoadCommandset", scheme_load_commandset);
1087
1088 install_scm_function (0, "Takes a double or string and scales the display; return #f for invalid value else the value set. With no parameter returns the current value. ", DENEMO_SCHEME_PREFIX "Zoom", scheme_zoom);
1089
1090 install_scm_function (0, "Takes a double or string and scales the tempo; returns the tempo set. With no parameter returns the current master tempo ", DENEMO_SCHEME_PREFIX "MasterTempo", scheme_master_tempo);
1091
1092 install_scm_function (0, "Takes an integer or string number of beats (quarter notes) per minute as the tempo for the current movement; returns the tempo set ", DENEMO_SCHEME_PREFIX "MovementTempo", scheme_movement_tempo);
1093
1094
1095 install_scm_function (0, "Takes a double or string and scales the volume; returns the volume set ", DENEMO_SCHEME_PREFIX "MasterVolume", scheme_master_volume);
1096 install_scm_function (0, "Takes a double 0-1 and sets the staff master volume for the current staff, returns the value.\nWith no parameter returns the current value or zero if staff is muted.\nPass #f to mute the current staff and #t to unmute, leaving master volume unchanged.", DENEMO_SCHEME_PREFIX "StaffMasterVolume", scheme_staff_master_volume);
1097
1098 install_scm_function (0, "Takes a integer sets the enharmonic range to use 0 = E-flat to G-sharp ", DENEMO_SCHEME_PREFIX "SetEnharmonicPosition", scheme_set_enharmonic_position);
1099
1100
1101 install_scm_function (0, "Return a string of tuning bytes (offsets from 64) for MIDI tuning message", DENEMO_SCHEME_PREFIX "GetMidiTuning", scheme_get_midi_tuning);
1102 install_scm_function (0, "Return name of flattest degree of current temperament", DENEMO_SCHEME_PREFIX "GetFlattest", scheme_get_flattest);
1103
1104 install_scm_function (0, "Return name of sharpest degree of current temperament", DENEMO_SCHEME_PREFIX "GetSharpest", scheme_get_sharpest);
1105 install_scm_function (0, "Return name of current temperament", DENEMO_SCHEME_PREFIX "GetTemperament", scheme_get_temperament);
1106
1107 install_scm_function (0, "Rewind the MIDI generated for the current movement. Given a time in seconds it tries to rewind to there.", DENEMO_SCHEME_PREFIX "RewindMidi", scheme_rewind_midi);
1108 install_scm_function (0, "Takes an interval, returns a pair, a list of the next note-on events that occur within that interval and the time of these events.", DENEMO_SCHEME_PREFIX "NextMidiNotes", scheme_next_midi_notes);
1109
1110 install_scm_function (0, "Restart midi play, cancelling any pause", DENEMO_SCHEME_PREFIX "RestartPlay", scheme_restart_play);
1111 install_scm_function (0, "Return a number, the midi time in seconds for the start of the object at the cursor; return #f if none ", DENEMO_SCHEME_PREFIX "GetMidiOnTime", scheme_get_midi_on_time);
1112 install_scm_function (0, "Return a number, the midi time in seconds for the end of the object at the cursor; return #f if none ", DENEMO_SCHEME_PREFIX "GetMidiOffTime", scheme_get_midi_off_time);
1113 install_scm_function (0, "Set the MIDI in controller to listening mode. All signals are directed straight to the output. ", DENEMO_SCHEME_PREFIX "MidiInListening", scheme_midi_in_listening);
1114 install_scm_function (0, "Set the MIDI in controller to checking mode. The cursor will advance and the note sounded only if it is the (lowest) note at the cursor. ", DENEMO_SCHEME_PREFIX "MidiInChecking", scheme_midi_in_checking);
1115 install_scm_function (0, "Set the MIDI in controller to append/edit mode. The MIDI key sounded will be inserted in score, or appended if in appending position. MIDI signals can be filtered by scheme scripts in this mode. ", DENEMO_SCHEME_PREFIX "MidiInAppendEdit", scheme_midi_in_append_edit);
1116
1117 install_scm_function (2, "Set start and/or end time for playback to the passed numbers/strings in seconds. Use #t if a value is not to be changed. Returns #f for bad parameters ", DENEMO_SCHEME_PREFIX "SetPlaybackInterval", scheme_set_playback_interval);
1118
1119 install_scm_function (0, "Adjust start time for playback by passed number of seconds. Returns #f for bad parameter ", DENEMO_SCHEME_PREFIX "AdjustPlaybackStart", scheme_adjust_playback_start);
1120
1121 install_scm_function (0, "Adjust end time for playback by passed number of seconds. Returns #f for bad parameter ", DENEMO_SCHEME_PREFIX "AdjustPlaybackEnd", scheme_adjust_playback_end);
1122 #ifdef _WITH_X11_
1123 install_scm_function (1, "Takes a parameter #t or #f and optional position: Get a screenshot from the user and append or insert it in a list (one per measure) either applying across the staffs or to the current staff.", DENEMO_SCHEME_PREFIX "UserScreenshot", scheme_user_screenshot);
1124 install_scm_function (0, "Takes a parameter #t or #f: Delete a screenshot for the current measure, either across staffs or for current staff.", DENEMO_SCHEME_PREFIX "DeleteScreenshot", scheme_delete_screenshot);
1125 #endif /*_WITH_X11_*/
1126 install_scm_function (0, "Pushes the Denemo clipboard (cut/copy buffer) onto a stack; Use d-PopClipboard to retrieve it.", DENEMO_SCHEME_PREFIX "PushClipboard", scheme_push_clipboard);
1127
1128 install_scm_function (0, "Pops the Denemo clipboard (cut/copy buffer) from a stack created by d-PushClipboard. Returns #f if nothing on stack, else #t.", DENEMO_SCHEME_PREFIX "PopClipboard", scheme_pop_clipboard);
1129
1130 install_scm_function (0, "Deletes all objects in the selection Returns #f if no selection else #t.", DENEMO_SCHEME_PREFIX "DeleteSelection", scheme_delete_selection);
1131
1132 install_scm_function (0, "Sets the selection to be used for a thumbnail. Returns #f if no selection or selection not in first movement else #t.", DENEMO_SCHEME_PREFIX "SetThumbnailSelection", scheme_set_thumbnail_selection);
1133
1134 install_scm_function (1, "Creates a thumbnail for the current score. With no argument it waits for the thumbnail to complete, freezing any display. With #t it generates the thumbnail asynchrously. It does not report on completion.", DENEMO_SCHEME_PREFIX "CreateThumbnail", scheme_create_thumbnail);
1135
1136 install_scm_function (0, "Exits Denemo without saving history, prefs etc.", DENEMO_SCHEME_PREFIX "Exit", scheme_exit);
1137
1138 install_scm_function (0, "Snapshots the current movement putting it in the undo queue returns #f if no snapshot was taken because of a guard", DENEMO_SCHEME_PREFIX "TakeSnapshot", scheme_take_snapshot);
1139
1140 install_scm_function (0, "Creates the default layout.", DENEMO_SCHEME_PREFIX "SelectDefaultLayout", scheme_select_default_layout);
1141 install_scm_function (1, "Creates a custom layout from the currently selected (standard). Uses the passed name for the new layout. Returns #f if nothing happened.", DENEMO_SCHEME_PREFIX "CreateLayout", scheme_create_layout);
1142 install_scm_function (1, "Deletes a custom layout of the passed name. Returns #f if no layout with passed name.", DENEMO_SCHEME_PREFIX "DeleteLayout", scheme_delete_layout);
1143 install_scm_function (0, "Returns the id of the currently selected score layout (see View->Score Layout). Returns #f if no layout is selected.", DENEMO_SCHEME_PREFIX "GetLayoutId", scheme_get_layout_id);
1144 install_scm_function (0, "Returns the id of a score layout for typesetting the part for the current staff. Returns #f if not a primary voice.", DENEMO_SCHEME_PREFIX "GetCurrentStaffLayoutId", scheme_get_current_staff_layout_id);
1145 install_scm_function (0, "Selects the score layout with the passed id. Returns #f if there is no such layout.", DENEMO_SCHEME_PREFIX "SelectLayoutId", scheme_select_layout_id);
1146 install_scm_function (0, "Generates LilyPond layout for the current part (ie staffs with the name of the staff with the cursor), all movements and staffs with that staff name are generated.", DENEMO_SCHEME_PREFIX "LilyPondForPart", scheme_lilypond_for_part);
1147 install_scm_function (0, "Typesets the current part (ie the staff with the cursor), all movements and staffs with that staff name are typeset.", DENEMO_SCHEME_PREFIX "TypesetPart", scheme_typeset_part);
1148 install_scm_function (0, "Converts the current score layout to editable LilyPond text. After this the score layout is only affected by editing the LilyPond syntax.", DENEMO_SCHEME_PREFIX "ReduceLayoutToLilyPond", scheme_reduce_layout_to_lilypond);
1149 install_scm_function (0, "Returns the name of the currently selected score layout (see View->Score Layout). Returns #f if no layout is selected.", DENEMO_SCHEME_PREFIX "GetLayoutName", scheme_get_layout_name);
1150 install_scm_function (0, "Selects the next score layout. If the current layout is the last, returns #f otherwise #t.", DENEMO_SCHEME_PREFIX "SelectNextLayout", scheme_select_next_layout);
1151 install_scm_function (0, "Selects the first score layout.", DENEMO_SCHEME_PREFIX "SelectFirstLayout", scheme_select_first_layout);
1152 install_scm_function (0, "Selects the next custom score layout. If the current layout is the last, returns #f otherwise #t.", DENEMO_SCHEME_PREFIX "SelectNextCustomLayout", scheme_select_next_custom_layout);
1153 install_scm_function (0, "Selects the first custom score layout.", DENEMO_SCHEME_PREFIX "SelectFirstCustomLayout", scheme_select_first_custom_layout);
1154 install_scm_function (0, "Returns the full path to the currently opened Denemo score or #f if it does not have a disk file yet.", DENEMO_SCHEME_PREFIX "GetFilename", scheme_get_filename);
1155
1156 install_scm_function (1, "Returns the directory component of the passed filename.", DENEMO_SCHEME_PREFIX "PathFromFilename", scheme_path_from_filename);
1157 install_scm_function (1, "Returns the #t if file passed in exists.", DENEMO_SCHEME_PREFIX "FileExists", scheme_file_exists);
1158 install_scm_function (1, "Returns the filename component of the passed path.", DENEMO_SCHEME_PREFIX "FilenameFromPath", scheme_filename_from_path);
1159 install_scm_function (3, "Gives dialog to choose a file. Takes a title, start directory and list of extensions. Returns a string or #f if user cancesl", DENEMO_SCHEME_PREFIX "ChooseFile", scheme_choose_file);
1160
1161 install_scm_function (0, "Follows a link to a source file of form string \"filename:x:y:page\". It opens the file and places a marker there. ", DENEMO_SCHEME_PREFIX "OpenSource", scheme_open_source);
1162 install_scm_function (3, "Takes an optional filename and optional new name. Opens an encapsulated postscript file for editing. Returns the filename (without extension) if successful.\nStarts the graphics editor on the passed in filename or one from a dialog.\nThe returned .eps file may not exist when this procedure returns, an editor is open on it. With no filename parameter allows the user to choose,\ncopying to the project directory or the users graphics templates (if a new name is given)", DENEMO_SCHEME_PREFIX "EditGraphics", scheme_edit_graphics);
1163 install_scm_function (0, "Opens a PDF file previously generated by Denemo which has proof reading annotations. The notes in the file can be clicked on to locate the music in the Denemo display", DENEMO_SCHEME_PREFIX "OpenProofReadFile", scheme_open_proofread_file);
1164
1165 install_scm_function (0, "Converts the recorded audio to user chosen audio file.", DENEMO_SCHEME_PREFIX "ExportRecordedAudio", scheme_export_recorded_audio);
1166 install_scm_function (0, "Opens a source file for transcribing from. Links to this source file can be placed by shift-clicking on its contents", DENEMO_SCHEME_PREFIX "OpenSourceFile", scheme_open_source_file);
1167
1168 install_scm_function (0, "Opens a source audio file for transcribing from. Returns the number of seconds of audio successfully opened or #f if failed. ", DENEMO_SCHEME_PREFIX "OpenSourceAudioFile", scheme_open_source_audio_file);
1169 install_scm_function (0, "Closes a source audio attached to the current movement.", DENEMO_SCHEME_PREFIX "CloseSourceAudio", scheme_close_source_audio);
1170
1171 install_scm_function (0, "Plays audio allowing timings to be entered via keypresses if passed #t as parameter. ", DENEMO_SCHEME_PREFIX "StartAudioPlay", scheme_start_audio_play);
1172 install_scm_function (0, "Stops audio playback", DENEMO_SCHEME_PREFIX "StopAudioPlay", scheme_stop_audio_play);
1173 install_scm_function (0, "Takes a number of seconds to be used as lead-in for audio. If negative clips that much from the start of the audio. ", DENEMO_SCHEME_PREFIX "SetAudioLeadIn", scheme_set_audio_lead_in);
1174 install_scm_function (0, "returns #f if audio is not playing else #t", DENEMO_SCHEME_PREFIX "AudioIsPlaying", scheme_audio_is_playing);
1175
1176 install_scm_function (0, "Returns the next in the list of timings registered by the user during audio play.", DENEMO_SCHEME_PREFIX "NextAudioTiming", scheme_next_audio_timing);
1177
1178
1179
1180
1181
1182 install_scm_function (0, "Stop collecting undo information. Call DecreaseGuard when finished. Returns #f if already guarded, #t if this call is stopping the undo collection", DENEMO_SCHEME_PREFIX "IncreaseGuard", scheme_increase_guard);
1183
1184 install_scm_function (0, "Drop one guard against collecting undo information. Returns #t if there are no more guards \n(undo information will be collected) \nor #f if there are still guards in place.", DENEMO_SCHEME_PREFIX "DecreaseGuard", scheme_decrease_guard);
1185
1186 install_scm_function (0, "Undoes the actions performed by the script so far, starts another undo stage for the subsequent actions of the script. Note this command has the same name as the built-in Undo command, to override it when called from a script. Returns #t", DENEMO_SCHEME_PREFIX "Undo" /*sic */ , scheme_undo);
1187 install_scm_function (0, "Creates a new tab. Note this command has the same name as the built-in NewWindow command, to override it when called from a script. Returns #t", DENEMO_SCHEME_PREFIX "NewWindow" /*sic */ , scheme_new_window);
1188
1189 install_scm_function (0, "Undo normally undoes all the actions performed by a script. This puts a stage at the point in a script where it is called, so that a user-invoked undo will stop at this point, continuing when a further undo is invoked. Returns #t", DENEMO_SCHEME_PREFIX "StageForUndo", scheme_stage_for_undo);
1190
1191 install_scm_function (0, "return a string giving the latest step available for Undo", DENEMO_SCHEME_PREFIX "GetLastChange", scheme_get_last_change);
1192
1193 install_scm_function (0, "Takes a command name and returns the menu path to that command or #f if none", DENEMO_SCHEME_PREFIX "GetMenuPath", scheme_get_menu_path);
1194 install_scm_function (0, "Takes a string and returns a string representing an MD5 checksum for the passed string.", DENEMO_SCHEME_PREFIX "GetChecksum", scheme_get_checksum);
1195 install_scm_function (0, "Sets the newbie status to the passed value", DENEMO_SCHEME_PREFIX "SetNewbie", scheme_set_newbie);
1196 install_scm_function (0, "Gets the current verse of the current staff or #f if none, with an integer parameter, gets the nth verse", DENEMO_SCHEME_PREFIX "GetVerse", scheme_get_verse);
1197 install_scm_function (0, "Gets the number of lyric syllables in the current staff up to the cursor position.", DENEMO_SCHEME_PREFIX "SyllableCount", scheme_syllable_count);
1198 install_scm_function (0, "Moves the lyric cursor to match the current Denemo Cursor position (offset by an optional integer parameter), switching the keyboard input to the lyrics pane", DENEMO_SCHEME_PREFIX "SynchronizeLyricCursor", scheme_synchronize_lyric_cursor);
1199 install_scm_function (1, "Inserts passed text at the lyric cursor in the lyrics pane, returns #f if no verse at cursor", DENEMO_SCHEME_PREFIX "InsertTextInVerse", scheme_insert_text_in_verse);
1200 install_scm_function (0, "Puts the passed string as the current verse of the current staff", DENEMO_SCHEME_PREFIX "PutVerse", scheme_put_verse);
1201 install_scm_function (0, "Appends the passed string to the current verse of the current staff", DENEMO_SCHEME_PREFIX "AppendToVerse", scheme_append_to_verse);
1202
1203
1204 install_scm_function (0, "Takes a command name and returns and id for it or #f if no command of that name exists", DENEMO_SCHEME_PREFIX "GetId", scheme_get_id);
1205
1206 install_scm_function (2, "Takes a command name or command id and binding name and sets that binding on that command returns the command id that previously had the binding or #f if none", DENEMO_SCHEME_PREFIX "AddKeybinding", scheme_add_keybinding);
1207
1208 install_scm_function (0, "Takes a command name and returns the label for the menu item that executes the command or #f if none", DENEMO_SCHEME_PREFIX "GetLabel", scheme_get_label);
1209 install_scm_function (0, "Takes a non-built-in command name and returns position in the menu system for he command or #f if none", DENEMO_SCHEME_PREFIX "GetMenuPosition", scheme_get_menu_position);
1210
1211
1212 install_scm_function (0, "Returns the installed LilyPond version", DENEMO_SCHEME_PREFIX "GetLilyVersion", scheme_get_lily_version);
1213 install_scm_function (0, "Returns a boolean if the installed version of LilyPond is greater than or equal to the passed in version string", DENEMO_SCHEME_PREFIX "CheckLilyVersion", scheme_check_lily_version);
1214
1215
1216
1217 install_scm_function (0, "Takes a string putting it on the scheme-controlled status bar as a list of active filters", DENEMO_SCHEME_PREFIX "InputFilterNames", scheme_input_filter_names);
1218
1219 install_scm_function (0, "Takes a string putting the scheme controlled status bar; with no argument it hides this status bar", DENEMO_SCHEME_PREFIX "WriteStatus", scheme_write_status);
1220
1221 install_scm_function (1, "Display a debug message", DENEMO_SCHEME_PREFIX "Debug", scheme_log_debug);
1222 install_scm_function (1, "Display an info message", DENEMO_SCHEME_PREFIX "Info", scheme_log_info);
1223 install_scm_function (1, "Display a regular message", DENEMO_SCHEME_PREFIX "Message", scheme_log_message);
1224 install_scm_function (1, "Display a warning message", DENEMO_SCHEME_PREFIX "Warning", scheme_log_warning);
1225 install_scm_function (1, "Display a critical message", DENEMO_SCHEME_PREFIX "Critical", scheme_log_critical);
1226 install_scm_function (1, "Display an error message and abort", DENEMO_SCHEME_PREFIX "Error", scheme_log_error);
1227
1228 }
1229