Jump to content

Search the Community

Showing results for tags 'sorting algorithms'.

  • 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
    • SuperCollider
  • Question & Answer
    • Suggestions & Ideas
    • Zoom into Opusmodus
  • Sharing
    • Made In Opusmodus
    • User Extensions Source Code
  • Opusmodus Network
    • Meet, Compose, Collaborate
    • Strategies and Methods to Control Complexity
  • Opusmodus Workshops & Schools
    • Composer Workshop

Calendars

  • Community Calendar

Product Groups

  • Opusmodus

Categories

  • The First Steps in Opusmodus
  • Tutorials
  • How-to in 100 sec
  • Made in Opusmodus
  • How-To
  • Zoom into Opusmodus
  • SuperCollider
  • Workflow
  • Live Coding
  • Presentation
  • Analysis
  • Composer Workshop

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 3 results

  1. hi all i'm looking for different SORTING ALGORITHMS in LISP - no problem to find (different) in the WWW... but: i would like to have as OUTPUT-result ALL generations of the SORTING-process and not only the LAST one - i'm interested in the PROCESS!! thanks for some help or any idea? (for once i do not want to code it myself :-)) greetings andré
  2. like this (?)... ;;; mapping to MAJOR (setf sort-seq (integer-to-pitch (flatten (gen-sort (rnd-order (gen-integer 24)) :type 'selection)))) (def-score example-score (:key-signature 'atonal :time-signature '(4 4) :tempo 90 :layout (treble-layout 'seq)) (seq :omn (make-omn :pitch (setf n (tonality-map '(major :map step :root 'c4) sort-seq)) :length (gen-repeat (length (flatten n)) '(t))))) ;;; mapping to MESSIAEN-mode (setf sort-seq (integer-to-pitch (flatten (gen-sort (rnd-order (gen-integer 24)) :type 'insertion)))) (def-score example-score (:key-signature 'atonal :time-signature '(4 4) :tempo 90 :layout (treble-layout 'seq)) (seq :omn (make-omn :pitch (setf n (tonality-map '(messiaen-mode5 :map step :root 'c4) sort-seq)) :length (gen-repeat (length (flatten n)) '(t))))) ;;; mapping to a XENAKIS-SIEVE -> how can i do that with TONALITY-MAP? (but not necessary) (setf sieve (gen-sieve '((c4 g7) (c1 g7)) '((2 1 12) (3 5)) :type :pitch)) (setf sort-seq (flatten (gen-sort (rnd-order (gen-integer (length sieve))) :type 'insertion :sort '?))) (def-score example-score (:key-signature 'atonal :time-signature '(4 4) :tempo 90 :layout (treble-layout 'seq)) (seq :omn (make-omn :pitch (setf n (loop for i in sort-seq collect (nth i sieve))) :length (gen-repeat (length (flatten n)) '(t)))))
  3. for a musical research project where i work with the sorting processes of different sorting algorithms (bubble-sort, heap-sort ...), i have to program such algorithms myself. the ide is that not only the end result of the algorithm is visible but also the constant changes (the mechansim). here the first: bubble-sort. very simple and inelegant programmed - but the thing i need to have :-) bubble-sort: https://en.wikipedia.org/wiki/Bubble_sort have a look to different sorting algorithms: greetings andré ;;; bubble-sort -> with all GEN's to see the process of sorting ;;; end-test "until (equal (sort-asc alist) list)" very uncommon (and strange), ;;; but most simple-stupid test to check the end, only okay for this kind of idea ("watching the process not the endresult") (defun bubble-sort (seq) (let ((alist)) (progn (setf alist (cond ((pitchp (car seq)) (pitch-to-midi seq)) ((lengthp (car seq)) (omn :length seq)) (t seq))) (setf alist (loop until (equal (sort-asc alist) list) with list = alist append (loop for i from 0 to (- (length list) 2) for j from 1 to (- (length list) 1) when (> (nth i list) (nth j list)) collect (setf list (position-swap (list j i) list)) else do (setf list list)))) (cond ((pitchp (car seq)) (midi-to-pitch alist)) (t alist))))) (bubble-sort (rnd-order '(c5 e4 g3 b7))) (bubble-sort (rnd-order '(t s e q h w))) (bubble-sort '(1 6 334 2 6 4 111))
×
×
  • Create New...

Important Information

Terms of Use Privacy Policy