Jump to content

opmo

Administrators
  • Posts

    2,865
  • Joined

  • Last visited

6 Followers

Contact Methods

Profile Information

  • Gender
    Male

Recent Profile Visitors

17,306 profile views
  1. Is this what you are looking for: (defun polarity (seq &key sum) (do-verbose ("polarity") (flet ((polarity-i (in-seq) (let ((integers (if (omn-pitchp (car in-seq)) (pitch-to-midi in-seq) in-seq))) (when (equal (length integers) 0) return 0 ) (let ((accum 0) (int-pairs (interval-class integers))) (mapcar (lambda (x) (when (evenp x) (incf accum) )) int-pairs) (/ (* accum 1.0) (- (length integers) 1)) )))) (let ((result (loop for i in (lists! seq) collect (polarity-i i)))) (if sum (/ (find-sum (flatten result)) (length result)) result))))) (polarity '(1 3 6 4 2)) => (0.75) (polarity '((c4 e4 c3 ds4 b5) (c4 cs4 d4 ds4 f4))) => (0.75 0.25) (polarity '((c4 e4 c3 ds4 b5) (c4 cs4 d4 ds4 f4)) :sum t) => 0.5
  2. Just open the file in your workspace (with some edit) and save. Autosave can't be disabled.
  3. My results are different. What version you are using? (length-span 4 (rnd-sample 40 '(4/14 5/14 6/14)) :omn t) => (7d. 7d = 7d. = 7d 7dh = = 7d. 7dh) With random selection it is possibile, at the end, you endup with 1/14 value: (2/7 3/7 2/7 2/7 3/7 5/14 5/14 2/7 2/7 2/7 2/7 5/14 1/14)
  4. Yes, it is. Your license permits you to activate Opusmodus on two personal computers that you own, under the condition that the program is used on only one computer at a time.
  5. There is no need to do what you are doing. The best way to setup the port is by number. There is no need for midipipe etc... (def-score exp (:key-signature 'chromatic :time-signature '((1 1 1 1) 4) :tempo 60 :layout (grand-layout '(rh lh))) (rh :omn rh :port 0 :channel 1 :sound 'Minilogue) (lh :omn lh) )
  6. This process is unrelated to Opusmodus MIDI. Initially, one must construct a def-sound-set for this purpose. Within the Library, one can find examples demonstrating the method to configure the programs.
  7. Not all publishing softwares are up to scratch with Music XML conversion, sadly.
  8. Additional DICTUM types: :grace-note and :previous Executes a specified function applied exclusively to grace note events. (:do (pitch-transpose 12 x) :grace-note t) Executes a specified function within the specified bar(s) exclusively to grace note events. (:do (pitch-transpose 12 x) :grace-note t :bar 2) This operation alters elements meeting certain predefined conditions from the preceding event, replacing them in the current event with a new element. Such conditional manipulation facilitates intricate, criteria-driven modifications. (:previous ff :do p) (:previous (h c4 f) :do (pp tr)) Example: (setf omn7 '((s fs3 mf d4 a4 c5 b4 f4 bb3 cs3) ((acc e f2 cs2) q c2 f stacc) (s e2 b2 gs3 e4 bb4 c5 bb4 e4) ((acc e gs3 b2) q e2 f stacc) (s c2 cs2 f2 cs3 bb3 f4 b4 c5))) (dictum '(:previous c5 :do (cs6 tr1+fermata)) omn7) => ((s fs3 mf d4 a4 c5 cs6 tr1+fermata f4 bb3 cs3) ((acc e f2 mf cs2) q c2 f stacc) (s e2 mf b2 gs3 e4 bb4 c5 cs6 tr1+fermata e4) ((acc e gs3 mf b2) q e2 f stacc) (s c2 mf cs2 f2 cs3 bb3 f4 b4 c5))
  9. (gen-loop 4 (list (rnd-pick (list bird1 bird2 bird3)) (rnd-pick (list rest1 rest2 rest3))))
  10. I never tried but the TAB clef is part of the system.
  11. To all users of the DICTUM function, please be advised that there have been changes to the DICTYM types. It is essential that you update these types within your scores if you are utilizing this function. This adjustment is necessary to ensure compatibility and functionality within your projects. We appreciate your attention to this matter and your continued use of our software. Dictum Examples: Changes a specified element to a new element across all bars. This operation affects every instance of the target element in the sequence. (:if f :do p) (:if q :do e) (:if stacc :do leg) (:if q :do stacc) (:if e :do (s stacc)) Modifies a specified element to a new element within the specified bar(s). This allows for targeted changes at specific locations in the sequence. (:if f :do p :bar 1) (:if q :do e :bar 1) (:if stacc :do leg :bar 1) (:if q :do stacc :bar 1) (:if e :do (s stacc) :bar 1) (:if e :do (s stacc) :bar (1 3 5)) (:if e (s stacc) :bar 2..6) Alters a specified element to a new element at a specific event number within the designated bar(s). This provides precise control over the modification of musical elements at particular points. (:if f :do p :bar 1 :event 1) (:if q :do e :bar 1 :event 1) (:if q :do stacc :bar 1 :event 1) (:if e :do (s stacc) :bar 1 :event 1) (:if e :do (s stacc) :bar (1 3 5) :event 1) Converts a specified list of elements to a new single element across all bars. This operation is applied globally within the sequence. (:if (f mf) :do mp) Changes a specified list of elements to a new single element within the specified bar(s). This targeted approach allows for changes within specific sections of the sequence. (:if (f mf) :do mp :bar 1) Substitutes all occurrences of a certain type of element with a new element throughout the entire sequence. This type-based replacement affects all relevant elements globally. (:do stacc) Modifies all occurrences of a certain type of element to a new element within the specified bar(s). This allows for type-based changes within specific segments. (:do stacc :bar 2) (:do stacc :bar (2 4 6 8)) Adjusts all accidentals in the sequence to either sharp or flat according to the specified map. This transformation affects the harmonic character of the sequence. (:do :sharp) (:do :flat) Executes a specified function across the whole sequence, potentially transforming the sequence based on the function's logic. (:do (dechord x)) Executes a specified function within the specified bar(s) or at a specific event, allowing for localised transformations. (:do (dechord x) :bar 3) (:do (dechord x) :bar 3 :event 2) Deletes a specified element or attribute (e.g., velocity, articulation) from the sequence. This can be applied to specific types or instances. (:remove leg) (:remove :velocity) (:remove :attribute) Changes the first or last event in the sequence or within specific bars, which can alter the opening or closing character of a musical phrase. (:first ord) (:first ord :bar 6) (:last fermata :bar 6) Replaces all elements in a sequence excluding the last event: (:butlast leg) Replaces all elements in a sequence excluding the first event: (:rest leg) Substitutes elements within a specified pitch, length or dynamic range with a new element, enabling focused modifications based on musical parameters. (:within (t s) :do marc) (:within (mp f) :do p) (:within (c4 c5) :do tasto) (:within (t s) :do marc :bar 2) (:within (mp f) :do p :bar 2) (:within (c4 c5) :do tasto :bar 2) Changes elements that match a specific series of conditions to a new element. This conditional operation allows for complex, criteria-based modifications. (:and (q c4 f) :do ff) (:and (q c4 f stacc) :do (q c4cs5 f marc)) Replaces the entire content of a specified bar(s) with a new sequence of events, effectively rewriting sections of the musical piece. (:substitute (3q c4 eb4 gs4) :bar 8) Best wishes, Janusz
  12. To streamline the process of importing SPEAR spectral data into the Opusmodus Library, the three-step procedure has been consolidated into a singular operation. Consequently, the IMPORT-SPECTRAL-SPEAR function has been deprecated and superseded by the newly introduced SPEAR-DATA-TO-LIBRARY function. This enhancement simplifies the importation of SPEAR data in the form of .txt files into Opusmodus, making it more straightforward. ----- SPEAR-DATA-TO-LIBRARY &key data name section index note This function processes and imports spectral data from the SPEAR (Sinusoidal Partial Editing Analysis and Resynthesis) application, developed by Michael Klingbeil. SPEAR is a sophisticated tool for audio analysis, editing, and synthesis, based on the McAulay-Quatieri technique. It represents sounds using sinusoidal tracks or 'partials', each track depicting a sinusoidal wave with time-varying frequency and amplitude. The resynthesis process in SPEAR, which involves computing and summing all sinusoidal waves, can closely approximate the original sound. The sinusoidal model used in SPEAR provides extensive analytical detail about time-varying frequency content and allows for significant flexibility in sound editing and manipulation. SPEAR supports real-time synthesis of numerous partials, extensive editing features like cut, paste, undo/redo, and handles various standard file formats for data import/export. SPEAR, available at http://www.klingbeil.com/spear/, is free software. It exports two types of spectral data: two-point data (frequency and amplitude, referred to as 'frames') and three-point data (time, frequency, and amplitude, referred to as 'partials'). The initial step in using this function is to place the SPEAR-generated data file in the ~/Opusmodus/Spectrum Data/Data/ directory. SPEAR-DATA-TO-LIBRARY will locate the data file in this directory, convert it, and save a new file in the ~/Opusmodus/Spectrum Data/Partials/ folder. Ultimately, the resultant ‘library’ file will be stored in the ~/Opusmodus/User Source/Libraries/Def-Library/ directory. Examples: Generate a library with frames (two-point data): (spear-data-to-library :data "mar-frames" ; Original SPEAR file name (.txt). :name 'mar-frames ; Name for the generated library. :section 'frames ; Name of the library section. :index 'p ; Index name for each partial. ) The structure of the frames library file is envisioned as follows: (in-package :Opusmodus) ;;; ----------------------------------------------------------- ;;; Library | Opusmodus Version 3.0.29183 | 2024-01-31 13:00:37 ;;; ----------------------------------------------------------- (def-library mar-frames (:section frames p0 '(13.312057 0.007893 77.37494 0.003534 118.87299 0.027961 . . . Generate a library with partials (three-point data): (spear-data-to-library :data "mar-partials" ; Original SPEAR file name (.txt). :name 'mar-partials ; Name for the generated library. :section 'partials ; Name of the library section. :index 'p ; Index name for each partial. ) The structure of the partials library file is envisioned as follows: (in-package :Opusmodus) ;;; ----------------------------------------------------------- ;;; Library | Opusmodus Version 3.0.29183 | 2024-01-31 13:02:10 ;;; ----------------------------------------------------------- (def-library mar-partials (:section partials p0 '(0.0 15731.577 3.0E-4 0.012495 15730.756 2.9E-4 0.024989 . . . Best wishes, Janusz
  13. The "automatically created place" you are referring to when using SETF on a non-existent name does not have a universally defined behavior in Common Lisp. The standard practice is to declare variables explicitly.
  14. SETF in Common Lisp is a macro used for assignment. The basic syntax of SETF is: (setf place value) Here, place represents the location where the value is to be stored, and value is the value to be stored. Example: (setf x 10) ; sets the variable x to 10. In Common Lisp, when you use SETF for an assignment, the value assigned to the specified location (or "place") will remain there until it is explicitly changed or replaced with another value. The "place" in the SETF statement refers to a location in memory where the value is stored. This could be a variable, a slot in a structure or object, an element in an array, and so forth. Once a value is assigned to a place using SETF, it stays associated with that place. If you want to change the value, you need to use another SETF statement (or another appropriate form) to assign a new value to the same place. Until such a change is made, the original value will persist in that location. The LET form is used to create local variables and bind them to values within a specified block of code.
×
×
  • Create New...

Important Information

Terms of Use Privacy Policy