Jump to content
Sign in to follow this  
Avner Dorman

figured-bass function

Recommended Posts

I think it would be nice to have some figured bass functions. I started with these simplistic functions and I am wondering if anyone has thoughts on how to generalize them. I think it'll probably be best if eventually one would be able to simply input a list of bass notes and figures - something like (figured-bass '(c3 (5 3) d3 (4 3) e3 (6) '(c major)) and the function would return the figured bass realized. 

(defun five-three (degree root type) 
  (tonality-map `(,type :root ,root :map shift) 
              (chordize (pitch-transpose (- degree 1) (interval-to-pitch '(2 2))))))

(five-three 2 'd 'major) 
=> (e4g4b4)

(defun six-three (degree root type) 
  (tonality-map `(,type :root ,root :map shift) 
              (chordize (pitch-transpose (- degree 1) (interval-to-pitch '(2 3))))))

(six-three 3 'c 'minor)
=> (eb4g4c5)

(defun six-four (degree root type) 
  (tonality-map `(,type :root ,root :map shift) 
              (chordize (pitch-transpose (- degree 1) (interval-to-pitch '(3 2))))))

(six-four 5 'e 'minor)
=> (b4e5g5)

 

 

Share this post


Link to post
Share on other sites

Thanks, Stephane!

 

for some reason, the gen-chord3 examples provided with opusmodus don't seem to work. 

 

However, I think perhaps harmonic-progression could do the trick.

For example, the following creates a series of 6/5 chords  (harmonic-progression '(0 3 4 4) '(c major) :size '4 :step '((2 1 2)))

and here are some 4/3 chords - (harmonic-progression '(0 3 4 4) '(c major) :size '4 :step '((2 2 1)))

 

perhaps this is enough - although I do think it gets a bit cumbersome. If you have ideas on how to create a function that would streamline this process, I'd appreciate hearing them. I think something more similar to traditional figured bass notation format would be easier to work with (at least for me....)

 

Thanks!

Avner 

Share this post


Link to post
Share on other sites

So here's what I have so far.  Any suggestions would be welcome

 

;;;; a function that splits a list ;;;;

(defun split-list (lst)
  (if lst
      (if (cddr lst)
          (let ((l (split-list (cddr lst))))
            (list
             (cons (car lst) (car l))
             (cons (cadr lst) (cadr l))))
        `((,(car lst)) ,(cdr lst)))
    '(nil nil)))

 

;;; figured-bass function ;;;;

 

(defun figured-bass-progression (progression)
  (harmonic-progression 
   (car (split-list progression)) '(c major) :size (loop for i in (car (cdr (split-list progression))) collect (+ (length i) 1))
   :step (car (cdr (split-list progression)))))

 

 

;;;; test


(figured-bass-progression '(0 (2 2) 1 (2 2 1) 2 (2 3) 3 (2 1 2) 4 (2 2 2) 5 (2 3) 6 (2 3) 7 (2 2)))==>

(c4e4g4 d4f4g4b4 e4g4c5 f4a4c5d5 g4b4d5f5 a4c5f5 b4d5g5 c5e5g5)

 

 

My questions are: 

 

1. Why would (2 2 1) create a 4/3 chord? Why would (2 1 2) create a 6/5 chord? Shouldn't this be the other way around? 

 

2. Would it be possible to convert this to traditional terminology? So one could write '(f4 (6 5)) and get the chord '(f4a4c5d5)? Obviously, this is not crucial, but I am curious to learn how to program better in lisp.

 

Thanks!

Avner

 

 

 

 

 

Share this post


Link to post
Share on other sites

Thanks Stephane,

 

I must say that I don't quite understand gen-chord3 - every time I evaluate the expression (gen-chord3 '(c4 eb4 g4) '((6 5) (5 3) (4 2))) I get a different result. 

 

Also, what I was hoping to do was to convert traditional figured bass (i.e., use steps in the key) into chords. Perhaps there isn't an easy way to accomplish this in opusmodus right now. 

 

Either way, would you mind explaining why gen-chord3 evaluates to different pitches every time? 

 

Thanks!

Avner 

Share this post


Link to post
Share on other sites
(gen-chord3 '(c4 eb4 g4) '((6 5) (5 3) (4 2)) :seed 42)

 

Without the :seed argument the result  should be random.

 

/Lasse

Share this post


Link to post
Share on other sites

you can use :cycle t keyword and in this case, the choice will cycle in place to random choice.

(gen-chord3 '(c4 eb4 g4) '((6 5) (5 3) (4 2)) :cycle t)

S.

Share this post


Link to post
Share on other sites

Thanks so much! :-)

 

Perhaps it's too 'old school' for opusmodus - but I think it would be great to have something like this at some point (especially for teaching purposes) - http://web.mit.edu/music21/doc/moduleReference/moduleFiguredBassExamples.html

 

Thanks again for the help with this. 

Share this post


Link to post
Share on other sites

Thx for the link to music21.

I thought I had found most algo music thingies but this one i have missed completely.

/Lasse

Share this post


Link to post
Share on other sites

You're very welcome :-)

music21 has so much to offer - I just wish there was an easy way to convert its tools and objects into opusmodus functions.  I really enjoy the workflow of opusmodus and using lisp. Perhaps when opusmodus can read xml files directly into omn it would be easy to combine the two. 

 

All the best,

Avner 

Share this post


Link to post
Share on other sites

critical thought about this:
I think in the near future this will work through "deep learning". So it is questionable how useful it is to formalize such manual and traditional "activities", such "complex rules systems" in CODE. this question generally arises in areas that focus on imitating and executing existing styles.

greetings

andré

 

Share this post


Link to post
Share on other sites

André,

 

i think you are absolutely true about deep learning for replacing the old way of hard coded rules for this type of works.

It is indeed, the actual tendency.

S.

Share this post


Link to post
Share on other sites

...except that makes you a fun and makes you happy - and that is just as important!

added 10 minutes later

so the question will be what can be better, which will be more exciting than what deep learning (or traditional algorithms) can produce. very fast then - in my opinion - the production becomes quite simple and well done, but this has nothing to do with art (if you want) - it will be the "imitation of art", also algorithmic tools pushing you in this direction - is it "music" or the simulation of "music"?. but as VON FOERSTER said: "the map is the territory"... counteracting (radical-constructivistic) the phrase "the map is not the territory"...

 

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Similar Topics

    • By JulioHerrlein
      In my Dissertation, I worked a way to convert every chord and set in a modulo 12 rhythm,
      so the entire catalog of FORTE are converted to rhythms, following the steps of Babitt:
       

       
      As a hardcore serialist, Babbitt was interested in converting 12-tone rows to rhythms, in a kind of 12-tone rhythm theory.
      Below, Wuorinen show one example of a typical Babbitt idea:
       

       
      For the sake of explaining my idea of function, it's important to have in mind that for Babbitt, the order of the
       row is very important and lead to different results in the pitch to rhythm conversion. Take a look in the example
       below:
       

       
      In the preceeding figure, the order of the C major triad generate different rhythms. In the example (0 4 7) have a
      different result from (4 0 7) or (7 0 4).
       
      In the system I developed in my Dissertation, the order does NOT matter, since (0 4 7), (7 0 4) or (4 0 7) will result
       in exactly the same rhythm, as you can see below:

       
      In my system, the transposition equals rotation (as well as in Babbitt)

       
      And every chord symbol can be transformed in a rhythm:
       

      Even voicings can be converted in longer Rhythms (the more spread the voicing, the longer the rhythm):
       

       
       
      So I did every FORTE SET in the catalog, in this way:
      Below, you can see the example of the rhythm of the major triad (Forte number 3-11b).
      In the 1st bar there is the prime form (0 4 7).
      In each subsequent bar there is a rotation of the first set by 16th note increments.
       
      HERE IS THE POINT, for the sake of the new function !
       
      The note C (that I call Rhythmic Fundamental, the "root" of the rhythm) is being displaced, as
       you can see in the circled notes.
       
      THE SET WRAP AROUND ITSELF, always forming 12 time-points (always twelve 16th notes),
      in a different way from Babbit, where the order of the sets generates longer rhythms.
      THIS WAY IS MORE INTERESTING For Popular and Minimalist Repetition Music, as
       well as 12 tone music.
       
      In the bottom staff, there are the complementary rhythm of the 3-11b set, i.e., the 9-11a
       set. In the catalog, every set is presented alongside its complementary set and every set is
      presented in 3/4 (16th notes) and in 12-8 (with the 8th note as the base value for the increments
       and rotations).

       
      So the function needed would be the one that mirror exacty this kind of conversion, not the tradicional time-point-system conversion,
      so I could use my catolog inside Opusmodus, connecting the diferent sets, like this:
       

       
      Or even using portions of the Rhythmic Sets, by truncating some of them, like this:
       

       
      In the preceeding example, only parts of the 2 sets are used (9 time points out of 12 in the 
      first and 8 time points out of 12 in the second).
       
      So, I hope someone could help me to find a way of implementing this.
      Maybe Janusz or Stephane could find interesting to develop this kind of idea inside
       the software.
       
      All the best !
      Julio Herrlein
    • By JulioHerrlein
      Dear All, 
       
      One interesting thing that could be implemented as a function could be a form of generating Negative Harmony.
      In the video below, there are some explanation of what it is and the origin in the Levy book.
      It was a trendy topic due to the Jacob Collier interview. And there are a lot of fun videos making versions of pop tunes using negative harmony.
       
      The way I understand it, it is simply a kind of mapping notes in relation to an axis, like in the figure below.
       

       
      So we need a function that could map a note in any register to another note in the closest register to the first on.
      So, any  C note will be mapped to G, all Db to F#, all D to F, all, Eb to E, all B to Ab, all Bb to A.
       
      It´s also possible to generate other mappings as well.
       
      I think that replace map or substitute map can do the job, but I´m not sure (I will try), but I find interesting to post it here to explore the idea.
       
      All the best,
       
      Julio
       
      It´s kind of funny to sse in this por versions how every is upside down and how you can generate an entirely new song from exactly the same material.
       
       
       
      POP TUNES with negative harmony:
       
       
       
       
       
    • By torstenanders
      What is the Lisp function for stopping playback (bound to the shortcut cmd-esc)? 
       
      ... I could never add a custom keyboard shortcut to the Opusmodus text editor Hemlock (and I tried), but I just managed adding keyboard shortcuts and a menu for playing Opusmodus snippets and my polyphonic score format to Emacs (thanks to the fact that scores now can be displayed in a separate window). Only need some key for stopping playback as well.
       
      (The main thing I will then miss when using Emacs as the Opusmodus IDE is the close integration of the document, but well, you cannot have everything 🙂  On the plus side, I have a more stable editor and in particular a very good debugger.)
       
      Thanks! 
       
      Torsten
×
×
  • Create New...