Search the Community
Showing results for tags 'functions'.
Hello, I have converted one of my scores to OMN. The sequence of pitches, velocity and length are all demonstrated explicitly example - (q b3 e -s b2b2 gs2 as2 a3 g2g2 g2 e2 -e) I would like to take the sequence and convert it to the most appropriate function. I'm assuming this would take a step of analysis. That is, instead of Function > Sequence, I want to perform Sequence> Analysis > map to a Function. Then I could eliminate the explicit OMN sequences and have a score that is (mostly) functions. I'm not sure if this is
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 fu