Skip to content

Commit

Permalink
If a note's articulation is 0 then fomus does not output it (i.e. it …
Browse files Browse the repository at this point in the history
…is a rest)
  • Loading branch information
Torsten Anders committed Aug 27, 2012
1 parent c55f207 commit 033f8cd
Showing 1 changed file with 23 additions and 18 deletions.
41 changes: 23 additions & 18 deletions strasheela/source/Output.oz
Expand Up @@ -2527,27 +2527,32 @@ define
%% Required features in R: part, time, dur.
%% */
fun {Record2FomusNote R MyItem}
fun {IsPlainMark X}
%% check whether note is actually rest (i.e. its articulation is 0)
if {HasFeature R marks} andthen (R.marks == 'rest' orelse
({IsList R.marks} andthen {Member 'rest' R.marks}))
then nil % for a rest output nothing
else %% normal note
fun {IsPlainMark X}
X \= nil andthen {IsVirtualString X}
end
UserFomus = if MyItem == nil
then unit
else {GetUserFomus MyItem}
end
%% append marks in R and UserFomus
Marks1 = {CondSelect R marks nil}
Marks2 = {CondSelect UserFomus marks nil}
Marks = {Append if {IsPlainMark Marks1} then [Marks1] else Marks1 end
if {IsPlainMark Marks2} then [Marks2] else Marks2 end}
in
{ListToVS ["note" "part" R.part
{Record2FomusEvent
{Adjoin {Adjoin {Record.subtract R part}
UserFomus}
unit(marks:Marks)}}]
" "}
end
UserFomus = if MyItem == nil
then unit
else {GetUserFomus MyItem}
end
%% append marks in R and UserFomus
Marks1 = {CondSelect R marks nil}
Marks2 = {CondSelect UserFomus marks nil}
Marks = {Append if {IsPlainMark Marks1} then [Marks1] else Marks1 end
if {IsPlainMark Marks2} then [Marks2] else Marks2 end}
in
{ListToVS ["note" "part" R.part
{Record2FomusEvent
{Adjoin {Adjoin {Record.subtract R part}
UserFomus}
unit(marks:Marks)}}]
" "}
end

/** %% [for clause definitions etc] Note processing function for note-eventClause. Returns the Fomus code for a note where the pitch is the MIDI float of the note.
%% Note that the correct notation of spanner marks (e.g., legato) currently only works within the same sequential container.
%% */
Expand Down

0 comments on commit 033f8cd

Please sign in to comment.