Jump to content

torstenanders

Members
  • Posts

    489
  • Joined

  • Last visited

Everything posted by torstenanders

  1. In case you have abstracts or even papers, that might be relevant to share at this forum, even if they are in Italian (though in case English would be available, that would be even better )
  2. Note that MOZ’Lib seemingly supports arbitrary libraries from the PatchWork / Open Music / PWGL family. Perhaps it is possible to see how they do that to add such functionality to Opusmodus as well? Best, Torsten PS: I was working in a similar direction some time ago, first by porting some library (OM-Tristan) to load directly into a plain Lisp compiler (by replacing all OpusModus dependencies) and that works, but that is a lot of work for each library. I then started to instead port the whole of OpenMusic to ClozureCL, but leaving out all GUI dependencies, but got only half-way with that so far (it is a lot of code ). Of course, if this works already in Julien's library, that would save some work... Unfortunately, I will not be able to take anything like this on in the foreseeable future due to my new job.
  3. Its a great development, but note that it will not work with Opusmodus for multiple reasons, one being that MOZ’Lib depends on SBCL [1], which is called from the shell, and Opusmodus depends on ClozureCL, and I don't think there are plans to make Opusmodus callable from a shell. [1]
  4. > Achim Bornhoeft and I spent some time talking and playing with the Neo-Riemann theory with an outcome of a diagram and a function Thanks for sharing. Do I understand correctly that these transformations always assume triads? Of course, one can always extend the triads afterwards... Best, Torsten
  5. Hi Julio, Could you perhaps share your final setup files for the old VSL instrument library with the community? Thanks! Best, Torsten
  6. Just for the record, when I start Opusmodus without any of my extensions, I run into the same problem. ? (length-divide '(1000 2) '(q ab3 num1+leg c4 leg e ab3 leg g3 leg ab3 num1+leg c4 leg)) length-divide, set: nil ignore: nil section: nil exclude: nil seed: 35424 > Error: The value ab3 is not of the expected type sequence. > While executing: ccl::sequence-type, in process Listener-1(7). > Type cmd-. to abort, cmd-\ for a list of available restarts. > Type :? for other options. 1 >
  7. > You will need to wait for the upgrade. No worries, I already applied a workaround (disabling certain code...). Here is another issue I ran into with length-divide: if the argument ignore is set to either min or max, and all note values are of the same length, then that also causes an error. Now, perhaps that should be expected, but then at least the error message could be more helpful. On the other hand, perhaps it would be preferable in this situation if a warning was printed and the effect of the argument ignore was, well, ignored? (length-divide '(1 4) '(1/8 c4 mf num1+leg 1/8 d4 mf num1+leg 1/8 fs3 mf leg 1/8 gs3 mf) :ignore 'min) Error: The value nil is not of the expected type number. > We have started work on microtonality
  8. Revising some older code of my I noticed that the function length-divide changed its behaviour somewhat and became more likely to cause an error. In a previous version, where the arguments count and divide where given separately, it was possible to set the count to some very high number, say, 1000, simply to mean that all notes the function can split (depending on its other arguments) will be split. Meanwhile, the function have been revised to introduce control over intervals (thank you ), but since then it seems it is not possible anymore to set an arbitrarily high count value anymore. For example, the following code now results in an error. I would prefer the previous behaviour, if only because it is more forgiving and stable. (length-divide '(1000 2) '(q ab3 num1+leg c4 leg e ab3 leg g3 leg ab3 num1+leg c4 leg)) Error: The value ab3 is not of the expected type sequence. In case it helps: my debugger tells me the functions gen-repeat and then maybe-section are called (perhaps within a nested function of length-divide* ?) with an argument sequence bound to ab3 (i.e. a plain pitch), and a call (length ab3) then causes this error. Thank you! Best, Torsten
  9. For a generic solution, you could use some function split-if that expects a Boolean function as argument comparing two consecutive pairs, and always splits a sublist if the Boolean function returns True. I don't have such a Lisp function at hand right now, but of an algorithm idea here is a similar Python function, only that this expects a Boolean function of a single argument only. If you port this function to Lisp, you could then generalise it by checking the number of arguments the given Boolean function expects, and it apply it always to the corresponding consecutive number of elements of xs. def split_if(fun, xs): """ Splits `xs` (list) into sublists based on a test. Starts a new sublist at every element for which Boolean function `fun` returns true. Examples -------- >>> split_if(lambda x: x % 3 == 0, [0, 1, 2, 3, 4, 5]) [[0, 1, 2], [3, 4, 5]] >>> split_if(lambda x: x % 3 == 0, [1, 2, 3, 4, 5, 6, 7]) [[1, 2], [3, 4, 5], [6, 7]] NOTE: Internally, `split_if` skips the first element of `xs`. So, if `fun` is stateful, it should initialise its state using that first element. For an example, see implementation of `format_api.split_into_sections`. """ result_list = [] start = 0 # Collect new list up to x whenever fun(x) == true, but not before first element for index, x in enumerate(xs[1:]): if fun(x): result_list.append(xs[start:index+1]) start = index+1 if start == 0: return [xs] result_list.append(xs[start:]) return result_list Here is another approach as well with a Lisp function from my toolbox expecting a list of positions where to split the list. You could find those positions by iterating over conservative pairs of your list elements with the function positions-if listed below. OK, none of this is a ready made solution, but all the necessary pieces are there I need to head back to work now .... Torsten (defun subseqs (sequence positions &optional end) "Splits `sequence' into a list of subsequences split at `positions'. Each element in `positions' specifies a position at which a new sublist starts. ; (subseqs '(0 1 2 3 4 5 6) '(0 2 4)) => ((0 1) (2 3) (4 5 6)) ; (subseqs '(0 1 2 3 4 5 6) '(2 4 6) 5) => ((2 3) (4)) `positions' are implicitly sorted and positions beyond end are excluded. " (let* ((updated-pos (sort (if end (remove-if #'(lambda (x) (>= x end)) positions) positions) #'<)) (full-pos (append updated-pos (list (if end end (length sequence)))))) (mapcar #'(lambda (start end) (subseq sequence start end)) (butlast full-pos) (rest full-pos)) )) (defun positions-if (predicate sequence &key key (start 0)) "Like the Common Lisp function `position-if', but returns all positions in `sequence' that match `predicate'. ; (positions-if #'oddp '((1) (2) (3) (4)) :key #'car) ; => (0 2)" (labels ((aux (predicate sequence &key key (start 0) accum) (let ((pos (position-if predicate sequence :start start :key key))) (if pos (aux predicate sequence :start (1+ pos) :key key :accum (cons pos accum)) (reverse accum))))) (aux predicate sequence :start start :key key))) #| ;; comparison (position-if #'oddp '((1) (2) (3) (4)) :key #'car) |#
  10. > if you have the article of ERES HOLZ as pdf, would be nice (the link seems to be dead)... See attached. > isn't it - in general - a question about complexity and information? I think it is also a question of memory -- we can only perceive a form if we can remember the form parts (Schönberg talks about comprehensibility/Fasslichkeit) which then allows us to compare etc. Obviously, that is more easy in a visual form, where you can see the whole picture together and move between parts at your own pace. Best, Torsten Holz_2012_Das Wachstumprinzip von L-Systemen in der Musik von Hanspeter Kyburz.pdf
  11. > the GAP is between visual L-systems and acoustic ones Yes, of course, there is a completely different way of perception at play. If you come up with a good answer to that, I would be interested. BTW, if you want some other examples of compositional applications, you might want to have a look at ”Cells” (1993/94) by Hanspeter Kyburz, discussed in the following two publications. Supper, M. (2001) A Few Remarks on Algorithmic Composition. Computer Music Journal. 25 (1), 48–53. Holz, E. (2012) Das Wachstumprinzip von L-Systemen in der Musik von Hanspeter Kyburz. Master’s thesis. Hochschule für Musik Hanns Eisler. Available from: http://www.eresholz.de/de/text/Eres Holz_Ausschnitt aus der Masterarbeit.pdf(Accessed 20 September 2016).
  12. Just a brief follow-up. While Partch's book is obviously available in English, the other authors all wrote in German. More recent Neo-Riemannian theory is often pretty math-heavy, so also somewhat hard to digest for us composers. To get a taste of these harmonic theories in a highly developed form (with dualism throughout, but that is only one facet) delivered by a practicing composers, you might want to have a look at the recent English translation and discussion of Sigfrid Karg-Elert's book Acoustic Determination of Pitch, Chord and Function from 1930. Byrne, D. A. (2018) The Harmonic Theories of Sigfrid Karg-Elert: Acoustics, Function, Transformation, Perception. PhD Thesis thesis. University of Cincinnati. Online available (with a somewhat slow download speed) at https://etd.ohiolink.edu/apexprod/rws_olink/r/1501/10?p10_etd_subid=162928&clear=10 Warning: this is not for the faint of heart Best, Torsten
  13. If you want more control over the L-system generation, have a look at the original documentation of the system L-Lisp, from which Janusz derived the Opusmodus functionality: Erstad, K. A. (2002) L-systems, twining plants, Lisp. Master’s thesis thesis. University of Bergen. [online]. Available from: http://www.vcn.bc.ca/~griffink/lisp_lsystems.pdf Also, the original website: http://www.ii.uib.no/~knute/lsystems/llisp.html Best, Torsten
  14. Are you simply looking for an invert function, e.g., pitch-invert? (pitch-invert '(c4 d4 e4)) => (c4 bb3 gs3) This function inverts (mirrors) around the first pitch by default. If you are looking for retaining the original ambitus, you might want to instead you my function invert-in-ambitus (https://tanders.github.io/tot/sources/pitch.html#_g251910). (invert-in-ambitus '(c4 e4 g4)) => (g4 eb4 c4) BTW, when you are specifically talking about a harmonic context in which you are "mirroring" chords, there exist extensive music theories based on this idea already. The notion of minor chords as the mirror image of major chords, and its implications on harmonic functions (tonic, dominant, subdominant etc.) was in detail explored under the label of dualism by theorists like Hugo Riemann, Arthur von Öttingen and Sigfrid Karg-Elert. They also already generalised this notion for microtonal music. Likely independently of these theorists exploring the notion of dualism, Harry Partch's concept of otonality and utonality is also based on this idea, now firmly in the field of microtonal music. In microtonal harmonic theory I came across this notion also elsewhere (e.g., discussed by the composers and theorists of ekmelic music like Franz Richter Herf, which may have arrived there independently as well. Anyway, this harmonic concept in general is so basic and fundamental that I would not be surprised it would have been studied by the likes of Pythagoras already... Best, Torsten
  15. > but SLEEP is not very precise The Common Lisp standard actually says that the number of seconds specified as arguments for sleep is approximate: > Causes execution to cease and become dormant for approximately the seconds of real time indicated by seconds, whereupon execution is resumed. CLHS: Function SLEEP WWW.LISPWORKS.COM Anyway, it seems that at least on a Mac the imprecision is rather regular, see the following discussion with empirical tests. Time to sleep under different platforms LISP-HUG.LISPWORKS.NARKIVE.COM Anyway, for realtime scheduling in a musical context one needs likely a proper scheduler for that. Best, Torsten
  16. > Do you consider the inconsistency of the integer-to-pitch results a bug? I cannot speak for Janusz, but for me the format of the result makes sense. If there are individual values in the integer pitch list it is assume that the overall result is considered flat and hence sublists are chords. If everything is nested, then sublists are considered bars and the nesting is preserved. Best, Torsten
  17. > That is the main and most important point on the todo list i'm waiting for ! I would also welcome this greatly, but I also understand that it might be tricky to realise when implemented from scratch, as MusicXML is a large standard. This project could become much much smaller when using some library that already has some good MusicXML support. For example, one could use the pretty mature MusicXML import of music21 (http://web.mit.edu/music21/) and then use music21 + Python to generate OMN (e.g., an event list as output by Opusmodus' single-events). I did something similar once, that is rather easy to do and not such a big project. Python libraries can be called from Common Lisp using py4cl (https://github.com/bendudson/py4cl/). I tested py4cl in Opusmodus, it works. For example, all OMN generation could be done in a custom Python module, and py4cl is then used for just calling that. It seems the music21 licence would allow for that (https://github.com/cuthbertLab/music21/blob/master/music21/license.txt). Any Opusmodus user with a little bit of Python knowledge (which is rather easy for a Lisp programmer, see https://norvig.com/python-lisp.html) and some time could to that in principle Best, Torsten
  18. Perhaps – if others would also find such control useful – some checkbox could also be added to the preferences, e.g., under Appearance > Listener. Anyway, only if this is relevant for other users... Thanks again! Best, Torsten
  19. Is there perhaps any way to switch off all those trace prints created by very many Opusmodus functions. Here is an example: I want to get rid of printout(s) before the actual result. OM> (pitch-transpose 2 '(q c4)) pitch-transpose, transpose: 2 ambitus: PIANO section: NIL exclude: NIL (Q D4) These constant traces are problematic for me, because in all those prints I very easily miss printouts that are particularly important (e.g., warnings from some functions). I am aware of the Opusmodus function do-verbose. I would very much like to avoid adding do-verbose to my own functions. On the contrary, I am asking for a way to globally switch off what do-verbose does in other functions, e.g., by some global variable. That should be easy to implement (e.g., in the definition of do-verbose, if that global variable is set to NIL, no printing happens). Besides, if I really want some trace of function calls, this is actually already build-in into Common Lisp in a way that can be switched on and off selectively for any function with trace. BTW: The example shown at HyperSpec (http://clhs.lisp.se/Body/m_tracec.htm) does not quite work as expected in CCL, because CCL cleverly inlines all the recursive calls, but that can also be switched off (see https://trac.clozure.com/ccl/wiki/DebugWithOpenmcl). Besides, CCL offers also an extended version of trace (https://ccl.clozure.com/manual/chapter4.2.html). Further, I usually need traces during debugging, and Common Lisp IDEs usually provide even interactive backtraces (e.g., not only the arguments of functions, but also values of local variables within the lexical scope of functions can be seen, changed, and used in arbitrary test evaluations). I guess that such facilities have been purposefully disabled in Opusmodus, because such power can initially confuse new users. EDIT: basically, what I want to do is ensure that the internal function %do-verbose does not do anything if it is switched off, like so. (defparameter *do-verbose?* T "Enable or disable traces printed by do-verbose.") (defun %do-verbose (<args>) (when *do-verbose?* <put-orig-def-here>)) I cannot add this definition myself because I do not have the original code of this definition, and because the definition of this function is protected and cannot easily be overwritten by users. I should perhaps add that I appreciate that the do-verbose traces can be useful for getting the seed of some function call for "freezing" some result one might like. However, for me this usefulness still does not mean this feature should be switched on all the time. Thanks!
  20. >> While I can create a canon, counterpoint and a fugue myself with a bit of time, it would be much less time-consuming for me if I were able to use existing examples. Is there an existing library of OMN examples of these types of compositions? > I cannot offer ready-made examples, but a constraint-based library with various counterpoint (and also harmony) rules ready-made. Following up my own comments, some entry level introduction to the libraries Cluster Engine and Cluster rules is offered by a video I prepared for my students last autumn. https://www.youtube.com/watch?v=xPXIRmH9rZc&list=PLmbpscTxjn_DrdDXD5v7z0GzQRNKM5VyQ&index=9 This video uses PWGL instead of Openmusic, but you only need to mentally replace PWGL boxes with Lisp functions of the same name to get pretty much the equivalent Opusmusic code. Also, this tutorial only scratches the surface of what can be done with these libraries, but I hope it can give an initial idea how things are approached in these libraries and for going beyond that a relatively easy approach is simply to study the pre-programmed rules in the Cluster Rules library and trying to combine rules for your own purposes. Once you miss a specific rule you would like to have, the library Cluster Engine provides the tools for defining your own rules on a high level of abstraction (specifically, it provides many abstractions that help to easily apply your rule to a specific score context, like the pitches of simultaneous notes of certain parts). This video is the last of a series of introduction-level videos on algorithmic composition with PWGL... https://www.youtube.com/playlist?list=PLmbpscTxjn_DrdDXD5v7z0GzQRNKM5VyQ
  21. Brilliant. Now my most-used Opusmodus shortcuts also work in Emacs. That helps my workflow a lot! Thanks!! Could you perhaps also share some example of one of the Opusmodus keyboard shortcut definitions (e.g., something like OMN Audition). Then I could hopefully use that to define a shortcut for starting playback with my custom score data structure in Opusmodus. It does not matter if that example definition would be complex and you do not need to provide any user-friendly abstraction. Just some example code would help a lot. Thanks again! Best, Torsten
  22. Thanks, but what is the Lisp function, not the shortcut, for stopping playback. I can start playback of the last score with (audition-last-score), how can I stop it Thanks! Best, Torsten
  23. What is the Lisp function for stopping playback (bound to the shortcut cmd-esc)? ... I could never add a custom keyboard shortcut to the Opusmodus text editor Hemlock (and I tried), but I just managed adding keyboard shortcuts and a menu for playing Opusmodus snippets and my polyphonic score format to Emacs (thanks to the fact that scores now can be displayed in a separate window). Only need some key for stopping playback as well. (The main thing I will then miss when using Emacs as the Opusmodus IDE is the close integration of the document, but well, you cannot have everything On the plus side, I have a more stable editor and in particular a very good debugger.) Thanks! Torsten
  24. >> Common Music does not "see" CLM and the interface to it is broken, because CLM is now seemingly defined in another package. > It looks like you don't know how to use CLM in Opusmodus I understand that CLM can be used directly from Opusmodus, but there also exists an interface between Common Music and CLM (I used that already in the 90s...), which is broken in the CLM port to Opusmodus when loading Common Music into it was well. Anyway, I doubt anyone with miss that Best, Torsten
×
×
  • Create New...

Important Information

Terms of Use Privacy Policy