On Thu, Sep 22, 2016 at 09:16:12AM -0500, Paul Davis wrote: [...] > Ableton have now done that, albeit by circumventing the hardest parts of > the problem (a tempo map with varying meter and tempo).
What? I repeat: that's not an innovation. >From Incudine web page [1]: Features [...] * Tempo change with arbitrary curves [...] Public and visible to *all* from commit 2fbf62068e50ef65e15a235454540ac4a22500ab Author: Tito Latini <tito.01b...@gmail.com> Date: Fri Oct 25 11:21:55 2013 +0200 complete temporal envelope - new structure TEMPO-ENVELOPE - new utilities: SET-TEMPO-ENVELOPE, TIME-AT, BPS-AT and BPM-AT - the syntax for the #[... b.* ...] read-macro becomes: #[NUM-OF-BEATS b.*] ; *TEMPO* by default #[NUM-OF-BEATS b.* TEMPO] #[NUM-OF-BEATS b.* TEMPO-ENVELOPE OFFSET-IN-BEATS] The source is in incudine/src/time.lisp [2] (GPL v2) If you read lisp, here is a part of the tutorial about tempo mapping (the original is online [3] or with the source code incudine/doc/html/tutorial_02.html or the text file incudine/doc/tutorials/getting_start_2.cudo): --[START TUTORIAL CUT]-- The structure TEMPO-ENVELOPE is specific for a temporal envelope. The constructor is MAKE-TEMPO-ENVELOPE, and SET-TEMPO-ENVELOPE is useful to change an existent instance. ;;; The utilities to get the time, the bps and the bpm are: (time-at tempo-env beats &optional offset) (bps-at tempo-env beats) (bpm-at tempo-env beats) ;;; The syntax for the #[... b.* ...] read-macro is: #[NUM-OF-BEATS b.*] ; *TEMPO* by default #[NUM-OF-BEATS b.* TEMPO] #[NUM-OF-BEATS b.* TEMPO-ENVELOPE OFFSET-IN-BEATS] ;;; Example: ;;; After 8 beats, there is an acceleration from 60 to 120 bpm in 4 beats, ;;; with coeff 4 for the curvature. Then, after 2 beats, there is a ;;; deceleration from 120 to 96 bpm in 2 beats, with sinusoidal curvature. SCRATCH> (defvar *tenv1* (make-tempo-envelope '(60 60 120 120 96) '(8 4 2 2) :curve '(:step 4 :step :sin))) *TENV1* SCRATCH> (loop for beats below 20 by 0.5 collect (time-at *tenv1* beats)) (0.0d0 0.5d0 1.0d0 1.5d0 2.0d0 2.5d0 3.0d0 3.5d0 4.0d0 4.5d0 5.0d0 5.5d0 6.0d0 6.5d0 7.0d0 7.5d0 8.0d0 8.498612626829395d0 8.993299378541845d0 9.481513456442876d0 9.959055899352716d0 10.419003790659431d0 10.849943170489647d0 11.233055600417206d0 11.537314720727547d0 11.787314720727547d0 12.037314720727547d0 12.287314720727547d0 12.537314720727547d0 12.790429835847638d0 13.060025984954574d0 13.352929835847638d0 13.662314720727547d0 13.974814720727547d0 14.287314720727547d0 14.599814720727547d0 14.912314720727547d0 15.224814720727547d0 15.537314720727547d0 15.849814720727547d0) SCRATCH> (loop for beats below 20 by 0.5 collect (bps-at *tenv1* beats)) (1.0d0 1.0d0 1.0d0 1.0d0 1.0d0 1.0d0 1.0d0 1.0d0 1.0d0 1.0d0 1.0d0 1.0d0 1.0d0 1.0d0 1.0d0 1.0d0 1.0d0 0.9939482867384511d0 0.9839706983599575d0 0.9675204361700447d0 0.9403985389889412d0 0.8956820902047142d0 0.8219571299439862d0 0.7004052197806022d0 0.5d0 0.5d0 0.5d0 0.5d0 0.5d0 0.5183058261758408d0 0.5625d0 0.6066941738241592d0 0.625d0 0.625d0 0.625d0 0.625d0 0.625d0 0.625d0 0.625d0 0.625d0) SCRATCH> (loop for beats below 20 by 0.5 collect (bpm-at *tenv1* beats)) (60.0d0 60.0d0 60.0d0 60.0d0 60.0d0 60.0d0 60.0d0 60.0d0 60.0d0 60.0d0 60.0d0 60.0d0 60.0d0 60.0d0 60.0d0 60.0d0 60.0d0 60.36531356866102d0 60.97742554733141d0 62.01419397145924d0 63.80273629998226d0 66.98805374827423d0 72.99650774254955d0 85.6646956725917d0 120.0d0 120.0d0 120.0d0 120.0d0 120.0d0 115.76177030980232d0 106.66666666666667d0 98.8966147833654d0 96.0d0 96.0d0 96.0d0 96.0d0 96.0d0 96.0d0 96.0d0 96.0d0) SCRATCH> *sample-rate* 48000.0d0 SCRATCH> (loop for beats below 20 by 0.5 collect #[1 beat *tenv1* beats]) (48000.0d0 48000.0d0 48000.0d0 48000.0d0 48000.0d0 48000.0d0 48000.0d0 48000.0d0 48000.0d0 48000.0d0 48000.0d0 48000.0d0 48000.0d0 48000.0d0 48000.0d0 47933.40608781097d0 47678.37017000858d0 47179.23982144708d0 46356.31299892179d0 44999.536042394655d0 42762.58901457268d0 39074.486868373184d0 32993.834411419215d0 26604.43777489638d0 24000.0d0 24000.0d0 24000.0d0 24149.525525764348d0 25090.140682897298d0 27000.0d0 28909.859317102702d0 29850.474474235652d0 30000.0d0 30000.0d0 30000.0d0 30000.0d0 30000.0d0 30000.0d0 30000.0d0 30000.0d0) --[STOP TUTORIAL CUT]-- [1] http://incudine.sourceforge.net/ [2] https://raw.githubusercontent.com/titola/incudine/master/src/time.lisp [3] http://incudine.sourceforge.net/tutorial_02.html _______________________________________________ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev