Coder Social home page Coder Social logo

psgino's People

Contributors

nyannkov avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

psgino's Issues

Add Support for Switching Time Units in Software Envelope Parameters

Currently, the parameters of the software envelope are specified only in milliseconds. While this makes it easy to understand intervals, a problem arises when the tempo is changed. The shape of the envelope does not scale with changes in the length of each note.

To address this issue, we propose adding a time_unit variable to the SW_ENV_INFO structure, allowing the time units for the software envelope parameters ($A, $H, $D, $F, $R) to be switched. A new command $U will be added to modify the time_unit value.

  • Default: time_unit = 0 (milliseconds, as before)
  • NoteLength units: time_unit = 1 - 1024

For example, if time_unit = 128, the time unit for the parameters will correspond to the length of a 128th note. This enhancement will enable the envelope to adapt more flexibly to tempo changes.

[BUG] Incorrect LFO Operation with Non-Zero `speed_unit` & $L Command Range Adjustment

Issue Summary:
The newly implemented speed_unit parameter for the software LFO does not function correctly when set to a value other than 0. Specifically, the bug lies in the local function get_lfo_freq(), where the calculation for speed_unit values other than 0 is incorrect. This results in improper LFO behavior.

Additional Changes:

  • The $L command's value range has been expanded from 0-200 to -200 to 200. This adjustment ensures that when $L is set to a negative value, the LFO's modulation waveform begins with a phase of 0°, rather than being 180° out of phase.
  • Ideally, the $L command value should produce a phase of 0° when the value is 0 or greater, and 180° when less than 0. However, to maintain compatibility, the current approach will be used.

Add Support for Switching the Speed Units of the Software LFO Parameter

Currently, the LFO frequency specified by the $L command is set in 0.1 Hz units. We propose adding the option to set the LFO frequency using the reciprocal of note lengths. When speed_unit is 0, the $L command uses 0.1 Hz as before. If speed_unit is non-zero, the unit will be the reciprocal of (note_len*10).

We will introduce the $V command to set speed_unit. For example:

  • $V4 and $L10 will result in 1.0 frequency modulations per quarter note.
  • $V8 and $L25 will result in 2.5 frequency modulations per eighth note.

This allows the number of modulations per note to remain consistent, even if the tempo changes.

Enable Non-Decimal Notation for the "@C" Command Argument

Enable non-decimal notation for the "@C" command argument. When using the "@C" parameter with a (numeric string), it should convert the value based on the prefix (0, 0x). If parentheses are omitted, it will default to decimal notation as before.

Parentheses are used to clarify whether A-F should be interpreted as hexadecimal digits or notes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.