Prof.Dr.Godfried-Willem RAES

<GMT> Reference Manual: Section 9 : Rhyhm- related procedures and functions


Introduction to <GMT> <Index > <Introduction> to the harmony library functions <General Functions> <midi functions>
  <Fuzzy Functions> <Analysis Functions> <Acoustical Functions> <audio functions>
  <Visualisation Functions> <File Management> <Psychological Functions> <rhythm functions>

This page documents functions and procedures in <GMT> or its DLL library that add rhythm treatment functionality to both <GMT> and the Harmony Library. These prototypes have been used extensively in real time compositions by the author such as <Cobiba>, for flute, <Obotek> for Oboe, <CelloPi>, for cello, <Gorgonio> for automats, <Lickstick> for recorder etc...

Note that we use the WINMM.DLL functions timeGetTime (), timeSetEvent() and timeKillEvent (). Examples can be found in our support files for player pianos and other music automats. These functions have millisecond precision, and require the use of dll-based callback functions. Since GMT version 5.00 all our task scheduling makes use of these multimedia timers. The rhythm support covered in this chapter, illustrates this.


FUNCTION RitmSigma! (Ritm AS RitmeType)


SUB ShiftLeftOnZero (Ritm AS RitmeType, minval!)


SUB Iprop2Rit BYREF h AS HarmType, BYVAL tasknr AS LONG, BYVAL ritbase AS BYTE


This procedure uses the contents of the interval property strenghts as found in the harmony structure of the harmony structure refered to by the first parameter, to derive a rhythmical structure, returned as a pattern in the corresponding field in the task referenced by the second parameter. The rhythm sequence returned consists of a maximum of 26 steps and always ends with a zero. The duration of the note on the beat is a function of the value in Iprop(0), the unison and octave strenght found in the harmony string. The silence after this note (the first negative value at Task().Rit(0).pattern(1) ) complements this duration up to the first 1/ritbase part of the bar. The duration of the second note at 1/ritbase is a function of the strenght of fifths/fourths in Iprop(). The silence after this note complements this duration up to the first 1/ritbase+1 of the bar. Similarly, all other positions in the rhythm pattern are filled following this order:


  • 1.- octave/unison strenght in Iprop(0)
    2.- fifth/fouth strenght in Iprop(5)
    3.- major third/minor sixth strenght in Iprop(4)
    4.- major third/major sixth strenght in Iprop(3)
    5.- major second/minor seventh strenght in Iprop(2)
    6.- minor second/major seventh strenght in Iprop(1)
    7.- triton strenght in Iprop(6)


The time series returned looks like:


  • pattern(0) = Iprop(0) / ritbase
    pattern(1) = -(1-Iprop(0))/ritbase
    pattern(2) = Iprop(5) / ritbase + 1
    pattern(3) = -(1-Iprop(5))/ritbase+ 1
    pattern(4) = Iprop(4) / ritbase + 2
    pattern(5) = -(1-Iprop(4))/ritbase+ 2
    pattern(6) = Iprop(3) / ritbase + 3
    pattern(7) = -(1-Iprop(3))/ritbase+ 3
    pattern(8) = Iprop(2) / ritbase + 4
    pattern(9) = -(1-Iprop(2))/ritbase+ 4
    pattern(10) = Iprop(1) / ritbase + 5
    pattern(11) = -(1-Iprop(1))/ritbase+ 5
    pattern(12) = Iprop(6) / ritbase + 6
    pattern(13) = -(1-Iprop(6))/ritbase+ 6

SUB ShepChord2Rit (BYREF H AS HarmType, BYVAL tasknr AS LONG, BYVAL ritbase AS BYTE, BYVAL tc AS LONG)


Returns a rhythm pattern based on the shepard reduction of the harmonic situation passed in H(0).C(0 TO 11). The result is always a periodic pattern, either binary or ternary, depending on the value of ritbase. If ritbase MOD 2 = 0, the result will be binary, in all other case, it will be ternary. In the binary case the rhythm will be distributed over 16 pulses (8-ON times,0-OFF times), in the ternary case, over 18 pulses (9-ON times, 9-OFF times). The sum of each ON/OFF couple (found on even/odd places in pattern()) will always be unity. The resulting pattern is returned in Task(tasknr%).Rit(0).pattern(). Other than is the case of Iprop2Rit(), this procedure is sensitive to tonality (passed in the parameter tc, tonal center). I-IV-V chords on input will yield rhythms wherein 'on-the-beat' values are stronger. Dissonant chords will be characterised by more 'dotted' patterns.


FUNCTION GetNrTicks (BYVAL tasknr AS LONG) AS INTEGER


This is an internal procedure in the DLL returning de period-time (duration for a bar) for the task/voice using the rhythm implementation under GMT. It is used to calculate the maximum duration of a pattern. This is equivalent to the soll-sigmasum of all durations in the rhythmpattern.


FUNCTION GetRitme (Ritm AS RitmeType, BYVAL param AS DWORD, BYVAL style AS SINGLE) AS SINGLE

[30.05.2002]


SUB RitmeProtoType (tasknr%)


Filedate: 2004-10-30


<Index > <Introduction> <General Functions>  
<Fuzzy Functions> <Analysis Functions> <Acoustical Functions>  
<Visualisation Functions> <File Management> <Psychological Functions>  
To homepage dr.Godfried-Willem RAES EXIT Kursus Site e-mail remarks to author