Jump to content

Yuichi Yamamoto

  • Posts

  • Joined

  • Last visited

Everything posted by Yuichi Yamamoto

  1. Hi people, Though I've been using Opusmodus for about 2 years now, and in great love with it, I haven't really had a chance to share my work on the community. But here I have my piano piece vastly written with Opusmodus, and guess what, it's got a cool video, too! Yamaha corporation kindly offered me to use their automated piano for filming, and I think an algorithmic music like this goes very well with it! Yuichi
  2. Thank you for your quick reply. OK, I get it. Would there be a quick alternative way of dividing a desired length into tuplets? I'm trying to define a function which will work like (some-func-name 'd 5) which will return quintuplet of 'd. Any ideas? Yuichi
  3. Hi, I'm playing around with the function gen-tuplet and having some bug / unexpected result. When I evaluate some code like (gen-tuplet 1 1 'm 'n 'w 5) I get which is understandable. But when I give the length-value twice the duration, (gen-tuplet 1 1 'm 'n 'd 5) I get whereas I would expect it to be (2/5 2/5 2/5 2/5 2/5). Is this a bug? Or this is just how it is? Cheers, Yuichi
  4. Hi Ole, I'm not very into Lisp language so this is just a quick and dirty solution but works for the given example. ;;Original Melody (setf melo '(q c4 e d4 e e4 q. f4 e g4 q a4 b4)) ;;Define Function (defun skip-notes(original) (let ((len (omn :length original)) (pitch (omn :pitch original))) (let '(pos (loop for i from 1 to (length len) when (oddp i) collect i)) (let '(new-len (flatten (gen-pause (mclist len) :section pos))) (let '(new-pitch (gen-swallow new-len pitch)) (return-from skip-notes (make-omn :pitch new-pitch :length new-len)) ) ) ) ) ) ;;Use it (skip-notes melo) I think someone can improve this, hopefully. Best wishes, Yuichi
  5. Wait, is microtonal notation already supported on the current version? Or are we only talking about the future implementation? Yuichi
  6. Hi, just a quick question. I don't think it is possible but does Opusmodus possibly have the capability of being used from the command line tools like Terminal? Or alternatively, is there any way one can include the Opusmodus package on a normal CCL environment (not on the Opusmodus IDE)? Just out of curiosity. Best regards, Yuichi
  7. Hi, I'm Yuichi. I don't know if there was anyone else who already did similar things or not, but I would like to share the way I achieved the continuously self-evaluating program. I actually made a video of it and hopefully I can post it here but I'll paste the code down here anyway, too. CODE wrap the whole music with a function named "evalAll (better name should be applied): (defun evalAll () (setf pitch (integer-to-pitch (rnd-row))) (setf len (span pitch '(s))) (setf omn (make-omn :pitch pitch :length len)) (def-score 12-tone (:key-signature 'atonal :time-signature '(4 3) :tempo 120) (inst :omn omn)) (display-musicxml '12-tone) (display-midi '12-tone) (sleep 1.5) (evalAll) ) (evalAll) This is just a tiny fragment of music so I'm not going to discuss the music but you see the difference between this and "live-coding-midi". In each loop it re-evaluates itself: meaning if there is random things, it will get each different results. Note that this is an infinite loop so in order to stop this, you have to press "command" + ",". If you don't like the program to freeze while executing this program, there is a way. Thanks to the developers for adding bordeaux-threads in the recent update, you can have multi-threads in Opusmodus now, so if you just make a thread of this recurrent program alone you won't be bothered to be stopped anymore. And extending this idea will lead you to have one recurrent program running while you can freely change some variables(maybe scales / chords/ instruments/ whatever) and it will be, right-on-time, reflected to the music. I hope this will inspire somebody's imagination. Yuichi recurrent.mp4
  8. Thank you for the reply. (makunbound) seems very useful! But the reason why I brought this topic was because sometimes after working on a project for a long time, trying a lot of things (usually with messy codes ;p), it is very easy to forget what variable / function names I have used before, right? The problem is: For example, let's say there's a project on which I try really hard and finally finished over a night. Maybe I get very satisfied by the result and go to bed happily. But next the morning, the code does not work. Why? Because after struggling with some codes, adding / modifying / deleting things, I sometimes delete (or change the names of) what is necessary for the project. If I initially declare a variable like "motif" and later rename it to "motif-1", (maybe because I created multiple motifs), of course I have to rewrite all of the variable names for the entire project. But due the fact that I'm a normal human, I don't always remember to properly rewrite everything. And when I forget it, does the program give me error messages? No! Because the deleted "motif" is still there in the memory and working. This is precisely why I intentionally close everything once in 30 minutes, just so that I can check that everything is okay, by just doing "evaluate all".
  9. Well, I think "Return To Top Level" is kind of the thing you use when you are stuck in an infinite loop? I meant, for example, when I declare a variable "a" and set it to an integer 100, that "a" is forever going to be stored in the memory as 100, unless I quit the program. Is there an alternative way for clearing the memory?
  10. Hi, quick question: Is there a way to clear all the evaluated variables / functions, or I mean, reset and re-initialize? For now every time I've done something wrong, I quit the whole application and then re-launch it. Would love to know if there is a better way. Yuichi
  11. Sorry to bring this topic back, but it seems that those symbols for the tone names (such as 'c4, 'ds5 etc.) don't get loaded correctly when I include the Opusmodus package? Is it only me? P.S. It happend when I tried to evaluate "vector-to-pitch" or "ambitus" with the arguments of '(c4 c6) and it did not recognize the symbols.
  12. g000001, Thank you so much for your precise information! I was reading through a lot of references about the lisp package thing, but actually what I really wanted to know was how to figure out which package a symbol / function belongs to; so "find-all-symbols" was exactly what I needed. I really appreciate it. Though when I referenced the 'display-musicXML' and 'atonal (symbol), these both belonged to the Opusmodus package itself, but thank you very much to the developers, after updating the app, it all fixed peacefully!
  13. Hi, I'm really in love with Opusmodus and first of all, thank you so much for your great app! Well, though I already enjoy the whole functions and stuff that already exist in the basic Opusmodus, I'm starting to crave for something more advanced: one of such is multi-thread programming. (or is it already supported?) So I looked up through the internet and found the "bordeaux-threads" library(https://common-lisp.net/project/bordeaux-threads/), and I did (ql:quickload "bordeaux-threads") and it loads successfully. At least it prompts just like when I load any other no-problem libraries like Drakma. However, although I DID load the library when I try to use some of the functions from them, it says "undefined function ~" thing. So the loading thing did not go well, I guess. => So here, I changed my plan. There was an article in which someone was wrapping the bordeaux-threads in a "defpackage" and then after an "in-package" use the funcitons of them. And actually this works fine in my computer. But I discovered that inside the package that only contains bordeaux-threads, I cannot use the Opusmodus functions. So I included "Opusmodus" in the package as well. Case closed, I thought. But though now I get most of the Opusmodus-functions working well, there were still some functions and symbols that weren't acknowledged such as "display-musicxml" and "'atonal" (inside a def-score). I'm guessing this is due to the packaging that I probably did not do correctly? For you information, here is the code. –––––––––––––––––––––––––––––––––––––– (require :bordeaux-threads) (defpackage :threads-test-pkg (:use :cl :bordeaux-threads :opusmodus )) (in-package :threads-test-pkg) (progn (format t "# start thread test~%") (let* ((test-counter #'(lambda (thread-identifier-num count interval) (let ((*standard-output* #.*standard-output*)) (format t "## start-thread: ~s~%" thread-identifier-num) (dotimes (i count) (sleep interval) (format t "### thread ~s --- ~s~%" thread-identifier-num i)) (format t "## end-thread: ~s~%" thread-identifier-num)))) (test-thread-alive-p #'(lambda (thread) (let ((*standard-output* #.*standard-output*)) (format t "~a: ~a~%" (thread-name thread) (thread-alive-p thread))))) ;; Make Threads and Start (thd1 (make-thread #'(lambda () (funcall test-counter 1 5 3)) :name "thread 1")) (thd2 (make-thread #'(lambda () (funcall test-counter 2 5 2)) :name "thread 2")) (thd3 (make-thread #'(lambda () (funcall test-counter 3 5 1)) :name "thread 3"))) ;; Check the threads (funcall test-thread-alive-p thd1) (funcall test-thread-alive-p thd2) (funcall test-thread-alive-p thd3) ;; Wait for the threads to end (join-thread thd1) (join-thread thd2) (join-thread thd3) ;; Threads Status (funcall test-thread-alive-p thd1) (funcall test-thread-alive-p thd2) (funcall test-thread-alive-p thd3)) (format t "# end thread test~%")) ;;Things that works (gen-integer 10) (display-midi 'hoge) ;;Things that do not work (display-musicxml 'hoge) 'atonal ;this symbol was somehow not undefined –––––––––––––––––––––––––––––––––––––– I might be doing something way too unnecessary, but please forgive me for all the ignorance. All I want to do is just to get multi-thread capability along with Opusmodus, in order to achieve some real-time programming. Thank you, Yuichi Yogo
  14. Hi, I have a question. When I do (compile-score) for multiple scores at a time I get all of the arguments compiled separately; which means if I try to Audition/Notation/Export them, all I get is the last compiled one only. So how do you combine the compiled scores together?
  • Create New...

Important Information

Terms of Use Privacy Policy