Jump to content

Stephane Boussuge

Moderators
  • Posts

    1,059
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Stephane Boussuge reacted to opmo in gen-brownian-motion inside lower and upper limit   
    New gen-brownian-motion - update 3.0.28929
  2. Like
    Stephane Boussuge reacted to opmo in Opusmodus 3.0.28930 Update   
    New function: FFTH, FFTW
    Brownian motion functions are rewritten. If you used them before please check the documents.
    Improvement to probability functions.

    FFTH
    num-of-harmonics step-resolution points &key type quantize coeff ambitus
     
    The function FFTH calculates the Fast Fourier Transform (FFT) of a given list of points. The FFT is a mathematical algorithm that transforms a function of time (a signal) into a function of frequency. In the context of digital signal processing, the FFT algorithm is used to identify the frequencies present in a discrete signal.
     
    The computation involves the following steps:
    Initialization: Arrays for amplitude, phase, harmonics-matrix, and fftx are initialized.
     
    Coefficient calculation: The function then calculates coefficients for the FFT, looping over the input data points. This is done using a complex number, where amplitude corresponds to the real part and phase to the imaginary part.
     
    FFT curve computation: After the coefficients have been calculated, the function uses them to calculate the FFT curve by looping over a set of x-values and summing up the contributions from each coefficient.
     
    Transformation of the results based on the type of output specified: If type is 'integer, the function rounds the FFT output to the nearest integer. If it's 'pitch, it converts the FFT output to pitches, quantizes them, and limits them to the specified ambitus. If no type is specified, the raw data points of the FFT curve are returned.
     
    Examples:
     
    (ffth 8 0.05 '(44 52 22 68 6 22 9 73 28 68))   
     
    (ffth 8 0.05 '(44 52 22 68 6 22 9 73 28 68)        :type 'pitch :ambitus '(c3 c5))
     
    (ffth 3 0.05 '(44 52 22 68 6 22 9 73 28 68)        :type 'pitch :coeff 1.0 :ambitus '(c3 c5))
     
    (ffth 8 0.05 '(44 52 22 68 6 22 9 73 28 68)        :type 'pitch :ambitus '(c3 c5) :quantize 1/4)
     
     
    FFTW
    data &key window normalize coefficients scale-factor phase
     
    This function performs a Fast Fourier Transform (FFT) on the input data. The FFT is a widely-used algorithm for computing the Discrete Fourier Transform, which decomposes a sequence of numbers into components of different frequencies.
     
    If a windowing function is provided via the window keyword parameter, this function is used to create a "window" that is applied to the input data before performing the FFT. Windowing can help to reduce "leakage" and "picket fence" effects (artifacts caused by the finite length of the input data).
     
    If the normalize keyword parameter is true (the default), the FFT results are normalized by dividing each component by the length of the input data. This makes the results independent of the length of the input data and can make them easier to interpret.
     
    The coefficient parameter in the FFTW function serves to modify the amplitude of the output data. Each output value of the FFT is multiplied by this coefficient, effectively scaling the amplitude of the frequency components.
     
    The implementation of this FFT function is recursive, meaning it repeatedly breaks down the problem into smaller parts until it reaches a base case where the FFT can be computed directly. This makes it efficient for large datasets.
     
    Note that this function requires the length of the input data to be a power of 2. If the length of the input data is not a power of 2, it is padded with zeros up to the next power of 2. This is because the FFT algorithm is most efficient when the length of the input data is a power of 2.
     
    If you only care about the magnitudes of the frequency components, you can take the absolute value of each number in the result:
     
    (setf data '(0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15))
     
    If you also care about the phase information, you can use the phase option to extract the phase of each number:
     
    (fftw data :phase t)
     
    Examples:
    In this example, a Blackman-Harris window is applied to the input data:
     
    (fftw data :window 'blackman-harris-window)
     
    No normalization is performed:
     
    (fftw data :window 'blackman-harris-window :normalize nil)
     
    Compute FFT with Gaussian window:
     
    (fftw data :window 'gaussian-window)
     
    Compute FFT with Ultraspherical window:
     
    (fftw data :window 'ultraspherical-window)
     
    Examples with all available window functions:
    (fftw data :window 'bartlett-hann-window) (fftw data :window 'bartlett-window) (fftw data :window 'blackman-harris-window) (fftw data :window 'blackman-nuttall-window) (fftw data :window 'blackman-window) (fftw data :window 'bohman-window) (fftw data :window 'cauchy-window) (fftw data :window 'connes-window) (fftw data :window 'cosine-window) (fftw data :window 'exponential-window) (fftw data :window 'flat-top-window) (fftw data :window 'gaussian-window) (fftw data :window 'hamming-window) (fftw data :window 'hann-poisson-window) (fftw data :window 'hanning-window) (fftw data :window 'kaiser-window) (fftw data :window 'nuttall-window) (fftw data :window 'parzen-window) (fftw data :window 'planck-taper-window) (fftw data :window 'rectangular-window) (fftw data :window 'riemann-window) (fftw data :window 'triangular-window) (fftw data :window 'tukey-window) (fftw data :window 'ultraspherical-window) (fftw data :window 'welch-window)  
    Best wishes,
    Janusz
  3. Like
    Stephane Boussuge got a reaction from JimmyTheSaint in Piano Trio "Slonimsky" Movement 1   
    Hi,
     
    here's for study purpose the Opusmodus score of the first movement of my piano trio.
     
    All the best to the wonderful Opusmodus users community !
     
    SB.

     
     
    PianoTrio-SlonimskyV2.opmo
  4. Like
    Stephane Boussuge got a reaction from AM in gen-brownian-motion inside lower and upper limit   
    For me, I think that's perfect !
     
    I know many of the OM functions but totally forgot about that one.
     
    Thank you for the trick !
     
    Best
     
    S.
  5. Like
    Stephane Boussuge got a reaction from opmo in gen-brownian-motion inside lower and upper limit   
    For further information about the concept of tendency masking, here's 2 links to Cmask implementation.
    Something similar in OM would be nice.
     
    CMask Manual
    ABARTETZKI.USERS.AK.TU-BERLIN.DE  
     
     
    CMask Article
    ABARTETZKI.USERS.AK.TU-BERLIN.DE  
     
  6. Thanks
    Stephane Boussuge reacted to erka in gen-brownian-motion inside lower and upper limit   
    How would a tendency mask be different to this?
    (progn (setf bw (gen-brownian-motion 128 :seed 425)) (setf env1 '(-5.1 -2.3 1.5 -0.8 4.6 10.6)) (setf env2 '(1.0 1.2 -1.1 2.1 -0.3 -2.5)) (list-plot (vector-to-envelope2 env1 env2 bw)) )  
  7. Like
    Stephane Boussuge reacted to AM in merge several rhythms into one   
    great!
     
    (progn (setf r1 (gen-length '(11 13 7 17 13 11 17 23 19 2 17 5) 1/20)) (setf r2 (gen-length '(11 13 7 17 13 11) 1/8)) (unify-rhythms r1 r2))  

  8. Like
    Stephane Boussuge reacted to opmo in merge several rhythms into one   
    The new function UNIFY-RHYTHMS will solve your problem - 3.0.28916
     
    Examples:
     
    (setf l1 '(q e e 3q 3q 3q -e. s)) (setf l2 '(e e e. s -e e s -s s -s))  
    (list l1 l2) ; select and press cmd-2  
     
    (unify-rhythms l1 l2)
     
    (setf r1 (rhythm-series 6 5 3/8 :length '(q. e. e s 3q))) (setf r2 (rhythm-series 6 4 1/2 :length '(q. e. e s 3q))) (setf r3 (rhythm-series 6 3 1/2 :length '(q. e. e s 3q)))  
    (list r1 r2 r3) ; select and press cmd-2  

     
    Now we merge all three voices to form a single entity:
     
    (unify-rhythms r1 r2 r3)  

     
     
     
  9. Thanks
    Stephane Boussuge got a reaction from JimmyTheSaint in Why I love OM - Part 1 - Orchestral sections generation   
    Hi,
     
    the orchestration come from other files indeed. I'm working on the scripting of the videos actually.
     
    Best
     
    Stéphane
     
  10. Like
    Stephane Boussuge reacted to Cliff in Auto Harmonizer Function   
    Thanks Stephane, the possibilities with OM seems infinite, and it shows me I need to study the documentation even more 🙂
  11. Like
    Stephane Boussuge reacted to Cliff in Auto Harmonizer Function   
    I did experiment with the code, and I must admit, it is a kind of wonder:-)
    My hunch is that part of the magic lies in fact that the chords and melody do not 100% have same rhythm thanks to length-weight.
    I am learning a lot - again thanks a lot.
  12. Like
    Stephane Boussuge reacted to Cliff in Auto Harmonizer Function   
    Great - Thank you Stephane, for taking the time despite of travelling. I will study, based on your pointers.
  13. Like
    Stephane Boussuge got a reaction from JulioHerrlein in Auto Harmonizer Function   
    I'm in travel actually and very busy but i wrote two short example for you to explore, not exactly what you ask for but I hope interesting to study for you and hopefully inspiring for further exploration.
    Happy study 🙂
     
    ;;; EXAMPLE 1 ;;; =================== (progn ; basic version (setf melo.pch (vector-to-pitch '(c4 e5) (gen-noise 64))) (setf melo.len (flatten (rnd-sample 64 '(h. h q (e e)(s s s s) -q)))) (setf melo (make-omn :pitch melo.pch :length melo.len )) (setf chords-types '((-4 -6 -9 -16)(-7 -9 -12 -15)(-2 -8 -12 -17))) (setf base-acc (gen-chord3 melo.pch chords-types :cycle nil :relative t)) (setf acc (chord-interval-replace '(1 2 3 4) '(-11 -10 -9 -8) (ambitus '(c3 g5) (length-legato (length-weight (make-omn :pitch base-acc :length melo.len )))))) (ps 'gm :vn* (list melo) :pg (list acc) :time-signature '(4 4) ) ) ;;; EXAMPLE 2 ;;; ========================= (progn ; modal version (setf melo.pch (vector-to-pitch '(c4 e5) (gen-noise 64))) (setf melo.len (flatten (rnd-sample 64 '(h. h q (e e)(s s s s) -q)))) (setf melo (make-omn :pitch melo.pch :length melo.len )) (setf chords-types '((-4 -6 -9 -16)(-7 -9 -12 -15)(-2 -8 -12 -17))) (setf base-acc (gen-chord3 melo.pch chords-types :cycle nil :relative t)) (setf acc (chord-interval-replace '(1 2 3 4) '(-11 -10 -9 -8) (ambitus '(c3 g5) (length-legato (length-weight (make-omn :pitch base-acc :length melo.len )))))) (setf path (tonality-series '(lydian) :root '(d4 bb4 fs3 c4 a3) :map '(octave))) (setf melo.map (tonality-map path (omn-to-time-signature melo '(4 4)))) (setf acc.map (tonality-map path (omn-to-time-signature acc '(4 4)))) (ps 'gm :vn* (list melo.map) :pg (list acc.map) ) ) SB.
     
    Modal-Example-For-Cliff.mp3
     
  14. Thanks
    Stephane Boussuge reacted to david in Auto Harmonizer Function   
    it sounds great!!
     
  15. Thanks
    Stephane Boussuge got a reaction from opmo in Auto Harmonizer Function   
    I'm in travel actually and very busy but i wrote two short example for you to explore, not exactly what you ask for but I hope interesting to study for you and hopefully inspiring for further exploration.
    Happy study 🙂
     
    ;;; EXAMPLE 1 ;;; =================== (progn ; basic version (setf melo.pch (vector-to-pitch '(c4 e5) (gen-noise 64))) (setf melo.len (flatten (rnd-sample 64 '(h. h q (e e)(s s s s) -q)))) (setf melo (make-omn :pitch melo.pch :length melo.len )) (setf chords-types '((-4 -6 -9 -16)(-7 -9 -12 -15)(-2 -8 -12 -17))) (setf base-acc (gen-chord3 melo.pch chords-types :cycle nil :relative t)) (setf acc (chord-interval-replace '(1 2 3 4) '(-11 -10 -9 -8) (ambitus '(c3 g5) (length-legato (length-weight (make-omn :pitch base-acc :length melo.len )))))) (ps 'gm :vn* (list melo) :pg (list acc) :time-signature '(4 4) ) ) ;;; EXAMPLE 2 ;;; ========================= (progn ; modal version (setf melo.pch (vector-to-pitch '(c4 e5) (gen-noise 64))) (setf melo.len (flatten (rnd-sample 64 '(h. h q (e e)(s s s s) -q)))) (setf melo (make-omn :pitch melo.pch :length melo.len )) (setf chords-types '((-4 -6 -9 -16)(-7 -9 -12 -15)(-2 -8 -12 -17))) (setf base-acc (gen-chord3 melo.pch chords-types :cycle nil :relative t)) (setf acc (chord-interval-replace '(1 2 3 4) '(-11 -10 -9 -8) (ambitus '(c3 g5) (length-legato (length-weight (make-omn :pitch base-acc :length melo.len )))))) (setf path (tonality-series '(lydian) :root '(d4 bb4 fs3 c4 a3) :map '(octave))) (setf melo.map (tonality-map path (omn-to-time-signature melo '(4 4)))) (setf acc.map (tonality-map path (omn-to-time-signature acc '(4 4)))) (ps 'gm :vn* (list melo.map) :pg (list acc.map) ) ) SB.
     
    Modal-Example-For-Cliff.mp3
     
  16. Like
    Stephane Boussuge reacted to edesert in Why I love OM - Part 1 - Orchestral sections generation   
    Hi Stephane - thanks for another great tutorial!
     
  17. Like
    Stephane Boussuge got a reaction from edesert in Why I love OM - Part 1 - Orchestral sections generation   
    I truly love Opusmodus. In this new series of videos, I'm trying to show why.
    This (basic) example show how Opusmodus could be used to generate and experiment with orchestral sections.
     
     
  18. Like
    Stephane Boussuge reacted to estevancarlos in I've been waiting for the Windows port for a few years   
    This seems like an amazing tool and I'm excited to get a lot out of this. I'm glad to see the Windows version has come into existence. Thank you to everyone for putting in all of that hard work.
  19. Thanks
    Stephane Boussuge got a reaction from JimmyTheSaint in Why I love OM - Part 1 - Orchestral sections generation   
    I truly love Opusmodus. In this new series of videos, I'm trying to show why.
    This (basic) example show how Opusmodus could be used to generate and experiment with orchestral sections.
     
     
  20. Thanks
    Stephane Boussuge got a reaction from JimmyTheSaint in How to get time signature to repeat for each list in dictum?   
    Ps function is not a problem if you stay in GM but could become a bit complicated for a new comer if you want to use it with plugins, external ports etc...
     
    Basically the def-score is indeed the most "normal" and powerful way for OM to manage final score.
    PS is for drafting/sketching or teaching. But with def-score you can assemble them into complex pieces etc...
    I can't give a full course here, the subject is too big...
     
    For instrumentation, orchestration I may use several strategies but some of my favorites are to use do-timeline or do-timeline2 functions or a different approach like counterpoint function as you made in your exercise file who is working well now with the small possible corrections I've showed to you.
    S.
  21. Thanks
    Stephane Boussuge got a reaction from JimmyTheSaint in How to get time signature to repeat for each list in dictum?   
    Because (list my-sequence my-chord-sequence) is a list of lists.
    When you call for example 1 in you dictum, you don't call the first patterns but the full first list of patterns.
     
    Your code could work normally is you replace this list of list expression by: (flatten-sublist  (list my-sequence my-chord-sequence))
     
    S.
  22. Thanks
    Stephane Boussuge got a reaction from JimmyTheSaint in How to get time signature to repeat for each list in dictum?   
    So, right click into the score and choose Evaluate Score / Notation
     
  23. Thanks
    Stephane Boussuge reacted to opmo in Opusmodus 3.0.28902 Update   
    New function in 3.0.28902
     
    rhythm-series num number-of-notes span &key length prob seed
     
    This function returns a list of successive rhythmic series derived from a span (overall duration), length values, and a number of length-notes per bar. The length- notes within each bar are positioned at random.
     
    Simple examples:
     
    (rhythm-series 4 3 3/8) => ((-1/16 1/8 -1/16 1/16 1/16) (1/16 3/16 1/8) (1/8 3/16 1/16) (3/16 1/16 1/8)) (rhythm-series 4 5 3/8) => ((1/16 1/16 1/16 1/8 1/16) (-1/16 1/16 1/16 1/16 1/16 1/16) (1/16 1/16 1/16 -1/16 1/16 1/16) (1/16 1/16 1/16 1/16 -1/16 1/16)) (rhythm-series 4 3 1/4) => ((1/16 1/8 1/16) (1/16 1/16 1/8) (1/16 1/8 1/16) (1/16 1/8 1/16))  
    Examples with given length values:
     
    (rhythm-series 4 3 1 :length '(q. e. s)) => ((-1/4 1/16 1/16 1/16 -9/16) (1/8 3/16 -5/16 3/8) (1/16 3/16 -3/8 3/8) (3/16 -1/16 3/8 3/8)) (rhythm-series 6 5 3/8 :length '(q. e. e s 3q) :prob 0.1) => ((1/16 1/16 1/16 1/16 1/8) (1/8 1/16 1/16 1/16 1/16) (1/16 1/8 1/16 1/16 1/16) (1/16 1/8 1/16 1/16 1/16) (1/16 1/16 1/16 1/16 1/16 -1/16) (1/16 1/16 1/16 1/8 1/16)) (rhythm-series 6 5 3/8 :length '(q. e. e s 3q) :prob 0.9) => ((1/12 1/12 1/12 1/12 1/24) (1/24 1/12 1/12 1/12 1/12) (1/16 1/16 1/16 1/16 1/16 -1/16) (1/16 1/16 -1/16 1/16 1/16 1/16) (1/16 1/16 1/16 -1/16 1/16 1/16) (1/16 1/16 1/16 1/16 -1/16 1/16))  
    Example with list of unique values for each generated series:
     
    (rhythm-series '(1 4 3 2) '(7 5 7 7) '(3/8 3/8 1/2 3/4) :prob '(.4 .6 .7 .1) :length '(q. e. e s 5q 3q) :seed 34) => ((1/20 1/20 1/20 1/20 1/20 1/20 1/40 -1/20) (1/24 1/12 1/12 1/12 1/12) (1/20 -1/20 1/20 -1/20 1/20 1/20 1/40 -1/20) (1/16 1/16 1/16 1/16 1/8) (1/16 1/16 1/8 1/16 1/16) (1/20 1/20 1/20 1/20 1/20 -1/20 1/20 -1/20 1/20 -1/20) (-1/20 -1/20 1/20 1/20 -1/20 1/20 1/20 1/20 1/20 1/20) (-1/20 1/20 -1/20 1/20 1/20 1/20 1/20 1/20 -1/20 1/20) (-1/16 1/16 1/16 1/16 -1/8 1/16 -1/16 1/16 1/16 1/16 -1/16) (1/12 -1/12 -1/12 1/12 1/12 1/12 1/12 1/12 1/12))  
    OMN example:
     
    (make-omn :length (rhythm-series '(1 4 3 2) '(7 5 7 7) 1/2 :prob '(.4 .6 .7 .1) :length '(q. e. e s) :seed 34) :pitch (gen-chord3 '((cs4 g4 a5) (c4 gs3 a4) (b5 f5 gs5) (b4 fs4 bb5) (cs5 c6 gs4) (e5 g3 a5)) '((6 8 11) (3 5 13) (2 7 11)))) Best wishes, Janusz
  24. Like
    Stephane Boussuge got a reaction from Nikos in Etude pour Orchestre du 4.5.2023   
    I’m always amazed by the incredible power of Opusmodus and the inspiration it give to me to compose and explore new possibilities .
    Actually, I'm playing and experimenting a bit with OM and orchestra,
    preparing my next package of video lessons for ComposerWorkshop.com.
    Today, I've made this output from my experiences, nothing extraordinary but I wanted to share it as an example of what we can make with Opusmodus in about 1h.
    It's basically only Slonimsky patterns distributed to the orchestra on an heterophonic way with transpositions from Opusmodus bind-to-interval function (set to "0")
    Stéphane
     
    Etude pour Orchestre 040523.wav
  25. Like
    Stephane Boussuge got a reaction from AM in How to get time signature to repeat for each list in dictum?   
    In that case, you can use substitute-map.  Here's a short example for woodwind trio:
     
    ;;;--------------------------------------------------------- ;;; Parameters (setf material '(#|1|# (q. f4 f e fs4 q d4 s c4 f4 a4 fs4) #|2|# (e d4 f c4 f4 a4 fs4 b4 eb4 f4) #|3|# (h f4 a4) #|4|# (h fs4 f b4) #|5|# (h eb4 f4) #|6|# (q. gs4 mp e c4 q f4 s a4 a4 gs4 b4) #|7|# (h f4 mp a4) #|8|# (q. a4 mp e gs4 q b4 s gs4 c4 b4 fs4) )) (setf fl.index '(1 2 1 3 1 4 5 6 7 8)) (setf ob.index '(3 2 4 3 5 4 6 5 7 6)) (setf bn.index '(1 2 2 1 1 3 3 1 1 4)) (setf ref-list (gen-integer 1 (length material))) (setf flute (substitute-map material ref-list fl.index)) (setf oboe (substitute-map material ref-list ob.index)) (setf bassoon (pitch-transpose -24 (substitute-map material ref-list bn.index))) ;;;--------------------------------------------------------- ;;; Score and Layout (def-score woodwind-trio (:title "Title" :composer "Composer" :copyright "Copyright © " :key-signature 'chromatic :time-signature '((1 1 1 1) 4) :tempo 100 :layout (wind-trio-layout 'flute 'oboe 'bassoon)) (flute :omn flute :channel 1 :sound 'gm :program 'flute :volume 95 :pan 70 :controllers (91 '(52)) ) (oboe :omn oboe :channel 2 :sound 'gm :program 'oboe :volume 95 :pan 54 :controllers (91 '(55)) ) (bassoon :omn bassoon :channel 3 :sound 'gm :program 'bassoon :volume 95 :pan 70 :controllers (91 '(57)) ) ) SB.
×
×
  • Create New...

Important Information

Terms of Use Privacy Policy