Jump to content

Search the Community

Showing results for tags 'functions'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to Opusmodus
    • Announcements
    • Pre Sales Questions
  • Support Forum
    • Support & Troubleshooting
    • OMN Lingo
    • Function Examples
    • Score and Notation
    • Live Coding Instrument
    • Library Setup
    • MIDI Setup
  • Question & Answer
    • Suggestions & Ideas
    • Zoom into Opusmodus
  • Sharing
    • Made In Opusmodus
    • User Extensions Source Code

Categories

  • OMN The Language
  • Tutorial Guide
  • CLM Examples

Categories

  • Getting Started
  • HowTo
  • Live Coding
  • Music Theory and Analysis
  • How-to in 100 sec
  • Presentation
  • Convention

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Gender


Location


Interests


About Me

Found 5 results

  1. I can't seem to get do-timeline2 function to work. I include an abridged example below; happy to share more code details if necessary. I'd like to filter 64 measures of 4/4 as defined in the timeline. Would anyone be able to offer some feedback? I tried adjusting different 'list' levels, etc. but with no avail. Thank you! (setf chords1 '(e2b2g3d4 e2cs3a3e4 e2d3b3fs4)) (setf chords2 (pitch-transpose 3 chords1)) (setf chorale1-chords (span '(1 1 1 1 1 1 1 1) chords1)) (setf chorale2-chords (span '(1 1 1 1 1 1 1 1) chords2)) ;; OMNS (setf chorale1 (make-omn :length (length-span '(1 1 1 1 1 1 1 1) '(w) :omn t) :pitch chorale1-chords)) (setf chorale2 (make-omn :length (length-span '(1 1 1 1 1 1 1 1) '(w) :omn t) :pitch chorale2-chords)) ;; CHORALE RESERVOIRES (setf chorales-reservoir (list chorale1 chorale2)) (setf chorales-map (vector-map chorales-reservoir '(0 4 7 12 16 7 12 16))) ;; TIMELINE (setf chorales-timeline '((1 0 1 0 1 0 1 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0))) (do-timeline2 '(chorales-map) chorales-timeline '(gen-pause x))
  2. I've been studying HARMONIC-PATH and TONALITY-MAP functions to determine the exact similarities and differences between the two. While I understand the purpose of those functions in principle from reading the documentation and experimenting with different ideas, I wonder if - for educational purposes - someone could briefly highlight the main explicit differences between the two. In the short example below, both functions produce very similar results, so the question may be when to use one function instead of the other. And is it possible to achieve the same result with both functions? I appreciate anyone's advice or insight into this. Thanks! (setf chords '(c4e4g4 c4f4a4 b3d4g4)) (setf voice (gen-repeat (length chords) '((c4d4 e4)))) (setf harmonic-path (harmonic-path chords voice :octave :path)) => ((c4e4 g4) (c4f4 a4) (b3d4 g4)) (setf tonality-series (tonality-series chords :map '(step) :closest 'up)) (setf tonality-map (tonality-map tonality-series voice)) => ((c4g4 e5) (c4a4 f5) (b3g4 d5))
  3. Can I assign integer to attribute, for e.x integer to attribute?
  4. 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 possible, as it seems incredibly difficult to perform without manual data transformation. However, I'm curious if anyone else has attempted this sort of process? Regards, Tom
  5. 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)
×
×
  • Create New...

Important Information

Terms of Use Privacy Policy