--- layout: default title: "{{ page.file }}" ---
{% include sidebar.html %}

{{ page.file }}

{% if page.file or page.bpm %}
{% if page.file %}
📁 Arquivo: {{ page.file }}
{% endif %} {% if page.bpm %}
🎵 BPM: {{ page.bpm }}
{% endif %}
{% endif %} {% assign audio_file_path = '/mmp/wav/' | append: page.file | append: '.wav' %} {% if page.file %}
{% endif %}
{% if page.tags %} {% assign tags_vazias = true %} {% for categoria in page.tags %} {% if categoria[1] and categoria[1].size > 0 %} {% assign tags_vazias = false %} {% endif %} {% endfor %} {% unless tags_vazias %}
🏷️ Tags {% for categoria in page.tags %} {% if categoria[1] and categoria[1].size > 0 %}
{{ categoria[0] }}:
{% for valor in categoria[1] %} {% if valor != "" %} {% assign tag_slug = valor | replace: ' ', '+' %} {% if categoria[0] == 'bassline' %} {{ valor }} {% elsif categoria[0] == 'sample' %} {{ valor }} {% elsif categoria[0] == 'plugin' %} {{ valor }} {% elsif categoria[0] == 'automation' %} {{ valor }} {% else %} {{ valor }} {% endif %} {% endif %} {% endfor %}
{% endif %} {% endfor %}
{% endunless %} {% endif %} {% if page.tracks and page.tracks.size > 0 %}
🎚️ Instrumentos
    {% for track in page.tracks %} {% assign tem_instr = false %} {% if track.instruments and track.instruments.size > 0 %} {% assign tem_instr = true %} {% endif %} {% if track.bassline_name or tem_instr %}
  • {% if track.bassline_name %}

    🎼 {{ track.bassline_name }}

    {% endif %} {% if tem_instr %}
      {% for instrument in track.instruments %} {% if instrument.instrument_name %}
    • {% assign display_name = instrument.instrument_name %} {% if display_name contains "audiofileprocessor" and instrument.patterns %} {% assign first_pattern_name = instrument.patterns | map: 'name' | first %} {% if first_pattern_name and first_pattern_name != empty %} {% assign display_name = first_pattern_name | remove: ".ogg" | remove: ".wav" | remove: ".flac" | remove: ".mp3" %} {% elsif instrument.audiofileprocessor.src %} {% assign src_parts = instrument.audiofileprocessor.src | split: '/' %} {% assign file_name = src_parts | last %} {% assign display_name = file_name | remove: ".ogg" | remove: ".wav" | remove: ".flac" | remove: ".mp3" %} {% endif %} {% endif %} {% assign instrument_slug = display_name | replace: ' ', '+' %} {{ display_name }}
      {% comment %} LOOP para múltiplos patterns com rótulo P1, P2, P3. {% endcomment %} {% for pattern in instrument.patterns %} {% assign pattern_steps = pattern.steps %} {% if pattern_steps and pattern_steps.size > 0 %}
      P{{ forloop.index }}: {% comment %} >>> INÍCIO DA LÓGICA DE STEPS MELHORADA <<< Container da grade de steps {% endcomment %}
      {% for step_active in pattern_steps %} {% comment %} Define a cor do step {% endcomment %} {% assign step_color = '#d9d9d9' %} {% comment %} Cor INATIVA (cinza claro) {% endcomment %} {% if step_active == true or step_active == 'true' or step_active == 1 %} {% assign step_color = '#4caf50' %} {% comment %} Cor ATIVA (verde) {% endcomment %} {% endif %} {% comment %} Define o espaçamento (divisão do compasso) {% endcomment %} {% assign step_style = '' %} {% assign step_index_zero_based = forloop.index0 %} {% comment %} --- Calcula o módulo *antes* do 'if' --- {% endcomment %} {% assign remainder = step_index_zero_based | modulo: 4 %} {% if step_index_zero_based > 0 and remainder == 0 %} {% assign step_style = 'margin-left: 3px;' %} {% endif %}
      {% endfor %}
      {% comment %} >>> FIM DA LÓGICA DE STEPS MELHORADA <<< {% endcomment %}
      {% endif %} {% endfor %} {% comment %} Player de áudio e condição de sample ausente {% endcomment %} {% assign sample_src = instrument.audiofileprocessor.src | default: "" | strip %} {% if instrument.audiofileprocessor and sample_src != "" %} {% assign audio_filename_with_path = 'src/samples/' | append: sample_src %}
      {% else %}

      O sample **não foi enviado** 😢

      {% endif %}
    • {% endif %} {% endfor %}
    {% endif %}
  • {% endif %} {% endfor %}
{% endif %}

🛠️ Abra na Criação Colaborativa

{% comment %} CONSTRUÇÃO DA URL CORRIGIDA PARA AMBIENTES DE TESTE: {% endcomment %} {% assign creation_url = '/~jotachina/mmpSearch/creation.html?project=' | append: page.file %} Abrir no MMPCreator

O link abrirá o projeto em uma nova aba para edição.
Arquivo: {{ page.file }}

{% assign embed_url = creation_url | append: '&embed=true' %}