Giter VIP home page Giter VIP logo

tune's People

Contributors

dependabot[bot] avatar torfmaster avatar woyten avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tune's Issues

Add live retuning

Add a tune live command to tune-cli.

  • Just-in-time octave-based tuning
  • Ahead-of-time octave-based tuning

MIDI in leaves GUI artefacts

Mint Uma 20.2 using PipeWire 0.3.39

./microwave run --midi-in "QuNexus MIDI 1" connects to the device but does not appear to release the note when the key is no longer being pressed

Here are 3 examples, using keyboard and mouse which work well, and then midi which leaves the residuals

mvs.01.mp4

Define a customer journey for the CLI

  • Define an execution model / How can different CLI calls interact with each other? Examples
    • REPL
      $ tune
      > scl steps 1:12:2
      > kbm D4
      > connect QSynth
      > mts
      > exit
    • Pipeline
      $ tune scl steps 1:12:2 | tune kbm D4 | tune mts Qsynth
    • Endless args
      $ tune scl steps 1:12:2 kbm D4 mts Qsynth
  • What calls should be supported?

StreamConfigNotSupported error on Windows

Starting microwave on a Windows PC fails with a StreamConfigNotSupported error.

Cause: Setting StreamConfig::buffer_size to BufferSize::Fixed(<value>) is not allowed.

Fix: Set StreamConfig::buffer_size to BufferSize::Default when SupportedStreamConfig::buffer_size is SupportedBufferSize::Unknown.

Add live interactions with waveforms

Idea: Add an enum variant LfSoruce::Controller which reads the specified controller's current value.

  • A Channel could be used to track the controllers' current state.

Named waveform buffers

Access waveform buffers by a custom name and not by index

Ideas

  • The Stage object continues to access waveform buffers by index
  • The StageSpec object uses named buffers that need to me mapped to an index
  • Use an automatically determined number of waveform buffers. The buffers are waveform-local.
  • Possible extension: Use global buffers to process AudioIn or AudioOut as a whole

tune scale documentation

I really can't figure out what the arguments to tune scale rank2 are. Can the documentation be extended a little?

Also the generation of tuning files for a synthesizer are unclear. I can not get tun to produce a file.

Microwave requires Vulkan-compatible graphics

Running microwave fails because it's unable to open a graphics device

[INFO] Loading waveforms file `waveforms.yml`
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: NoAvailableAdapter', microwave/src/main.rs:451:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
zsh: segmentation fault  microwave run

It looks like this is a known issue. Vulkan assumes a reasonably powerful graphics card. I have

$ lspci | grep VGA    
00:02.0 VGA compatible controller: Intel Corporation Core Processor Integrated Graphics Controller (rev 12)

A headless mode should at least allow the synth to run

ItemOutOfRange error generated on import.

I'm sure this is technically a violation of the spec, which I'd guess is why this check is in the builder, but all the tools I use (e.g. ODDSound MTS-ESP) are happy to generate scales that violate this. For example. I realize this check might be helpful for manually building scales, but I'm wondering if there's a way we can disable it for import.

What next?

Leave a comment if you are searching for an idea how to contribute. ๐Ÿ˜ƒ

Error on build

Linux Mint 20.2

cargo b
error: failed to parse manifest at `~/src/tune/Cargo.toml`

Caused by:
  feature `edition2021` is required

  consider adding `cargo-features = ["edition2021"]` to the manifest

Apply live retuning in microwave

Move the live retuning functions from tune-cli to tune and make them accessible in microwave.

  • All AOT live retuning functions available in microwave
  • JIT live retuning for continuous mode Fluid synth
  • All JIT live retuning functions available in microwave

Add adaptive tuning

Retune played notes in real time s.t. their frequency ratios get as close to JI as possible.

Usage: The user provides a list of (pure) intervals some of which can be left empty.

Example: x, 9/8, 6/5, ... means minor seconds have no preference, major seconds prefer to become 9/8, minor seconds prefer to become 6/5, etc.

