Jump to content

torstenanders

Members
  • Posts

    496
  • Joined

  • Last visited

Everything posted by torstenanders

  1. 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!
  2. >> 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
  3. 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
  4. 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
  5. 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
  6. >> 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
  7. Do you mean as an option for the function length-divide? That would be great, but my preferred solution would be to have some extra function complementing gen-swallow for added notes -- which then could be called within functions like length-divide -- because that would be a generic solution for all sorts of functions that somehow add notes. The slightly tricky bit would perhaps be for the function to notice which are the new notes, so it should likely get as an input both the original material and the material with the added notes to find out... I would be happy to help sketching such a function... One approach might also be if functions adding notes would somehow mark such notes with some custom articulation only used for that purpose, but that would only work for full OMN results, not single parameters (e.g., length-divide supports single length values). An alternative idea would be for functions adding notes to simply specify the positions in the resulting list that they added (with some special notation for nested lists). Anyway, if it would be much more simply to refactor only length-divide and friends, that would be welcome too...
  8. The function LENGTH-DIVIDE and friends are a useful device for introducing some rhythmic variation to some material. However, when the processed sequence is a full OMN expression (see example below), then the added notes cause all other parameters to shift forward (additional parameters are added at the end by looping). For introducing only a slight variation to some existing material (e.g., motif) these functions are therefore not so useful, because this shift of all parameters to basically "fill" the new added notes with pitches etc. greatly change the varied material for a listener. (length-divide 1 2 '(q f3 leg+m1 q ab3 leg e c4 leg bb3 leg ab3 leg g3)) Basically, this is the opposite situation of the situation addressed by swallowing. Swallowing (e.g., with GEN-SWALLOW and the swallow argument of many other functions) avoids the shift of parameters like pitch etc. that would result from removing notes and turning them into rests. For addressing the situation above properly we would need something like the opposite of swallowing, some way to fill in parameters like pitch etc. for new notes to avoid shifting existing notes. I hope my explanation makes sense and you can see why something like the opposite of swallowing would be useful for functions that add notes to some input material. Now, the tricky question is of course, what parameters (pitch etc.) should be added in such cases. Musically useful and common in the classical literature would be, e.g., repeating the parameters (pitch etc.) of the predecessor note (though that might be a bit too simplistic and annoying at times) or somehow interpolating some pitch gap between the previous and next note with a little scale or arpeggio and only repeating the other parameters like articulations (resulting in some variation that is likely most similar to the input material, so it would be good to have that as an option). If the pitch interval between the two original notes is too small to add some pitch in between for the new now (or as an option in general for variety), it would also be good to add some ornamentation (e.g., using PITCH-ORNAMENT), but for a close similarity between the original material and the variation it would be best as an option to apply such ornamentation only to the newly added notes, not all notes. Of course, other options could also be useful for variations that vary the input material a bit more strongly, e.g., some random pitch for the new notes within certain interval bounds. Does some function that kind of is the opposite of GEN-SWALLOW in that it adds parameters like pitches for subdivided rhythmic values (to avoid the shifting) sound like a good idea? The idea with the interpolation of gaps could be implemented by turning the original duration values and pitches into some envelope and then reading that envelope with the new rhythmic values. So, that is rather strait forward. However, that would not allow for some ornamentation, because such algorithm would not recognise which notes are new that should be ornamented. Any other idea perhaps? Thanks!
  9. Thanks for coming back. Here is a little demo example snippet. This example shows a very simple motif and its repetition. I would like to annotate some motif label (I will use such labels also for segmenting parts for further processing -- that works fine). (add-text-attributes ;; motif start signs '(m1 "m1") '(m2 "m2") '(m3 "m3") '(m4 "m4") '(m5 "m5") '(m6 "m6") '(m7 "m7") '(m8 "m8") '(m9 "m9") '(m10 "m10") ) '(q c4 m1+leg d4 q c4 m1+leg d4) By contrast, the attribute num1 behaves differently. '(q c4 num1+leg d4 q c4 num1+leg d4) I would like to be able to define custom text-attributes that behave like num1 and friends. Thanks again! (If I am the only one who wants such a feature this does not need to have high priority :)
  10. Some attributes are sticky (they do not need to be repeated to maintain being set, and when they are repeated they are not shown again in the score) -- while others are not. For example, the articulation pizz is sticky, while stacc is not. It seems that add-text-attributes declares only sticky attributes. Is it perhaps possible to also have custom non-sticky attributes? For example, want to annotate certain motif or phrase names, and if I repeat the same motif the text label is not shown again. Just in case this is already possible... Thank you! Best, Torsten
  11. Ah, it is very useful to have all such changes collected in one place.
  12. Ah, renaming is easy. I seemingly like that function, had to replace it 7 times
  13. Has the function find-ambitus perhaps be renamed or otherwise be refactored? I cannot find it anymore, but some of my code depends on it. I seems it can be reproduced with possibly new function get-ambitus, but as I do not have the doc of find-ambitus with its defaults, but because I do not have the doc of find-ambitus anymore, I am not quite sure. Thank you! Best, Torsten
  14. Dear all, After updating to a recent Opusmodus version 1.3, I ran into some errors when loading code that had been loaded and compiled before, e.g., quicklisp, quicklisp libraries, swank (the interface that allows using Emacs Slime with Opusmodus), and my own Lisp libraries. The errors I saw were rather cryptic, like the following: Error: The value "CL" is not of the expected type list. While executing: (:internal ccl::operation-on-all-specs ccl::%define-package), in process Listener-1(7). After exchanges with Janusz (thanks a lot for your help!) I learnt that the underlying Common Lisp version of Opusmodus had been upgraded to CCL version 1.12, and the format of compiled files (fasl files or dx64fsl files) of this version had changed. So, in case you run into similar problems, these can be fixed simply by deleting all previously compiled files (which Lisp stores if they do not change to speed up the load process), so that the Lisp compiler has to compile them again. In the folder ~/.cache/common-lisp just delete any folders starting with ccl-, so that all compiled files in this directory are compiled again. Best, Torsten
  15. > 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. Cluster engine implements the constraint solver, and many functions for applying user-defined rules to various score contexts in a flexible way (e.g., consecutive notes in certain voices, simultaneous notes across voices at certain metric positions etc). https://github.com/tanders/cluster-engine Cluster rules provides a collection of ready-made rules for the cluster engine library. https://github.com/tanders/cluster-rules Both libraries were initially developed for PWGL, but we ported them to plain Common Lisp to make them usable, e.g., in Opusmodus (where I already used both) and the Max<->Lisp interface I just mentioned in other message. There are some demo/test examples that come with the library (https://github.com/tanders/cluster-rules/blob/master/tests/first-tests.lisp). More extensive documentation (tutorials) are available with the original PWGL versions of the libraries. Some code to smoothly interface the Cluster Library with Opusmodus is part of my tot library (e.g. in the file https://github.com/tanders/tot/blob/master/sources/constraints.lisp). For example, there are means to transform Cluster Library scores into Opusmodus scores (actually, my variant of it, see the docs) and some more complex functions that could be seen as example use cases. For example, the function revise-score-harmonically, expects an existing score that you might create with whatever Opusmodus methods, and some underlying harmony definitions, and that re-harmonises the score accordingly, taking some counterpoint rules etc. into account. I hope the available doc of these packages helps (of which there is also some HTML version online). I cannot provide any more help at this stage, as I am currently extremely busy in my new job... Best, Torsten
  16. Here are some links to another project working on a bridge between Max and Common Lisp. They are calling SBCL in the background using the shell interface of Max, if I recall correctly. The project is not yet very mature, but they have several OpenMusic/PWGL libraries running with a Max interface for pedagogic purposes. LISP in Max: Exploratory Computer-Aided Composition in Real-Time QUOD.LIB.UMICH.EDU MOZ’Lib | bach WWW.BACHPROJECT.NET MOZ’Lib is a set of pedagogical tools designed to explore, at the same time: musical writing, creation and computer programming. It is currently developed by two composers based in Paris, Julien Vi… It is tricky to get recent sources of this work online. If you are interested, I suggest you best contact the developers directly, e.g., Julien Vincenot Bio | Julien Vincenot JULIENVINCENOT.COM Say hello from me Best, Torsten
  17. > Sometimes is interesting for hearing snippets with different sounds without having to compile the entire score My Opmo score data structure already allows for that, though you always have to render snippets with an explicit function call, as we cannot define custom shortcuts so far. It is part of my tools at https://github.com/tanders/tot. Check out the function preview-score (https://tanders.github.io/tot/sources/score.html#_g232191). Various other functions allow to transform polyphonic score snippets for one or more instruments in various ways. Best, Torsten
  18. FYI, the changes I proposed are meanwhile merged into the repository at https://github.com/ormf/cm, so you can directly load the Common Music version shared there into Opusmodus 1.3 again. Best, Torsten
  19. I should add that all I fixed was that the full Common Music can be loaded again into Opusmodus 1.3. However, Common Music does not "see" CLM and the interface to it is broken, because CLM is now seemingly defined in another package. However, if anyone wants to use CM with CLM you can load it into a Lisp image without Opusmodus. Best, Torsten
  20. Common Music (CM) is another interesting composition system (http://commonmusic.sourceforge.net), and a recent revision of the old CM version 2 (https://github.com/ormf/cm), which was still implemented in Common Lisp (in contrast to later versions defined in Scheme) can be loaded into and used alongside Opusmodus 1.2 without problems. This was possible primarily due to a largely revised load mechanism of the old CM sources. With the new Opusmodus 1.3 this is not possible any more. It seems the problem is caused by the fact that :CLM (and a number of variants) are still added to *features*, but there is no CLM package anymore. I cannot see the Opusmodus sources, but I assume that all CLM definitions have been added directly to the Opusmodus package. Anyway, due to the present feature CM assumes that CLM is there, but then cannot find its package. Anyway, I found a way around (by changing the relevant feature expressions from #-clm into #-(and clm (not opusmodus)) and will try to have that included in the relevant CM sources at https://github.com/ormf/cm Best, Torsten
  21. EDIT: I fixed the problem by updating the Lisp side of SLIME manually, as the SLIME version in Quicklisp is quite old (20150709). Best, Torsten
  22. Opusmodus 1.2 can be used from within the Emacs editor as well (see the post at the link below for details). For me as a programmer having additionally access to the Emacs Lisp IDE SLIME is greatly preferable due to various advanced features provided by Slime when compared with the more easy-to-use native IDE of Opusmodus. For more information on SLIME see its website: https://common-lisp.net/project/slime Unfortunately, the SLIME link is seemingly broken in Opusmodus 1.3, which I just started for the first time. For those who have no SLIME installed (but have Quicklisp set up), SLIME can be installed with the following command. (ql:quickload "quicklisp-slime-helper") Unfortunately, this results now in an error. To load "quicklisp-slime-helper": Load 1 ASDF system: quicklisp-slime-helper ; Loading "quicklisp-slime-helper" .. > Error: Undefined function asdf/interface::operation-forced called with arguments (#<load-op>) . > While executing: #<standard-method asdf/action:perform (asdf/lisp-action:load-op swank-loader::swank-loader-file)>, in process Listener-2(9). > Type cmd-/ to continue, cmd-. to abort, cmd-\ for a list of available restarts. > If continued: Retry applying asdf/interface::operation-forced to (#<load-op>). > Type :? for other options. I already had SLIME installed, but simply running it does not work either and results in the same error. (cl-user::start-swank) ? To load "swank": Load 1 ASDF system: swank ; Loading "swank" . > Error: Undefined function asdf/interface::operation-forced called with arguments (#<load-op>) . > While executing: #<standard-method asdf/action:perform (asdf/lisp-action:load-op swank-loader::swank-loader-file)>, in process Listener-2(9). > Type cmd-/ to continue, cmd-. to abort, cmd-\ for a list of available restarts. > If continued: Retry applying asdf/interface::operation-forced to (#<load-op>). > Type :? for other options. Any help? Thanks a lot! Best, Torsten
  23. Do you perhaps mean the following? Reina, R. (2016) Applying Karnatic Rhythmical Techniques to Western Music. Routledge. https://books.google.co.uk/books?id=4RSrCwAAQBAJ&amp;printsec=frontcover#v=onepage&amp;q&amp;f=false Online material http://www.rafaelreina.org/book-online-material.html Related course http://www.contemporary-music-through-non-western-techniques.com Apologies for my late response. Best, Torsten
×
×
  • Create New...

Important Information

Terms of Use Privacy Policy