--- 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 %} {% if track.instruments and track.instruments.size > 0 %}
  • {{ track.bassline_name }}
      {% for instrument in track.instruments %} {% assign plugin_name = instrument.instrument_name | downcase %} {% assign is_sample = false %} {% assign sample_src = "" %} {% if plugin_name == 'audiofileprocessor' or instrument.audiofileprocessor %} {% assign is_sample = true %} {% assign sample_src = instrument.audiofileprocessor.src | default: "" | strip %} {% endif %} {% assign should_open = false %} {% if is_sample == false %} {% assign should_open = true %} {% elsif is_sample == true and sample_src != "" %} {% assign should_open = true %} {% endif %}
    • {% assign display_name = instrument.instrument_name %} {% if is_sample %} {% 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 %} {% endif %} {% assign instrument_slug = display_name | replace: ' ', '+' %} {{ display_name }} {% unless is_sample %} (Synth 🎹){% endunless %}
      {% for pattern in instrument.patterns %} {% assign pattern_steps = pattern.steps %} {% if pattern_steps and pattern_steps.size > 0 %}
      {% assign bassline_index = forloop.index | minus: 1 %} {{ track.bassline_name }}{{ bassline_index }}:
      {% assign total_steps = pattern_steps.size %} {% assign chunk_size = 4 %} {% assign num_chunks = total_steps | divided_by: chunk_size %} {% assign remainder = total_steps | modulo: chunk_size %} {% if remainder > 0 %}{% assign num_chunks = num_chunks | plus: 1 %}{% endif %} {% for i in (0..num_chunks) %} {% assign start_index = i | times: chunk_size %} {% assign current_chunk_array = pattern_steps | slice: start_index, chunk_size %} {% if current_chunk_array.size > 0 %} {% assign chunk_string = "" %} {% for step in current_chunk_array %} {% if step == true or step == 'true' or step == 1 %}{% assign chunk_string = chunk_string | append: '1' %}{% else %}{% assign chunk_string = chunk_string | append: '0' %}{% endif %} {% endfor %} {% assign search_url = '/pattern/?p=' | append: chunk_string | relative_url %}
      {% for step_active in current_chunk_array %} {% assign step_color = '#d9d9d9' %} {% if step_active == true or step_active == 'true' or step_active == 1 %} {% assign step_color = '#4caf50' %} {% endif %}
      {% endfor %}
      {% endif %} {% endfor %}
      {% endif %} {% endfor %}
      {% if is_sample %} {% if sample_src != "" %} {% assign audio_filename_with_path = 'src/samples/' | append: sample_src %} {% else %}

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

      {% endif %} {% else %} Via Web Audio API {% endif %}
    • {% endfor %}
  • {% elsif track.instrument_name %} {% assign instrument = track %}
      {% assign plugin_name = instrument.instrument_name | downcase %} {% assign is_sample = false %} {% assign sample_src = "" %} {% if plugin_name == 'audiofileprocessor' or instrument.audiofileprocessor %} {% assign is_sample = true %} {% assign sample_src = instrument.audiofileprocessor.src | default: "" | strip %} {% endif %} {% assign should_open = false %} {% if is_sample == false %} {% assign should_open = true %} {% elsif is_sample == true and sample_src != "" %} {% assign should_open = true %} {% endif %}
    • {% assign display_name = instrument.instrument_name %} {% assign instrument_slug = display_name | replace: ' ', '+' %} {{ display_name }} {% unless is_sample %} (Synth 🎹){% endunless %}
      {% if instrument.patterns %} {% for pattern in instrument.patterns %} {% assign pattern_steps = pattern.steps %} {% if pattern_steps and pattern_steps.size > 0 %}
      {% assign total_steps = pattern_steps.size %} {% assign chunk_size = 4 %} {% assign num_chunks = total_steps | divided_by: chunk_size %} {% assign remainder = total_steps | modulo: chunk_size %} {% if remainder > 0 %}{% assign num_chunks = num_chunks | plus: 1 %}{% endif %} {% for i in (0..num_chunks) %} {% assign start_index = i | times: chunk_size %} {% assign current_chunk_array = pattern_steps | slice: start_index, chunk_size %} {% if current_chunk_array.size > 0 %} {% assign chunk_string = "" %} {% for step in current_chunk_array %} {% if step == true or step == 'true' or step == 1 %}{% assign chunk_string = chunk_string | append: '1' %}{% else %}{% assign chunk_string = chunk_string | append: '0' %}{% endif %} {% endfor %} {% assign search_url = '/pattern/?p=' | append: chunk_string | relative_url %}
      {% for step_active in current_chunk_array %} {% assign step_color = '#d9d9d9' %} {% if step_active == true or step_active == 'true' or step_active == 1 %} {% assign step_color = '#4caf50' %} {% endif %}
      {% endfor %}
      {% endif %} {% endfor %}
      {% endif %} {% endfor %} {% endif %}
      {% if is_sample %} {% if sample_src != "" %} {% assign audio_filename_with_path = 'src/samples/' | append: sample_src %} {% else %}

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

      {% endif %} {% else %} Via Web Audio API {% endif %}
    {% endif %} {% endfor %}
{% endif %}

🛠️ Abra na Criação Colaborativa

{% assign creation_url = '/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' %}