Idea: Optimize two energies

  • The sum over all intervals of the squared difference between the actual interval and the just interval
  • The sum over all pitches of the squared difference between the actual pitch and the original pitch

Enhancements: Provide a weight for each ratio.

Better error handling

% tune scale 440 equal 31                                                                                                                                                                                                                      
thread 'main' panicked at 'Ratio must be finite and positive but was 0', /home/suhr/.cargo/registry/src/github.com-1ecc6299db9ec823/tune-0.10.0/src/ratio.rs:49:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

There's a handy crate for error handling: https://docs.rs/anyhow

Library vision (tracking issue)

  • Basic types
    • Pitches and ratios
    • Notes and keys
    • Ordered and unordered scales with inverse search
    • Keyboard mappings
    • API/Documentation quality
  • Scala interop
    • SCL import/export
    • KBM import/export
    • API/Documentation quality
  • MTS support
    • Scale/Octave Tuning
    • Single Note Tuning Change
    • RPN messages
    • Less common variants (with bank select / 2-byte format)
    • API/documentation quality
    • (optional) MTS parsing
  • Ahead-of-time tuner
    • Full-keyboard based
    • Octave based
    • Channel based
    • API/documentation quality
  • Just-in-time tuner
    • Full-keyboard based
    • Octave based
    • Channel based
    • API/documentation quality
  • Adaptive tuner
  • MIDI
    • Serialize/deserialize channel messages
    • API/documentation quality
  • Generalized keyboard layouts and notation
    • Basic val type
    • Meantone and porcupine keyboard arrangements
    • MOSes (currently only in tune-cli)
    • Derive notation and keyboard arrangements from pergen-based temperament model and MOS properties
    • Commas
    • Find best-matching temperament by eliminated commas
    • API/documentation quality

Audio-in

Add audio-in to the Source enum s.t. it can be used as an input for any waveform.

Add sample-based synthesizer

Render audio samples when playing a note.
Idea: Create an enum variant StageSpec::Sample which renders an audio file to a target buffer.

Find out how to tune all 128 notes in one SysEx call

The tune mts command currently emits a MTS (Non-Real Time) Single Note Tuning Change message. The number of retuned notes supported by this message seems to be limited to 127. Since one note is missing, I guess that the message is not intended to be used for whole-keyboard tunings.

If anyone knows what the correct whole-keyboard tuning strategy is, please let me know. I already tried out a bunch of other MTS messages with QSynth but with no success. Maybe I failed to set the tuning program correctly?

Split LfSource into a spec and state object

Current situation:

  • LfSource acts as a specification and as a state object at the same time
  • When using LfSourceExpr::Envelope the envelope needs to be looked up in a HashMap which seems undesirable in terms of performance

Desired situation:

  • In the same way that StageSpec and WaveformSpec are separated from Stage and Waveform, LfSource should be split into a spec and state object. Done in 6e9b0fd.
  • Envelopes should be looked up once on waveform creation and be stored in the state object. Done in 0a0b4b7.

Add isomorphic keyboard

  • Retrieve keyboard layouts (Meantone / Porcupine) for any scale
  • Render a hexagonal isoorphic keyboard

Add benchmarks

The current performance does not seem to be a a problem. microwave can render 800 Sin stages and 1600 Sawtooth stages simultaneously on a single Core i7-6700HQ CPU @ 2.60GHz. There is still room for improvement by rendering the Sin function to a wavetable (#28) and by using all CPU cores.

However, thinking about performance without measuring it is a problem. Therefore, I would like to add some benchmark tests that confirm or disprove performance considerations.

Vision:

  • Add a bench subcommand which runs some performance test (e.g. measures the time to render 100.000 Sin stages into a buffer)
  • Create an independent github action which will build the microwave executable for all commits since the latest release tag in --release mode
  • Run microwave bench for all builds multiple times and create a benchmark report

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.