Jump to content

opmo

Administrators
  • Posts

    2,869
  • Joined

  • Last visited

Everything posted by opmo

  1. (setf pitches (rnd-sample 12 (midi-to-pitch '(65 64 63 62 61 60)))) If the tempo is 60 then the span is 5/4 etc... (setf lengths (length-span 5/4 (rnd-sample 6 '(s -s e. q)))) (make-omn :length lengths :pitch pitches)
  2. Many years ago, I composed my inaugural string quartet, characterized by numerous tempo alterations for each instrument. Unfortunately, the notation—our primary means of communication—proved wholly ineffective. In the present day, I frequently create compositions featuring varied tempos for individual instruments. However, I now ensure that the notation—a vital line of communication with the performer—is uniformly inscribed in a single tempo. To facilitate this, I've developed the LENGTH-TO-TEMPO function. The concept of polytempo offers an intriguing structure, but its true potential is only realized when we manage to transcribe it into a consistent tempo for all.
  3. New function: GEN-ENVELOPE-TENDENCY This function takes a list of data and adjusts the values to fit within the specified lower and upper envelope limits. If a value is outside the given envelope, the function will adjust it to fit within the envelope and all subsequent values in the list are also adjusted by the same amount, which helps to preserve the original shape of the data. Examples: (setf data (gen-brownian-motion 128 :seed 43)) (setf len (length data)) (setf l-limit (envelope-samples '(0 0 1 -1 2 -1 3 -2 4 3 5 -1 6 0) len)) (setf u-limit (envelope-samples '(0 1 1 4 2 2 3 4 6 4) len)) (xy-plot (list l-limit u-limit) :join-points t) (setf adj (gen-envelope-tendency data l-limit u-limit :seed 12)) (list-plot adj :zero-based t :point-radius 2 :join-points t) With optional reflect T: (setf ref (gen-envelope-tendency data l-limit u-limit :reflect t :seed 12)) (list-plot reflect :zero-based t :point-radius 2 :join-points t) Happy coding, Janusz
  4. Documentation to CLM envelope functions: ENVELOPE-CONCATENATE ENVELOPE-DECREASE ENVELOPE-DIVIDE ENVELOPE-EXP ENVELOPE-INCREASE ENVELOPE-INTERP ENVELOPE-LENGTH ENVELOPE-MAX ENVELOPE-MULTIPLY ENVELOPE-REFLECT ENVELOPE-REPEAT ENVELOPE-REVERSE ENVELOPE-SAMPLES ENVELOPE-SIMPLIFY ENVELOPE-X ENVELOPE-Y MAX-ENVELOPE MIN-ENVELOPE NORMALIZE-ENVELOPE SCALE-ENVELOPE STRETCH-ENVELOPE WINDOW-ENVELOPE X-NORM Help function for XY-PLOT: MAKE-XY Note: The XY-PLOT input should be composed of pairs of x and y values. Typically, x represents the independent variable, which is often time in many applications, while y represents the dependent variable, often amplitude or another measure. Please check the documentation. (xy-plot '(2 0 3 1 5 1 7 2 11 3 13 5 17 8 19 13) :join-points t :point-radius 2 :style :axis :point-style :square)
  5. What you can do is to record the Live Coding output in to a DAW. This way you will end up with a midi score of the Live Coding Instrument session.
  6. Great news We would need to end up with DEF-SCORE, same as we do with the MIDI to Score function: MusicXML to Score.
  7. ver. 3.0.28933 New functions: Probability->Distribution BETA-DISTRIBUTION The function returns a list of values generated from the Beta distribution using the given alpha and beta parameters. The Beta distribution is a continuous probability distribution defined on the interval [0, 1]. It is commonly used to model random variables that have values between zero and one, such as proportions, probabilities, or parameters that are constrained to a specific range. BILATERAL-EXPONENTIAL The bilateral exponential distribution is a probability distribution that models random variables with values in a symmetric interval around zero. It is often used to describe quantities that exhibit both positive and negative values, such as the differences between two related measurements or errors in scientific experiments. The function returns a list of values generated from the bilateral exponential distribution using the given lower limits a and upper limits b. CAUCHY-DISTRIBUTION The Cauchy distribution is a probability distribution that is characterized by its symmetric bell-shaped curve. The function returns a list of values generated from the Cauchy distribution using the given location parameters x0 and scale parameters gamma. It is also known as the Cauchy-Lorentz distribution and is named after mathematicians Augustin Cauchy and Hendrik Lorentz. Applications of the Cauchy distribution include modeling extreme events, analyzing data with outliers, and in physics, where it arises naturally in certain physical phenomena, such as quantum mechanics and resonant systems. GAUSSIAN-DISTRIBUTION The function returns a list of pairs (x, y), where x and y are random numbers generated from a Gaussian distribution with the given means and standard deviations. The Gaussian distribution, also known as the normal distribution or bell curve, is one of the most widely used probability distributions in statistics. It is named after mathematician Carl Friedrich Gauss. WEIBULL-DISTRIBUTION The Weibull distribution is a probability distribution that is commonly used to model the failure times or lifetimes of various types of systems or phenomena. It was introduced by Wallodi Weibull, a Swedish engineer and mathematician. The function returns a list of values generated from the Weibull distribution using the given scale parameters lambda and shape parameters k. Mathematics->Interpolation SEGMENT-INTERPOLATION This function interpolates over segments defined by time, value, and an exponent using either linear or cosine interpolation. It creates a segment for each time point with the corresponding value and exponent. It then generates a sequence of points, for each of which it determines the appropriate segment. For a point, it finds the two segments it falls between and applies the appropriate interpolation based on the exponent of the first segment. If there is no subsequent segment, the function simply returns the value of the first segment. If the point falls exactly on the time of a segment, no interpolation is necessary and the function directly returns the corresponding value. Best wishes, Janusz
  8. I quickly change the names of the 2 new functions: FTT-W -> FTTW FTT-H -> FTTH I too added few more options into the FFTW function: coefficients and scale-factor Please make change to your code if you are already played with the FFT functions. Best wishes, Janusz
  9. New function: FFTH, FFTW Brownian motion functions are rewritten. If you used them before please check the documents. Improvement to probability functions. FFTH num-of-harmonics step-resolution points &key type quantize coeff ambitus The function FFTH calculates the Fast Fourier Transform (FFT) of a given list of points. The FFT is a mathematical algorithm that transforms a function of time (a signal) into a function of frequency. In the context of digital signal processing, the FFT algorithm is used to identify the frequencies present in a discrete signal. The computation involves the following steps: Initialization: Arrays for amplitude, phase, harmonics-matrix, and fftx are initialized. Coefficient calculation: The function then calculates coefficients for the FFT, looping over the input data points. This is done using a complex number, where amplitude corresponds to the real part and phase to the imaginary part. FFT curve computation: After the coefficients have been calculated, the function uses them to calculate the FFT curve by looping over a set of x-values and summing up the contributions from each coefficient. Transformation of the results based on the type of output specified: If type is 'integer, the function rounds the FFT output to the nearest integer. If it's 'pitch, it converts the FFT output to pitches, quantizes them, and limits them to the specified ambitus. If no type is specified, the raw data points of the FFT curve are returned. Examples: (ffth 8 0.05 '(44 52 22 68 6 22 9 73 28 68)) (ffth 8 0.05 '(44 52 22 68 6 22 9 73 28 68) :type 'pitch :ambitus '(c3 c5)) (ffth 3 0.05 '(44 52 22 68 6 22 9 73 28 68) :type 'pitch :coeff 1.0 :ambitus '(c3 c5)) (ffth 8 0.05 '(44 52 22 68 6 22 9 73 28 68) :type 'pitch :ambitus '(c3 c5) :quantize 1/4) FFTW data &key window normalize coefficients scale-factor phase This function performs a Fast Fourier Transform (FFT) on the input data. The FFT is a widely-used algorithm for computing the Discrete Fourier Transform, which decomposes a sequence of numbers into components of different frequencies. If a windowing function is provided via the window keyword parameter, this function is used to create a "window" that is applied to the input data before performing the FFT. Windowing can help to reduce "leakage" and "picket fence" effects (artifacts caused by the finite length of the input data). If the normalize keyword parameter is true (the default), the FFT results are normalized by dividing each component by the length of the input data. This makes the results independent of the length of the input data and can make them easier to interpret. The coefficient parameter in the FFTW function serves to modify the amplitude of the output data. Each output value of the FFT is multiplied by this coefficient, effectively scaling the amplitude of the frequency components. The implementation of this FFT function is recursive, meaning it repeatedly breaks down the problem into smaller parts until it reaches a base case where the FFT can be computed directly. This makes it efficient for large datasets. Note that this function requires the length of the input data to be a power of 2. If the length of the input data is not a power of 2, it is padded with zeros up to the next power of 2. This is because the FFT algorithm is most efficient when the length of the input data is a power of 2. If you only care about the magnitudes of the frequency components, you can take the absolute value of each number in the result: (setf data '(0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)) If you also care about the phase information, you can use the phase option to extract the phase of each number: (fftw data :phase t) Examples: In this example, a Blackman-Harris window is applied to the input data: (fftw data :window 'blackman-harris-window) No normalization is performed: (fftw data :window 'blackman-harris-window :normalize nil) Compute FFT with Gaussian window: (fftw data :window 'gaussian-window) Compute FFT with Ultraspherical window: (fftw data :window 'ultraspherical-window) Examples with all available window functions: (fftw data :window 'bartlett-hann-window) (fftw data :window 'bartlett-window) (fftw data :window 'blackman-harris-window) (fftw data :window 'blackman-nuttall-window) (fftw data :window 'blackman-window) (fftw data :window 'bohman-window) (fftw data :window 'cauchy-window) (fftw data :window 'connes-window) (fftw data :window 'cosine-window) (fftw data :window 'exponential-window) (fftw data :window 'flat-top-window) (fftw data :window 'gaussian-window) (fftw data :window 'hamming-window) (fftw data :window 'hann-poisson-window) (fftw data :window 'hanning-window) (fftw data :window 'kaiser-window) (fftw data :window 'nuttall-window) (fftw data :window 'parzen-window) (fftw data :window 'planck-taper-window) (fftw data :window 'rectangular-window) (fftw data :window 'riemann-window) (fftw data :window 'triangular-window) (fftw data :window 'tukey-window) (fftw data :window 'ultraspherical-window) (fftw data :window 'welch-window) Best wishes, Janusz
  10. I will add to the function reflect - ensures the simulated motion stays between the lower and upper limits by reflecting it at those limits.
  11. (setf bw (gen-brownian-motion 128 :seed 425)) (vector-round 0.0 6.0 bw)
  12. do you mean: (vector-round 0.0 6.0 (gen-brownian-motion 128))
  13. The new function UNIFY-RHYTHMS will solve your problem - 3.0.28916 Examples: (setf l1 '(q e e 3q 3q 3q -e. s)) (setf l2 '(e e e. s -e e s -s s -s)) (list l1 l2) ; select and press cmd-2 (unify-rhythms l1 l2) (setf r1 (rhythm-series 6 5 3/8 :length '(q. e. e s 3q))) (setf r2 (rhythm-series 6 4 1/2 :length '(q. e. e s 3q))) (setf r3 (rhythm-series 6 3 1/2 :length '(q. e. e s 3q))) (list r1 r2 r3) ; select and press cmd-2 Now we merge all three voices to form a single entity: (unify-rhythms r1 r2 r3)
  14. Well spotted. It is a bug for sure.
  15. Do you mean LOOP. Please give me an example of the input and the output.
  16. It is not very complex to do that but at the moment I don't have the time to do that, maybe in the future.
  17. The ver.3.0 in an upgrade. You need a new Licence Key for it.
  18. OM printing works like any other application.
  19. Place the cursor at the end of the score and press "Return" - thats all. The Evaluate Score / Notation is for def-score.
×
×
  • Create New...

Important Information

Terms of Use Privacy Policy