born
-
Posts
82 -
Joined
-
Last visited
Content Type
Forums
Events
Store
Video Gallery
Posts posted by born
-
-
Something like this:
(defparameter durations '(15/16 15/32 1/32 1/32 1/32 61/32 1/32 1/2 1/32 5/32 1/32 13/16 17/32 3/2 9/16 7/16)) (defun length-to-rnd-rest (numb dur-lst) (let* ((llst (- (length dur-lst) 1)) (minnumb (min numb llst)) (posns (sort-asc (rnd-unique minnumb (gen-integer 0 llst))))) (loop for i in dur-lst for j from 0 collect (if (member j posns) (* -1 i) i )))) (length-to-rnd-rest 5 durations)
I get only 4 rests in this example:
(defparameter durations '(15/16 15/32 1/32 1/32 1/32 61/32 1/32 1/2 1/32 5/32 1/32 13/16 17/32 3/2 9/16 7/16)) (length-invert durations :section (rnd-sample 5 (gen-integer 0 (1- (length durations))) :norep t :seed 4)) ;; => (15/16 15/32 1/32 1/32 1/32 61/32 1/32 1/2 -5/32 -13/16 1/32 -9/16 17/32 3/2 -1/32 7/16)
-
Is there a function with which I can change randomly a defined number of lengths in a list to rests?
Thanks, Achim
-
17 hours ago, opmo said:
This is not an error. The documents (pdf) are not really for text copy/past. You never know how pdf behaves.
And if you copy you need to take some care of the code.
I think, they should be usable for copy & paste. Its probably a common use to copy extracts from the documentation for further coding, don't you think?
Achim
-
Hi,
attached is a function I wrote for a piece.
Does anybody have an idea how to extend this with a seed functionality. I have tried a few things but so far without any real success ...
The other thing: It can take quite a while until a possible solution ist found. Does anybody have an idea to improve the calculation speed?
Thanks and best,
Achim
-
Thanks a lot Stephane, that helps. Achim
-
Does anybody know how to merge lengths with same pitches?
(e c4 c4 e. c4 q c4 s c4 e eb4 e. eb4 h eb4 e. eb4 q eb4) => (h. c4 wq eb4)
Thanks for help,
Achim
-
I use this to select different unique modules for Live-Electronics.
Here ist my adapted function:
(defun comb-to-sum (n &key (reps t)) (let* ((nums (gen-integer 1 n)) (x 0) (result (find-unique (sort-asc (flatten-sublist (loop repeat n for i = (combination2 (incf x) nums) collect (loop for c in i if (= (sum c) n) collect c))))))) (if reps result (loop for i in result when (equal (sum (remove-duplicates i)) n) collect i)))) (comb-to-sum 5 :reps nil) ; => ((5) (1 4) (2 3))
-
I would actually need ALL possibilities …
-
Is something like this implemented in OM or has anybody written a function for it?
Input: N = 3 Output: 1 1 1 1 2 3 Input: N = 5 Output: 1 1 1 1 1 1 1 1 2 1 1 3 1 2 2 1 4 2 3 5
see: https://www.geeksforgeeks.org/find-all-combinations-that-adds-upto-given-number-2/
Best, Achim
-
Is this feature still existing?
Achim
-
On 11/12/2017 at 12:41 AM, JulioHerrlein said:
Hello Julio,
could you repost this video. It seems to be offline.
Thanks, Achim
-
Hi all,
has anyone written a function that calculates the total duration of a score (including tempo changes and fermatas) in minutes and seconds?
Achim
-
Hi,
how can I add a Glockenspiel instrument to the GM-Instrument-Set?
Best, Achim
-
-
-
-
Hi everybody,
how can I extract specific measures from voices in a score and merge them to a new voice.
Thanks for help.
Achim
-
5 hours ago, opmo said:
This is correct. any process of pitches will end with:
c, cs d eb, e, f, fs, g gs, a, bb b
In my understanding it should be exactly as notated, not interpreted.
-
40 minutes ago, Stephane Boussuge said:
You need to set :flexible-clef to nil in ps, after it will work.
SB.
I actually would like to HAVE them exported - not to get rid of them ...
-
Merci. I will have a look at it.
Achim
-
Hi,
pitches are only displayed as sharps, bug?
(ps 'gm
:bass (list '((w e1 f1 gb1 e1 f1 gb1 ab1 b1)))
:time-signature '(4 4))Achim
-
Hi,
it seems that the automatically created clefs e.g. from ps are not exported with music-xml. When I open these files in Sibelius the clefs are gone.
Any suggestions how to solve or work around this?
Achim
-
Hi,
how could I automatically split chords for a further piano notation?
Achim
-
Hi,
is there a print function for the midi display?
At the moment I am using "zoom to fit" in fullscreen mode and then make a screenshot but this is a little cumbersome ...
Achim
change randomly lengths to rests
in OMN Lingo
Posted
Sometimes its correct, sometimes not ...
Did you tried it with my seed? What was your result?