Jump to content

Rangarajan

Members
  • Posts

    222
  • Joined

  • Last visited

Everything posted by Rangarajan

  1. Perfect! Have a great time at Frankfurt. -Rangarajan
  2. I notice that OM has a large set of functions related to '12 Tone Row'. I am just getting started on this, and have watched a couple of youtube videos and read a few articles. I am sure there is a huge body of expertise within users of OM. I would appreciate any suggestions and help to learn about this topic. I am particularly looking for "good" music examples that demonstrates the application of this concept. Regards, Rangarajan
  3. Hi, In my blog post today, I have attempted to implement a simple technique for generating melody to layer on top of a chord progression. To make the experiment more appealing, I connected OM to Ableton Live, then recorded the session and exported the song to a WAV file. Be warned: I am a newbie when it comes to music, so if you find anything silly, please forgive me and correct me! Regards, Rangarajan
  4. it is common to represent chord degrees starting from 1, not 0. For instance, a valid chord progression degree sequence is '(1 2 5 6 3 5 6 1). In such cases, in order to get the corresponding chords, the function harmonic-progression is quite useful. However, this function assumes the chord degrees to be zero-based, so we have to write like this: (harmonic-progression (integer-transpose -1 '(1 2 5 6 3 5 6 1)) '(c4 major)) For example, see SB's reply in: I have also been using it like this in some of my code. Nothing wrong with this, but since this is likely to be a frequently occurring pattern, I feel it might be better to include an optional keyword argument to the function to mention the base to use: (harmonic-progression '(1 2 5 6 3 5 6 1) '(c4 major) :base 1) Or, of course, we can change the current behaviour to be 1-based instead of 0-based (if it doesn't affect existing code). Regards, Rangarajan
  5. Rangarajan

    omn-test?

    Sure, take your time. -Rangarajan
  6. Rangarajan

    omn-test?

    Not documented? -Rangarajan
  7. Thanks. Not much free material available? -Rangarajan
  8. Hi, I stumbled upon this term while reading one of the built-in function documentations. An interesting earlier post has elaborate Lisp code for this. However, before delving into the code, I wish to learn about the actual model. Where can I find more information about it? A google search was not very helpful. Thanks, Rangarajan
  9. André, Quite valid points I think. I believe good tools/environments must provide multiple layers of usability. For the beginner, it is easy to experiment with basic concepts if the tool provides "canned" functionality. Next level is to be able to customise the "canned" functionality by tweaking some parameters. Ultimately, for the expert,the tool must give enough power to express his creativity, by delving deep into the system. Finally, as I have expressed before, I would love to see a series of good books on Opusmodus, aimed at beginners and advanced practitioners! I am still having trouble understanding some of the aspects of def-score (just one of the many challenges). I am willing to toil till I get the concepts right! - Rangarajan
  10. Lasse, I understand the challenges you are facing: "..end up with tons of ideas but have to struggle a lot to finish anything." This is not unusual in an environment like OM where you have the flexibility of doing whatever you want through programming. Given that most musicians have comparatively less exposure to programming, expressing their musical ideas can be a bit of an uphill task. The good news is that Lisp is an extremely "malleable" programming language (some call it "programmable programming language") and it permits fascinating levels of freedom of expression. You can easily build higher levels of abstraction to suit your convenience of expression. If you take OM, you will find "foundational primitives" that operate at a fairly low level, for example, gen-sine, vector-map, permute, etc. There is also a set of "compositional primitives" that operate at a higher level, for example, def-score, do-time-line, etc. I think as OM evolves, it will hopefully have more compositional primitives that allow musicians (like you) to glue together different ideas and compose music quickly, instead of operating at "foundational primitives" level. If you are an advanced Lisp programmer, you can even roll out your own DSL (domain specific language) on top of Lisp inside OM! Maybe Janusz and his brilliant team are listening? Hope I don't sound crazy! Regards, Rangarajan
  11. Your implementation of permute is very nice. I looked at a few implementations on the net, but they do not handle duplicate elements correctly, whereas your implementation seems correct. I would like to propose two enhancements to this function: 1) Sometimes, I might not require all permutations of a list, but only some N, where N < the maximum possible size. For example, with 4 distinct elements, 24 is the max possible, but I might just require 6. To handle this case, we can have a keyword argument to limit the size. (permute '( 1 2 3 4) :limit 6) => Returns only 6 elements, not 24. Order is not guaranteed. 2) This is a bit tricky. Instead of restricting the number of elements explicitly as in (1), I might want to filter the elements based on some constraint. Here is a scenario: (constrained-permute '(1 2 3 4) #'(lambda (e) (if (< (first e) (second e)) e nil))) This will generate only those sequences where the first element of the list is less than the second element (just a hypothetical example). Here is one way to implement this: (defun constrained-permute (alist constraint) (filter-remove nil (mapcar constraint (permute alist)))) The problem with this is it is costly. It filters after generation. It will be better to apply the filter as part of the generation itself. To support this, we can add another keyword argument to permute: (permute '(1 2 3 4) :filter #'(lambda (e) (if (< (first e) (second e)) e nil))) Of course, we can also specify the limit if we want: (permute '(1 2 3 4) :limit 6 :filter #'(lambda (e) (if (< (first e) (second e)) e nil))) Do you think this makes sense? Regards, Rangarajan
  12. The documentation of pitch-melodize says that when it is called with :type :divide, it will preserve the original duration. It works correctly in the following case: (pitch-melodize '(h. c4e4g4 q d4) :type :divide) => (q c4 e4 g4 d4) But what about this case: (pitch-melodize '(h. c4e4g4 -q) :type :divide) => (q c4 e4 g4) You can see that the last '-q' (rest) has been discarded. This changes the time signature from 4/4 to 3/4, which to me is different from the spec. Is this the intended behaviour? -Rangarajan
  13. SB, Here it is. Can you please check this program? I tried and it seems to work here. -Rangarajan Create Library File From MIDI.opmo
  14. Is there something you want me to do for this? The library file you have shown as example, is it your own file, or is it in the OM system and you are modifying it? If it is a new file you are creating, it should be possible to create this automatically by a function (except that it is not clear how to create the sections and get the score titles). -Rangarajan
  15. Hi SB, Glad it suits your requirements. I am not sure if the serialized score file is compatible with the OM library. If you face any issue let me know. -Rangarajan
  16. SB, Please look at the attached source file. I guess this will meet your requirements (to the extent I have understood). Let me know if you need to make some changes or if you encounter any problem running it. Regards, Rangarajan Midi to score serialization.opmo
  17. SB, It should not be difficult to read many files from a directory. In my example, each MIDI file was read into as a single def-score. How to handle the multiple MIDI files? Do you want a corresponding score for each one of them (in memory) or do you want to serialise them (i.e., write each to a separate file)? if you let me know, I can work on that in my spare time and send the code to you. You can send me an email (ranga@mmsindia.com) if you do not want to use this forum for that purpose. Regards, Rangarajan
  18. Beautiful ideas, thank you. I hope to learn by studying your and others work in OM. Regards, Rangarajan
  19. Thanks, but unless it is useful to others as well, I would not suggest it. Besides, it is easy to get the behaviour I want by wrapping up some condition on filter-first. -Rangarajan
  20. SB, Nice example, thanks. This is a large OM program by any standard. I hope this program was written by hand and not auto-generated :-) I have a few questions for you (and other great composers here): When faced with a composition task, how do you get started? Do you scribble some notations on paper and then refine it iteratively? How many iterations do you normally take? Frankly, I can't even imagine myself writing such code! I am asking these questions to gain an insight into the composer's mind. Coming from a s/w developer background, I am wondering if we can follow some modelling and design principles to propel us forward in this process of creativity. I am also sure there are good Design Patterns hiding in algorithmic composition, waiting to be discovered! Thanks for being an inspiration to people like me!! Regards, Rangarajan
  21. The function filter-first lets us select the first N items from a list (sublists too). The current behaviour is to raise an error when N is greater than the length of the list. For example, it is an error to say: (filter-first 4 '(a b c)) This definitely acceptable behaviour, but I am wondering if it is OK to ask for more than what the list has, in which case it will return only what it can (i.e., based on length of list). In other words, if I say: (filter-first 4 '(a b c)) it will return (a b c) without error. What do you feel? This applies to filter-last also. -Rangarajan
×
×
  • Create New...

Important Information

Terms of Use Privacy Policy