Kara-Moon Forum

Developers & Technology => Musical MIDI Accompaniment (MMA) => Topic started by: sciurius on February 10, 2021, 06:30:56 PM



Title: Truncate
Post by: sciurius on February 10, 2021, 06:30:56 PM
Code:
Time 4/4

Begin Plectrum
    Voice NylonGuitar
    Sequence { 1   0 90 0 0 0 0 0 ;
               1.5 0 90 0 0 0 0 0 ;
               2   0 90 0 0 0 0 0 ;
               2.5 0 90 0 0 0 0 0 ;
               3   0 90 0 0 0 0 0 ;
               3.5 0 90 0 0 0 0 0 ;
               4   0 90 0 0 0 0 0 ; }
End

  1 C * 2
Truncate 1
  3 C
  4 z

The truncated bar sounds two notes, at 1 and at 1.5.

How to truncate this bar to just the first note only?


Title: Re: Truncate
Post by: bvdp on February 10, 2021, 06:37:58 PM
Probably just a matter of changing the verification test in truncate.py, bar 59 from <1 to <=0 ??? I'll try it later unless someone  else gets to it first :)


Title: Re: Truncate
Post by: bvdp on February 10, 2021, 11:36:38 PM
Okay, just tested this and it seems to work using "Truncate .5" after my wonderful fix :) I'll adjust the docs.


Title: Re: Truncate
Post by: sciurius on February 11, 2021, 08:49:45 AM
Works like a charm, thanks!


Title: Re: Truncate
Post by: sciurius on February 11, 2021, 10:10:31 AM
For illustration, this is a typical end for a plectrum plucked song.

Code:
Time 4/4

Begin Plectrum
    Voice NylonGuitar
    Sequence { 1.0 0 6:90 ;
           1.5 0 4:70 ; 2.0 0 3:70 ; 2.5 0 2:70 ;
       3.5 0 4:70 ; 4.0 0 3:70 ; 4.5 0 2:70 ;
    }
End

Tempo 88

// Song goes here

// Outtro
Tempo *.5 2
 90  Am
Truncate 0.01 // first note only
Volume 40%
 98  Am
 99  z * 4


Title: Re: Truncate
Post by: bvdp on February 11, 2021, 04:34:02 PM
When using very short bars (ie. Turncate .01) remember that the overall timing is screwed up: you'll end up with a "hiccup" in the middle of the piece :) Of course, for endings it's just fine.