-
Posts
15 -
Joined
-
Last visited
Content Type
Forums
Events
Store
Video Gallery
Posts posted by ajf-
-
-
Thank you, I just learned that
-
I'm making a score with 16 instruments. A metronome of drums and whistles (kind of conga rythm...) sounds. It does not sound when instrument count is low. Maybe it's a default MIDI setting?
Note: This happens using:
(live-coding-midi (compile-score 'score))
-
Would anyone know how to disable the "Bells & Whistles" metronome while playing several instruments?
Thank you
-
I saw the update. This is great! I'm very glad I could contribute.
-
"Dominik Šedivý: Serial Composition and Tonality" is mentioned several times in the function examples as further reading. I live in a place where books take 3 - 4 months to get here. Can I buy this book as an ebook?
Thank you
-
Here is a function that converts hertz to midi:
(defun hertz-to-midi (frequency) "Gets the corresponding MIDI value from a Hertz frequency" (round ;; https://en.wikipedia.org/wiki/MIDI_Tuning_Standard#Frequency_values ;; d = 69 + 12*log2(f/440Hz) (+ 69 (* 12 (log (/ frequency 440) 2)))))
This allows two more useful functions to be made:
(defun hertz-to-integer (frequency) "Gets the corresponding pitch integer value from a Hertz frequency" (let ((*standard-output* (make-broadcast-stream))) ; Override function prints (midi-to-integer (hertz-to-midi frequency)))) (defun hertz-to-pitch (frequency) "Gets the corresponding pitch from a Hertz frequency" (midi-to-pitch (hertz-to-midi frequency)))
This allows us to play with the harmonic series ( https://en.wikipedia.org/wiki/Harmonic_series_(music) )
;;; Nth Harmonic (defun n-harmonic-hertz (note n) "Gets the n harmonic of a note as a hertz (Hz) value" ;; n * 440 * 2^( (m - 69) * (1/12) ) (let ((*standard-output* (make-broadcast-stream))) ; Override function prints (* n 440 (expt 2 (* (/ 1 12) (- (pitch-to-midi note) 69)))))) (defun n-harmonic-midi (note n) "Gets the n harmonic of a note as a midi value" (hertz-to-midi (n-harmonic-hertz note n))) (defun n-harmonic-pitch (note n) "Gets the n harmonic of a note as a pitch (tempered) value" (let ((*standard-output* (make-broadcast-stream))) ; Override function prints (midi-to-pitch (n-harmonic-midi note n)))) (defun n-harmonic-integer (note n) "Gets the n harmonic of a note as a pitch (tempered) value" (hertz-to-integer (n-harmonic-hertz note n))) ;;; Harmonic series (defun harmonic-series-pitch (fundamental number) "Gets 'number' amount of superior harmonics for a note as a list as pitches" (loop for i from 1 to number append (list (n-harmonic-pitch fundamental i)))) (defun harmonic-series-midi (fundamental number) "Gets 'number' amount of superior harmonics for a note as a list as MIDI values" (loop for i from 1 to number append (list (n-harmonic-midi fundamental i)))) (defun harmonic-series-hertz (fundamental number) "Gets 'number' amount of superior harmonics for a note as a list as Hertz frequencies" (loop for i from 1 to number append (list (n-harmonic-hertz fundamental i)))) (defun harmonic-series-integer (fundamental number) "Gets 'number' amount of superior harmonics for a note as a list as integer values" (loop for i from 1 to number append (list (n-harmonic-integer fundamental i))))
Examples:
;;; Examples (harmonic-series-hertz 'a4 8) => (440 880 1320 1760 2200 2640 3080 3520) (harmonic-series-midi 'a4 8) => (69 81 88 93 97 100 103 105) (harmonic-series-integer 'a4 8) => (9 21 28 33 37 40 43 45) (harmonic-series-pitch 'a4 8) => (a4 a5 e6 a6 cs7 e7 g7 a7)
-
In all the examples, the score has the instruments readily defined by the programmer:
(def-score (:score-prop score-val ...) (instrument-1 :instrument-prop instrument-val ...) (instrument-2 :instrument-prop instrument-val ...) )
What I have been wondering is can I dynamically create these instruments, allowing for proper reference in :layout afterwards, etc.
For example, if I wanted 10 instruments:
(defun my-generate-instrument ...) ;; something (def-score (:score-prop score-val ...) (loop for i from 1 to 10 collect (my-generate-instrument i)))
Any tips for an scenario like this one?
-
That works perfectly. Thank you!
-
I am really sorry, I really don't want to oblige and your support has been great, but it seems I'm having more trouble. I hope this is not just me being a dummy and it helps in some way:
1- asdf:*central-registry* keeps pointing to /Users/opusmodus. No big deal, I added a setf in ~/.ccl-init.lisp that configures it. Manually downloaded the libraries that are referenced by it (cl-store, alexandria, xmls, cl-ppcre, cl-interval -- no idea about "quantizers").
2- Installing drakma fails at usocket because Opmo can't find the CCL interfaces: https://gist.github.com/ajf-/8229a803a4717d589d59. (probe-file "ccl:") shows "/Applications/" which doesn't seem quite right. (#_getpid) shows more info: https://gist.github.com/ajf-/920d3be32f7e241c1b0d.
I Manually installed ccl through brew install clozure-cl, and I tried to do:
(ccl::replace-base-translation "ccl:" "/usr/local/Cellar/clozure-cl/1.10/libexec/")
But I keep getting Error: Foreign function not found errors with (#_getpid) and (ql:quickload "usocket"). Trying the Apple Store version of CCL (at "/Applications/Clozure CL.app/Contents/Resources/ccl/") did not work either. A custom svn co from http://ccl.clozure.com/download.html did not do the trick either.
3- ~/.ccl-init.lisp doesn't seem to be loading on startup.
I'll keep trying to sort this out tomorrow, but please let me know if there's something I am not doing right here and if there's any way I can help.
Bests,
Alain -
Merci beaucoup! Can't wait to use it.
-
That, at least, doesn't give any errors:
> (unless (find-package "QUICKLISP") (when (probe-file "~/quicklisp/setup.lisp") (load "~/quicklisp/setup"))) nil
What should I do from here?
Thank you!
-
That gives the correct result:
> (user-homedir-pathname) #P"/Users/ajf-/"
Please don't hesitate to ask any sort of information from me to find a solution. I'll be happy to provide with whatever you need.
Thank you
-
Thank you for your ultra quick reply I really appreciate that.
Doing that yields:
> (let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp" "/Users/ajf-/"))) (when (probe-file quicklisp-init) (load quicklisp-init))) ; Warning: loading dependencies of #<system "quicklisp"> completed without its input file #P"/Users/opusmodus/quicklisp/quicklisp/quicklisp.asd" ; While executing: #<standard-method asdf/action:compute-action-stamp (t asdf/operation:operation asdf/component:component)>, in process Listener-1(7). > Error: File #P"/Users/opusmodus/quicklisp/quicklisp/package.lisp" not found > While executing: ccl::fcomp-find-file, in process Listener-1(7). > Type cmd-. to abort, cmd-\ for a list of available restarts. > Type :? for other options.
Seems like it keeps referencing /Users/opusmodus regardless of that line. Maybe I should take further steps before this? Perhaps uninstall the quicklisp installation I did personally with SBCL?
The second option you posted has the same effect.
Again, thanks
-
Following from this question, I want to use several different Lisp packages through quicklisp, but I can't get the installation to work correctly.
After doing some digging, I found out that the path to quicklisp is not defined correctly. This is the content of the ql:*quicklisp-home* global:
> ql:*quicklisp-home* #P"/Users/opusmodus/quicklisp/"
I realised that changing this manually doesn't fix the issue, and because of this I can't install or use quicklisp correctly. Note that I do not have a user by the name opusmodus and creating that directory with my user's permission does not fix it.
I managed to do something by using SBCL as my own user to load and install quicklisp, and then in opusmodus use the following:
(load #p"/Users/ajf-/quicklisp/setup.lisp")
But it's actually a workaround and it's not very reliable (also gives an error sometimes). Can you please point me in the right direction?
Thank you very much
Klangreihen Study
in Made In Opusmodus
Posted
Here is my study about the klangreihen: