-
Posts
798 -
Joined
-
Last visited
Content Type
Forums
Events
Store
Video Gallery
Everything posted by AM
-
you could add if you like, but perhaps... CODE it better! and, perhaps it's possible for you to make it working with CHORDS? this sorting-thing could be also used (if you pick single generations) for producing "variants" of a motif - with more or less difference from/to an original. - i have some more plans - based on musical ideas - for SORTING functions. when it's coded i'll send it to you at "SOURCE CODE" - so you can have a look what is interesting for you. i'd like to work also a bit on MORPH-things (how to "morph" a gestalt into another).
-
i solved the problems. here is a workspace/files to experiment with SORTING ALGORITHMS thanx to torsten and philippe! greetings andré functions.opmo abstract examples.opmo sound examples.opmo sorting algorithms.opmows
-
for a musical research project where i work with the sorting processes of different sorting algorithms (bubble-sort, heap-sort ...), i have to program such algorithms myself. the ide is that not only the end result of the algorithm is visible but also the constant changes (the mechansim). here the first: bubble-sort. very simple and inelegant programmed - but the thing i need to have :-) bubble-sort: https://en.wikipedia.org/wiki/Bubble_sort have a look to different sorting algorithms: greetings andré ;;; bubble-sort -> with all GEN's to see the process of sorting ;;; end-test "until (equal (sort-asc alist) list)" very uncommon (and strange), ;;; but most simple-stupid test to check the end, only okay for this kind of idea ("watching the process not the endresult") (defun bubble-sort (seq) (let ((alist)) (progn (setf alist (cond ((pitchp (car seq)) (pitch-to-midi seq)) ((lengthp (car seq)) (omn :length seq)) (t seq))) (setf alist (loop until (equal (sort-asc alist) list) with list = alist append (loop for i from 0 to (- (length list) 2) for j from 1 to (- (length list) 1) when (> (nth i list) (nth j list)) collect (setf list (position-swap (list j i) list)) else do (setf list list)))) (cond ((pitchp (car seq)) (midi-to-pitch alist)) (t alist))))) (bubble-sort (rnd-order '(c5 e4 g3 b7))) (bubble-sort (rnd-order '(t s e q h w))) (bubble-sort '(1 6 334 2 6 4 111))
-
great... but unfortunately, i'm looking for a whole range of different sorting algorithms - which are working by steps...
-
thanks janusz, what kind of SORTING ALGORITHM is GEN-MORPH using? greetings andré p.s. here some different algorithms in LISP but without "generation-output" https://gist.github.com/llibra/2948765
-
hm, but isn't it replacing (rnd), and not sorting? would like to code exactly something like this this: 15 Sorting Algorithms in 6 Minutes ...to SHOW the process of sorting algorithms....
-
hi all i'm looking for different SORTING ALGORITHMS in LISP - no problem to find (different) in the WWW... but: i would like to have as OUTPUT-result ALL generations of the SORTING-process and not only the LAST one - i'm interested in the PROCESS!! thanks for some help or any idea? (for once i do not want to code it myself :-)) greetings andré
-
great! merry christmas
-
it was necessary to re-organize "OMN with ties" by "omn-merge-ties" first... and find a solution if staccato-length = length ... added 2 minutes later you're welcome... it's a bit like "BRAINFOOD" solving such things... but TORSTEN is the "code-master" for the complicated things!! so, i have to compose now, the real hard work.
-
the solution... (defun length-staccato (n alist) (let ((newlengths) (new-omn (omn-merge-ties (flatten alist))) (time-sign (get-time-signature alist))) (progn (setf newlengths (loop for i in (omn :length new-omn) when (> i 0) append (if (= n i) (list i) (list n (* -1 (abs (- i n))))) else collect i)) (if (omn-formp alist) (omn-to-time-signature (make-omn :length newlengths :pitch (omn :pitch new-omn) :velocity (omn :velocity new-omn) :articulation (omn :articulation new-omn)) time-sign) newlengths)))) (length-staccato 1/16 '(q -q q q)) (length-staccato 1/16 '(q e4 mp q tasto q -q q q)) (length-staccato 1/16 '((e. c4 eb4 fs4 a4 tie) (s a4 e. cs4 e4 g4 e bb4 tie) (e bb4 e. d4 f4 gs4 s b4)))
-
dear julio i don't know if there is a solution in the om-library... coded quickly one for your problem... the basic-rhythms (denominator) should stay constant like in your examples, then it works... first value has to be your "stacc-length", second your omn-list or a length-list, have a look to the example... greetings andré (defun length-staccato (n alist) (let ((newlengths (loop for i in (omn :length alist) when (> i 0) append (list n (* -1 (abs (- i n)))) else collect i))) (if (omn-formp alist) (make-omn :length newlengths :pitch (omn :pitch alist) :velocity (omn :velocity alist) :articulation (omn :articulation alist)) newlengths))) (length-staccato 1/16 '(q e4 mp q tasto q -q q q))
-
Multiple/Simultaneous Voices, Each With Different BPM's?
AM replied to loopyc's topic in Support & Troubleshooting
polytempo-discussion in OM (years ago) https://opusmodus.com/forums/topic/353-how-to-write-a-polytempo-score/?tab=comments#comment-910 --- technology for live realisation (how to conduct it) by real musicians -> by polytempo-network: https://www.facebook.com/Philippe-Kocher-Composer-31442199213/ http://philippekocher.ch/#109 http://polytempo.zhdk.ch i used this technology already for 2 pieces... also for my next work. greetings andré- 8 replies
-
- polytempo
- mixed simultaneous tempos
-
(and 1 more)
Tagged with:
-
[SOLVED] Midi In Collect (now Opusmodus have MIDI input)
AM replied to JulioHerrlein's topic in Suggestions & Ideas
to wishlist: xml-import -
thanks, janusz, for this great TUTORIAL GUIDE! https://opusmodus.com/forums/tutorials/tutorial-guide/
-
i didn't find a OM-library-solution for this kind of thing, so i coded it... if you want to REPLACE the articulation of some specific pitches. perhaps all 'd4 sould be PONTE... you could use this. it was necessary to code it like that, because otherwise you get in trouble with the empty parameter-slots... should work fine greetings andré ;;; SUBFUNCTIONS (defun eliminate-nil (alist) (loop for i in alist when (not (null i)) collect i)) (defun complete-event-slots (omn-list) (let ((omn-art (omn :articulation (single-events (flatten omn-list))))) (single-events (omn-replace :articulation (flatten (eliminate-nil (loop for i in omn-art for cnt = 0 then (incf cnt) when (equal (car i) '-) collect (nth (1- cnt) omn-art) else collect i))) omn-list)))) ;(complete-event-slots '(5q a4 ff pizz 5q e3 -e 5q a4 f)) ;;; MAIN FUNCTION (defun replace-articulation-of-a-pitch (omn-list &key pitches articulation (chance 1.0)) (loop for i in (complete-event-slots (flatten omn-list)) when (and (member (car (omn :pitch i)) pitches) (prob? chance)) append (omn-component-replace i (list articulation)) else append i)) ;;; EXAMPLE (replace-articulation-of-a-pitch '(5q a4 ff pizz 5q e3 p -q 5q d4 pizz) :pitches '(a4 d4) :articulation 'ponte :chance 1.0) -> (5q a4 ff ponte 5q e3 p pizz -q 5q d4 p ponte)
-
function for (string-)harmonics / flagolets?
AM replied to AM's topic in User Extensions Source Code
okay, but the "evaluation"-process (perhaps transpose note 2 octaves down and add pitch in a disctance of a fourth) must/could be done in LISP!? -
hi all does anybody already coded a FUNCTION to replace string-pitches by natural or artificial harmonics? is the specific notehead in OM (for the artificials)? would/could be very practical... perhaps if you have fast phrases in a large ambitus... the function - if it would be very well coded - could search for the nearest/closest fingering... greetings andré
-
yes, i know - i love to code a lot of things myself, and at the moment i'm not very virtuous in it. but I have found a solution - without rebuilding my big programs. with (pprint-last-score) i can read and save the OMN, after evaluating and exporting xml/midi. so you were right, janusz, the solution was in the SYSTEM FUNCTIONS thanx for help - torsten, stéphane & janusz
-
thank you, torsten - the problem is, that i'm working with my own random/pick-functions which don't work with SEED - so, that's my fault/problem
-
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)
AM replied to JulioHerrlein's topic in Suggestions & Ideas
very interested in version 2.0 - features/release? -
code Infinity-series applied to scales/modes
AM replied to BrianCope's topic in Support & Troubleshooting
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!- 20 replies
-
- inifity-series
- scales
-
(and 1 more)
Tagged with:
-
code Infinity-series applied to scales/modes
AM replied to BrianCope's topic in Support & Troubleshooting
janusz, is this possible directly via "infinity-series"? greetings andré- 20 replies
-
- inifity-series
- scales
-
(and 1 more)
Tagged with:
-
code Infinity-series applied to scales/modes
AM replied to BrianCope's topic in Support & Troubleshooting
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))- 20 replies
-
- inifity-series
- scales
-
(and 1 more)
Tagged with:
-
code Infinity-series applied to scales/modes
AM replied to BrianCope's topic in Support & Troubleshooting
i will write you a "merged"-function, takes not a lot of time, then it looks smarter :-) do you know how to use USER LIBRARY? very usefull - take a look... then you could import and use it like an ordinary OPMO-function- 20 replies
-
- inifity-series
- scales
-
(and 1 more)
Tagged with: