• W webaudiofont
  • Информация о проекте
    • Информация о проекте
    • Активность
    • Метки
    • Участники
  • Репозиторий
    • Репозиторий
    • Файлы
    • Коммиты
    • Ветки
    • Теги
    • Участники
    • Диаграмма
    • Сравнение
  • Задачи 0
    • Задачи 0
    • Список
    • Доски
    • Спринты
  • Запросы на слияние 1
    • Запросы на слияние 1
  • CI/CD
    • CI/CD
    • Конвейеры
    • Задания
    • Расписания
  • Развертывания
    • Развертывания
    • Окружения
    • Релизы
  • Пакеты и реестры
    • Пакеты и реестры
    • Реестр пакетов
    • Реестр контейнеров
  • Мониторинг
    • Мониторинг
    • Инциденты
  • Аналитика
    • Аналитика
    • Поток ценности
    • CI/CD
    • Репозиторий
  • Wiki
    • Wiki
  • Сниппеты
    • Сниппеты
  • Активность
  • Диаграмма
  • Создать новую задачу
  • Задания
  • Коммиты
  • Доски с задачами
Свернуть панель
  • sss1024
  • webaudiofont
  • Запросы на слияние
  • !9

Fixed adjustPreset in player, to work around two pathological cases i…

  • Ревью изменений

  • Скачать
  • Почтовые патчи
  • Простое отличие
Открыто sss1024 запросил слияние github/fork/SAKryukov/master в master Авг 21, 2017
  • Обзор 0
  • Коммиты 1
  • Конвейеры 1
  • Изменения 2

Created by: SAKryukov

Fixed adjustPreset in player, to work around two pathological cases in instrument .js files (presets)::

  1. Some files have zones with zone.keyRangeLow > zone.keyRangeHigh; they are not used anyway and can be removed; this is a big performance improved, as, in some files, they reduce number of zones by order of magnitude
  2. All files have zones with 1-semiton gaps, such as 0..29, 29..36, and so on. This is methodically totally wrong, but works with integer number of semitones. Microtones can be fractional; if, for example, the pitch values is 29.1, the zone will never be found, and its fallback is a zone at index 0. It produces intolerably bad quality of sound.

The fix is in just one function, just few line; it does not change sounds with integer number of semitones:

this.adjustPreset = function (audioContext, preset) {
    const fixedZones = [];
    for (let zone of preset.zones) {
        if (zone.keyRangeLow > zone.keyRangeHigh) continue; // pathological case, not used anyway
        fixedZones.push(zone);
        this.adjustZone(audioContext, zone);
    } //loop preset.zones
    preset.zones = fixedZones;
    // removing 1-semitone gaps between zones; important for microtones:
    for (let index = 1; index < preset.zones.length; ++index)
        preset.zones[index].keyRangeLow = preset.zones[index - 1].keyRangeHigh;
};

It fully fixes issue 8 in non-obtrusive comprehensive way.

Ответственный
Назначить
Проверяющие
Запросить ревью
Оценка трудозатрат
Исходная ветка: github/fork/SAKryukov/master