ChordQL



Example I is a simple sequence of chords, represented as c elements:
<query>
  <c r="G"/><c r="D" b="F#"/><c r="G"/><c r="E" s="7"/><c r="A" s="7"/><c r="D"/>
</query>
matches a music with this fragment:
<c r="G"/>Eu me arrependo, Senhor<c r="D" b="F#"/>,

Me arrependo Senhor<c r="G"/>, me arre<c r="E" s="7"/>pendo, Se<c r="A" s="7"/>nhor

<begin-repeat/>Eu <c r="D"/>quero voltar ao prime<c r="A" b="C#"/>iro  <c r="B" s="m"/>amor <c r="A" s="7"/>

Example II disregards chord inversions and checks only if the chord suffix is in major or minor mode:
<query consider-inversions="no" suffix="major-minor">
  <c r="G"/><c r="D"/><c r="G"/><c r="E"/><c r="A"/><c r="D"/>
</query>
matches a music with this fragment:
<c r="G"/>Eu me arrependo, Senhor<c r="D" b="F#"/>,

Me arrependo Senhor<c r="G"/>, me arre<c r="E" s="7"/>pendo, Se<c r="A" s="7"/>nhor


Here are some matrix showing different results for different attributes of the query element. Lines represent query arguments, and columns represent chords that exist in the music.

(consider the music in the key of G)

default attributes in the query element (suffix="exact", grades="no", consider-inversions="yes")

 

 

 

 

music contains

 

 

<c r="G">

<c r="E" s="m7"/>

query argument

 

 

<c r="G"/>

match

no-match

<c r="E" s="m"/>

no-match

no-match

<c r="G" b="B"/>

no-match

no-match

<c r="Fb" s="m7"/>

no-match

no-match


suffix="major-minor" in the query element

 

 

 

music contains

 

 

<c r="G">

<c r="E" s="m7"/>

query argument

 

 

<c r="G"/>

match

no-match

<c r="E" s="m"/>

no-match

match

<c r="G" b="B"/>

no-match

no-match

<c r="G" s="m"/>

no-match

no-match


grades="yes" in the query element

 

 

 

 

music contains

 

 

 

<c r="G">

<c r="A" s="m"/>

<c r="G" b="B">

query argument

 

 

 

<c r="I"/>

match

no-match

no-match

<c r="ii"/>

no-match

match

no-match

<c r="I" i="64"/>

no-match

no-match

no-match

<c r="I" i="6"/>

no-match

no-match

match


consider-inversions="no" in the query element

 

 

 

 

music contains

 

 

 

<c r="G">

<c r="G" b="B">

<c r="G" s="m">

query argument

 

 

 

<c r="G"/>

match

match

no-match

<c r="G" b="B">

match

match

no-match



Back to the main page.