Everything posted by AM
- saving the output (omn) in a seperat file
-
saving the output (omn) in a seperat file
hi all is there a possibility to SAVE my output - the OMN-lists - (rnd-generated structures) in a seperate file? that by EVALUATION the OMN-lists will be written in a sepeart/new-generated file? ...so that i have not to re-import it via MIDI (makes a lot of strange rhythms) thanks for help andré
- [SOLVED] Midi In Collect (now Opusmodus have MIDI input)
-
Infinity-series applied to scales/modes
hi brian, i modified shortly the code, now you could do what you want... "step-to-pitch" will test now what the tonality-input is ... if tonality = pitches -> then use this scale, othwerwise -> "expand the scale" (defun map-infinity-series (&key seq start tonality) (step-to-pitch :steps (integer-to-interval (reset-seq seq)) :pitches (if (pitchp (car tonality)) tonality (multiple-expand-tonality :startpitch 'c0 :octaves 7 :tonality tonality)) :start start)) (map-infinity-series :seq '(0 -1 3 2 1 2 -1) :start 'fs4 :tonality (make-scale 'c2 49 :alt '(1 2 1 1))) (map-infinity-series :seq '(0 -1 3 2 1 2 -1 2 2 3 3 1 -1 1 -1 2 2) :start 'g4 :tonality '(major)) (map-infinity-series :seq '(0 -1 3 2 1 2 -1 2 2 3 3 1 -1 1 -1 2 2) :start 'fs4 :tonality '(messiaen-mode1 messiaen-mode2 messiaen-mode3)) 1) do it with library... like '(major) or (messiaen-mode1) or what else 2) do ith with a pitch-sequence like your '(make-scale 'c2 49 :alt '(1 2 1 1)) -> just REPLACE map-infinity-series by the new function-version -> ...the only thing you have to look at it: your start-pitch has to be part of your scale!
- Infinity-series applied to scales/modes
-
Infinity-series applied to scales/modes
violà ... bit more organized... a) now you could copy the SUBFUNCTIONS+MAINFUNCTION into: extensions -> user library. in that way all the functions will be loaded automatically, and it is not necessary to EVALUATE them before using... but it's useful to document it... b) otherwise... all this functions in your workspace/opmo-file... (like you are donig it wright now) ;;; SUBFUNCTIONS ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun step-to-pitch (&key steps pitches start) (let ((pos (car (position-item start pitches)))) (append (list (nth pos pitches)) (loop for i in steps ;; setting pos by add the step to pos do (setf pos (+ pos i)) ;; when pitch-range to small then reset to lowest pitch+step ;; could be a more intelligent solution when (or (>= pos (length pitches)) (< pos 0)) do (setf pos 0);(+ 0 i)) collect (nth pos pitches))))) (defun multiple-expand-tonality (&key startpitch octaves tonality) (remove-duplicates ;remove is for "cutting" if there are too much pitches (OMN loops last octave!) (loop repeat octaves with pitch = startpitch with cnt = 0 when (= cnt (length tonality)) do (setq cnt 0) append (expand-tonality (list pitch (nth cnt tonality))) do (incf cnt) do (setq pitch (car (pitch-transpose 12 (list pitch))))))) (defun reset-seq (seq) (let ((n (abs (find-min seq)))) (loop for i in seq collect (+ n i)))) ;;; MAINFUNCTION (defun map-infinity-series (&key seq start tonality) (step-to-pitch :steps (integer-to-interval (reset-seq seq)) :pitches (multiple-expand-tonality :startpitch 'c0 :octaves 7 :tonality tonality) :start start)) ;;; EXAMPLES OF USE ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (setf inf-list (infinity-series 128 '(1 0))) (map-infinity-series :seq inf-list :start 'g4 :tonality '(major)) (map-infinity-series :seq inf-list :start 'gs3 :tonality '(messiaen-mode6))
- Infinity-series applied to scales/modes
-
Infinity-series applied to scales/modes
is this correct? i think it is - not smart-coded but it works - you could merge the functions into ONE (sorry for my english). perhaps there is an OPMO-library-solution, but i don't know it... greetings (defun step-to-pitch (&key steps pitches start) (let ((pos (car (position-item start pitches)))) (append (list (nth pos pitches)) (loop for i in steps ;; setting pos by add the step to pos do (setf pos (+ pos i)) ;; when pitch-range to small then reset to lowest pitch+step ;; could be a more intelligent solution when (or (>= pos (length pitches)) (< pos 0)) do (setf pos 0);(+ 0 i)) collect (nth pos pitches))))) (defun multiple-expand-tonality (&key startpitch octaves tonality) (remove-duplicates ;remove is for "cutting" if there are too much pitches (OMN loops last octave!) (loop repeat octaves with pitch = startpitch with cnt = 0 when (= cnt (length tonality)) do (setq cnt 0) append (expand-tonality (list pitch (nth cnt tonality))) do (incf cnt) do (setq pitch (car (pitch-transpose 12 (list pitch))))))) (defun reset-seq (seq) (let ((n (abs (find-min seq)))) (loop for i in seq collect (+ n i)))) (step-to-pitch :steps (integer-to-interval (reset-seq '(0 1 -1 2 1 0 -2 3 -1 2 0 1 2 -1 -3 4 1 0 -2 3 0 1 -1 2 -2 3 1 0 3 -2 -4 5 -1 2 0 1 2 -1 -3 4 0 1 -1 2 1 0 -2 3 2 -1 -3 4 -1 2 0 1 -3 4 2 -1 4 -3 -5 6))) :pitches (multiple-expand-tonality :startpitch 'c0 :octaves 7 :tonality '(major)) :start 'g4)
-
Infinity-series applied to scales/modes
but YOUR steps are not the same from the web-archive-example -> in the web-example it's from G in C-major, steps are -> 1 -2 -> YOU are starting with steps -> 0 1 -1 2 ... ??? but, i have no idea about this infinity-things, i only MAP your SEQ to MAJOR-scale... in the way you asked for (i think), so perhaps you have to rethink the MAIN-thing? best wishes andré added 6 minutes later you have to think different - these are NOT steps, these is a INTEGER-TO-PITCH thing... perhaps mixed with tonality-map - but haven't time for that at the moment, sorry
-
Infinity-series applied to scales/modes
dear brian your pitch-range is too small for the step-sum... if you want to use it you have to enlarge your pitch-range. i've now done a small change - so you don' t have an error -> step-stack will now be set to 0, if pitches are lower or higher then your pitch-range, but in this case you don't have exact results mapping the STEPS so, enlarge your pitch-range -> perhaps with my "multiple-expand..."-function -> EXAMPLE 2 (defun step-to-pitch (&key steps pitches start) (let ((pos (car (position-item start pitches)))) (append (list (nth pos pitches)) (loop for i in steps ;; setting pos by add the step to pos do (setf pos (+ pos i)) ;; when pitch-range to small then reset to lowest pitch+step ;; could be a more intelligent solution when (or (>= pos (length pitches)) (< pos 0)) do (setf pos 0);(+ 0 i)) collect (nth pos pitches))))) ;;; EXAMPLE 1 (step-to-pitch :steps '(0 1 -1 2 1 0 -2 3 -1 2 0 1 2 -1 -3 4 1 0 -2 3 0 1 -1 2 -2 3 1 0 3 -2 -4 5 -1 2 0 1 2 -1 -3 4 0 1 -1 2 1 0 -2 3 2 -1 -3 4 -1 2 0 1 -3 4 2 -1 4 -3 -5 6) :pitches '(c3 d3 e3 f3 g3 a3 b3 c4 d4 e4 f4 g4 a4 b4 c5 d5 e5 f5 g5 a5 b5 c6) :start 'g4) ;;; here a function which enlarges TONALITIES OVER X-ocavtes ;;; so, that's easier then to type :-9 (defun multiple-expand-tonality (&key startpitch octaves tonality) (remove-duplicates ;remove is for "cutting" if there are too much pitches (OMN loops last octave!) (loop repeat octaves with pitch = startpitch with cnt = 0 when (= cnt (length tonality)) do (setq cnt 0) append (expand-tonality (list pitch (nth cnt tonality))) do (incf cnt) do (setq pitch (car (pitch-transpose 12 (list pitch))))))) (multiple-expand-tonality :startpitch 'c1 :octaves 6 :tonality '(major)) ;;; EXAMPLE 2 (step-to-pitch :steps '(0 1 -1 2 1 0 -2 3 -1 2 0 1 2 -1 -3 4 1 0 -2 3 0 1 -1 2 -2 3 1 0 3 -2 -4 5 -1 2 0 1 2 -1 -3 4 0 1 -1 2 1 0 -2 3 2 -1 -3 4 -1 2 0 1 -3 4 2 -1 4 -3 -5 6) :pitches (multiple-expand-tonality :startpitch 'c0 :octaves 7 :tonality '(major)) :start 'g4)
- Infinity-series applied to scales/modes
-
Opusmodus on a Windows Machine (using VMWare)
evaluate this, and check out the midi-destinations-function -> shows you the ports (midi-destinations)
-
Argument Question (simple problem)
But in this way: (setf binrow '(0 2 5 7 8 11)) (gen-binary-row 12 '(binrow)) What am I missing ? just do it like that: (setf binrow '(0 2 5 7 8 11)) (gen-binary-row 12 binrow) ;; your "binrow" is now a variable with a LIST as value ;; when you are writing '(binrow) it will be a LIST with the VALUE binrow (and not the values of "binrow")
-
edit-omn update: 'dynamic' arguments supported
really great, torsten! thanks a lot!!! greetings andré
-
Help with combining lists
something like this? don't know if it's like this... you want to project a chord on these "filtered pitches"? (setf lengths '(1/2 1/16 7/16 1/8 3/8 3/16 5/16 1/4 1/4 5/16 3/16)) (setf pitches '(g5 gs4 fs4 a4 gs4 g4 f4 bb4 fs4 a4 g4 gs4 a4 fs4 e4 b4 gs4 g4 f4 bb4 g4 gs4 fs4 a4 f4 bb4 gs4 g4 bb4 f4 eb4 c5 fs4 a4 g4 gs4 a4 fs4 e4 b4 g4 gs4 fs4 a4 gs4 g4 f4 bb4 a4 fs4 e4 b4 fs4 a4 g4 gs4 e4 b4 a4 fs4 b4 e4 d4 cs5 gs4 g4 f4 bb4 g4 gs4 fs4 a4 f4 bb4 gs4 g4 bb4 f4 eb4 c5 g4 gs4 fs4 a4 gs4 g4 f4 bb4 fs4 a4 g4 gs4 a4 fs4 e4 b4 f4 bb4 gs4 g4)) (setf chord-intervals '(3 1 2 2)) (make-omn :length lengths :pitch (loop for i in (append (list 0) (cumulative-sums (loop for k in lengths collect (/ k 1/16)))) append (chordize (interval-to-pitch chord-intervals :start (nth i pitches)))))
- Help with combining lists
-
Help with combining lists
like that? (setf lengths '(1/2 1/16 7/16 1/8 3/8 3/16 5/16 1/4 1/4 5/16 3/16)) (setf pitches '(g4 gs4 fs4 a4 gs4 g4 f4 bb4 fs4 a4 g4 gs4 a4 fs4 e4 b4 gs4 g4 f4 bb4 g4 gs4 fs4 a4 f4 bb4 gs4 g4 bb4 f4 eb4 c5 fs4 a4 g4 gs4 a4 fs4 e4 b4 g4 gs4 fs4 a4 gs4 g4 f4 bb4 a4 fs4 e4 b4 fs4 a4 g4 gs4 e4 b4 a4 fs4 b4 e4 d4 cs5 gs4 g4 f4 bb4 g4 gs4 fs4 a4 f4 bb4 gs4 g4 bb4 f4 eb4 c5 g4 gs4 fs4 a4 gs4 g4 f4 bb4 fs4 a4 g4 gs4 a4 fs4 e4 b4 f4 bb4 gs4 g4)) ;;; get the pitches (loop for i in (append (list 0) (cumulative-sums (loop for k in lengths collect (/ k 1/16)))) collect (nth i pitches)) ;;; a function which generates OMN-format (defun superimpose (lengths pitches) (make-omn :length lengths :pitch (loop for i in (append (list 0) (cumulative-sums (loop for k in lengths collect (/ k 1/16)))) collect (nth i pitches)))) ;;; evaluate -> OMN output (superimpose '(1/2 1/16 7/16 1/8 3/8 3/16 5/16 1/4 1/4 5/16 3/16) '(g4 gs4 fs4 a4 gs4 g4 f4 bb4 fs4 a4 g4 gs4 a4 fs4 e4 b4 gs4 g4 f4 bb4 g4 gs4 fs4 a4 f4 bb4 gs4 g4 bb4 f4 eb4 c5 fs4 a4 g4 gs4 a4 fs4 e4 b4 g4 gs4 fs4 a4 gs4 g4 f4 bb4 a4 fs4 e4 b4 fs4 a4 g4 gs4 e4 b4 a4 fs4 b4 e4 d4 cs5 gs4 g4 f4 bb4 g4 gs4 fs4 a4 f4 bb4 gs4 g4 bb4 f4 eb4 c5 g4 gs4 fs4 a4 gs4 g4 f4 bb4 fs4 a4 g4 gs4 a4 fs4 e4 b4 f4 bb4 gs4 g4))
- Help with Processing Live Weather Data in Opusmodus
-
play with a specific delay
i would only need the "FUNCTION" who starts the midi-play and the function which EVALUATEs (quasi the function behind the short-cuts) thanx
-
play with a specific delay
question (from a non-programmer): is there a possibility (a way) to evaluate and/or start-to-play with a delay (of x-seconds) in opusmodus/lisp? would be interesting in the context of using POLYTEMPO NETWORK http://polytempo.zhdk.ch (virtual conductor) and LIVE-evaluation/play of an algorithm (and playing it live by an e-player) on/with a specific (delay-)time. could be something like: "do evaluate algorithm" "do play it in 21.543 seconds" any ideas or solutions? thanx for help andré
-
length-to-decimal / length-to-sec
two functions i needed for working with POLYTEMPO-NETWORK http://philippekocher.ch/#109 http://polytempo.zhdk.ch greetings andré (defun length-to-decimal (alist &key (sum nil)) (let ((list (loop for i in (omn :length alist) collect (float (* i 4))))) (if (equal sum t) (sum list) list))) ;;; result: q = 1 / h. = 3 ...etc... (length-to-decimal '(h. h. 3q 5e 3h)) => (3.0 3.0 0.33333334 0.1 0.6666667) (length-to-decimal '(h. h. 3q 5e 3h) :sum t) => 7.1 (defun length-to-sec (alist tempo &key (sum nil)) (let ((list (loop for i in (omn :length alist) collect (* (/ 60 tempo) (float (* i 4)))))) (if (equal sum t) (sum list) list))) (length-to-sec '(h. h. 3q 5e 3h) 60) => (3.0 3.0 0.33333334 0.1 0.6666667) (length-to-sec '(h. h. 3q 5e 3h) 51) => (3.5294118 3.5294118 0.3921569 0.11764707 0.7843138) (length-to-sec '(h. h. 3q 5e 3h) 51 :sum t) => 8.3529415
-
merge-voices on bar/beat
"I changed your keyword arguments to plain arguments, because in my code I retain keyword arguments for named optional arguments, but the arguments of this function are not optional (there is no default value)." sometimes i'm using keyword arguments for "better understandig"/legibility/overview of the function. but i see it's not "state of the art", thanks for the hint! :-)
- merge-voices on bar/beat
- little stupid bot
-
Out-of-the-box algorithms
hi wim, thank you for the link... also interesting are "non-trivial machines" (heinz von förster / radical constructivism): http://www.cybsoc.org/heinz.htm greetings andré