Better Jazz improvisation in TidalCycles

Agathe Herrou

TidalCycles

  • Haskell live-coding language
  • Pattern-based and cycle-based
  • Mini-notation
    		
    		  up "0*2 ~ [2 3] 5!2"
    		
    	      

Jazz

  • Jazz makes a freeer use of dissonance than classical music
  • Historically: chromatic approach
  • Formalised as altered chords and scales

Introductory example

Solo of Cannonball Adderley on All Blues

Jazz in TidalCycles

	      
		d1 $ stack [
		  up "<a'min7 d'min7 g'dom7 c'maj7>" # sound "superpiano" # legato 2,
		  up ((scale "<aeolian dorian mixolydian ionian>"
		  $ cat ["[0 1]*2",
		         struct "t*8" $ run 6])
		  |+ "<a d g c>")
		  # sound "superpiano"
		]
	      
	    
  • Chords and scales have to be associated manually
  • Constrained in the scale
To add chromaticism:
	      
		d1 $ stack [
		  up "<a'min7 d'min7 g'dom7 c'maj7>" # sound "superpiano" # legato 2,
		  up ((scale "<aeolian dorian mixolydian ionian>"
		  $ cat ["[0 1]*2",
		         struct "t*8" $ run 6])
		  |+ "<a d g c>"
		  |+ "0 1 0!6")
		  # sound "superpiano"
		]
	      
	    
Very tedious, impractical

Jazz in Strudel


Strudel: port of TidalCycles in JavaScript, running in the browser
  • Smooth voice leading
  • "Best" scales choice

Chromaticism

Idea: interpolate chromatically between anchor notes in a melody

Chromatise: Version 1

	      
		chromatise "[0 3] 5"
		tidal> "[[0 1 2] [3 4]] 5"
	      
	    
Problems:
  • Lookahead is not possible in the Tidal model
  • What about polyphony?
Already existing approximate solution:
	      
		smooth :: Fractional a => Pattern a -> Pattern a 
	      
	    

Version 2

A less ambitious version: insert a fixed number of chromatic notes
	    
	      chromatise 2 "[0 3] 5"
	      tidal> "[[0 1 2] [3 4 5]] [5 6 7]"
	    
	  

Application: Chromatic approach

DEMO

scaleMod

Second idea: modify the scale on the fly
	      
		scaleMod :: Fractional a =>
		Pattern String -> ([a] -> [a]) -> Pattern Int -> Pattern a
		scaleMods :: Fractional a =>
		Pattern String -> ([[a] -> [a]]) -> Pattern Int -> Pattern a
	      
	    
	      
		scaleMod "major" (insert 6) $ run 8
		tidal> 0 2 4 5 6 7 9 11
	      
	    
	      
		scaleMods "major" [id, insert 6] $ run 8
		tidal> 0 2 4 5 7 9 11 12
		       0 2 4 5 6 7 9 11
	      
	    

Application: Bebop scales

  • Insert a note into a 7-degrees scale
    $\Ra$ 8-degrees scale
  • Used for its rhythmic properties:
    if played over 8 eighth-notes, it will end on the first scale note at next bar
Example from Giant Steps:
	      
		scaleMod "major" (insert 8) $ run 8
	      
	    

Application: Minor scales


Natural minor $\Ra$ harmonic minor:
raise the seventh degree by a semitone
Harmonic minor $\Ra$ melodic minor:
raise the sixth degree by a semitone
	      
		raiseDegree :: Fractional a => Int -> [a] -> [a]
	      
	    
	      
		scaleMods "minor" [id, raiseDegree 6] $ run 8
		> 0 2 3 5 7 8 10 12
		  0 2 3 5 7 8 11 12
	      
	    
	      
		scaleMods "minor" [id, raiseDegrees 5 6] $ run 8
		> 0 2 3 5 7 9 10 12
		  0 2 3 5 7 8 11 12
	      
	    

Conclusion

Added two functions chromatise and scaleMod to TidalCycles that make it easier to:
  • Insert chromatic passing notes
  • Modify scales on-the-fly
Future work:
  • Boolean masks in chromatise
  • Apply smooth to chromatic interpolation
  • More scale modification functions

Thanks for your attention!