diff --git a/_config.yml b/_config.yml index 4a23d79e..35eac180 100644 --- a/_config.yml +++ b/_config.yml @@ -4,8 +4,8 @@ description: >- # this means to ignore newlines until "baseurl:" Write an awesome description for your new site here. You can edit this line in _config.yml. It will appear in your document head meta (for Google search results) and in your feed.xml site description. -baseurl: "/mmpSearch/" # the subpath of your site, e.g. /blog -url: "https://alice.ufsj.edu.br" # the base hostname & protocol for your site, e.g. http://example.com +baseurl: "/~jotachina/mmpSearch/" # the subpath of your site, e.g. /blog +url: "https://alice.ufsj.edu.br/" # the base hostname & protocol for your site, e.g. http://example.com theme: alice diff --git a/_layouts/projetos.html b/_layouts/projetos.html index a40af5fb..49731bd6 100644 --- a/_layouts/projetos.html +++ b/_layouts/projetos.html @@ -8,10 +8,8 @@ title: "{{ page.file }}"
-

{{ page.file }}

- {% if page.file or page.bpm %}
@@ -29,114 +27,161 @@ title: "{{ page.file }}"
{% endif %} - - {% if page.tags %} - {% assign tags_vazias = true %} - {% for categoria in page.tags %} - {% if categoria[1].size > 0 %} - {% assign tags_vazias = false %} - {% endif %} - {% endfor %} - - {% unless tags_vazias %} -
- - {% assign audio_file = '/mmp/wav/' | append: page.file | append: '.wav' %} - - - {% if audio_file %} -
- -
- {% endif %} - -

🏷️ Tags

- {% for categoria in page.tags %} - {% if 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 instrument_slug = instrument.instrument_name | replace: ' ', '+' %} - - {{ instrument.instrument_name }} - - - {% if instrument.audiofileprocessor and instrument.audiofileprocessor.src %} - -
      - -
      - {% endif %} -
    • - {% endif %} - {% endfor %} -
    - {% endif %} -
  • +
    + +
    + + {% if page.tags %} + {% assign tags_vazias = true %} + {% for categoria in page.tags %} + {% if categoria[1].size > 0 %} + {% assign tags_vazias = false %} {% endif %} {% endfor %} -
-
-
- {% endif %} -
+ + {% unless tags_vazias %} +
+ {% assign audio_file = '/mmp/wav/' | append: page.file | append: '.wav' %} + + {% if audio_file %} +
+ +
+ {% endif %} + +

🏷️ Tags

+ {% for categoria in page.tags %} + {% if 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 instrument_slug = instrument.instrument_name | replace: ' ', '+' %} + + {{ instrument.instrument_name }} + + + {% if instrument.audiofileprocessor and instrument.audiofileprocessor.src %} + {% assign audio_filename_with_path = 'src/samples/' | append: instrument.audiofileprocessor.src %} +
      + +
      + {% endif %} +
    • + {% endif %} + {% endfor %} +
    + {% endif %} +
  • + {% endif %} + {% endfor %} +
+
+
+ {% endif %} +
+
+

🛠️ Abra na Criação Colaborativa

+ + {% comment %} + CONSTRUÇÃO DA URL: + 1. Usa o arquivo fonte (`page.file`) como parâmetro `project`. + 2. Assume que a plataforma de criação está em `/creations/`. + 3. Abre em uma nova aba (`target="_blank"`). + {% endcomment %} + {% assign creation_url = '/creations/?project=' | append: page.file | relative_url %} + + + + Abrir no MMPCreator + + +

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

+ +
+

Prévia (Embed)

+ {% comment %} + A prévia embutida é opcional e pode ser um pouco pesada. + Ajuste o caminho da URL e o estilo (altura) conforme necessário. + {% endcomment %} + +
+
+
+
- + \ No newline at end of file diff --git a/assets/js/creations/main.js b/assets/js/creations/main.js index cc801841..5c9d5728 100644 --- a/assets/js/creations/main.js +++ b/assets/js/creations/main.js @@ -25,6 +25,22 @@ import { sendAction, joinRoom, setUserName } from "./socket.js"; const ROOM_NAME = new URLSearchParams(window.location.search).get("room"); window.ROOM_NAME = ROOM_NAME; +const PROJECT_NAME = new URLSearchParams(window.location.search).get("project"); + +if (PROJECT_NAME) { + // O nome do projeto deve corresponder ao arquivo no servidor, por ex: "mmp/nome-do-seu-projeto-salvo.mmp" + // O arquivo 'file.js' já espera que loadProjectFromServer receba apenas o nome + // do arquivo dentro da pasta 'mmp/' (ex: 'nome-do-projeto.mmp'). + console.log(`[MAIN] Carregando projeto do servidor: ${PROJECT_NAME}`); + // Adicione a extensão se ela não estiver no link + const filename = PROJECT_NAME.endsWith('.mmp') || PROJECT_NAME.endsWith('.mmpz') + ? PROJECT_NAME + : `${PROJECT_NAME}.mmp`; + + // Chama a função de file.js para carregar (que já envia a ação 'LOAD_PROJECT') + loadProjectFromServer(filename); +} + // ✅ NOVO: se tem sala na URL, entra já na sala (independe do áudio) if (ROOM_NAME) { diff --git a/assets/js/creations/server/data/2025-11-04_16-17-37_teste.log b/assets/js/creations/server/data/2025-11-04_16-17-37_teste.log index 7220d909..62cac98b 100644 --- a/assets/js/creations/server/data/2025-11-04_16-17-37_teste.log +++ b/assets/js/creations/server/data/2025-11-04_16-17-37_teste.log @@ -66,3 +66,103 @@ {"level":30,"time":1762284481433,"pid":2531756,"hostname":"ubuntu","timestamp":1762284481433,"socketId":"QS0MW7pSaRn1ksXiAAAP","action":{"type":"ADD_TRACK","__token":"15","__senderId":"QS0MW7pSaRn1ksXiAAAP","__senderName":"Alicer-QS0M"},"msg":"action_received"} {"level":30,"time":1762284485024,"pid":2531756,"hostname":"ubuntu","timestamp":1762284485024,"socketId":"Cu5hby5GD-b0r-1RAAAX","action":{"type":"STOP_PLAYBACK","__token":"11","__senderId":"Cu5hby5GD-b0r-1RAAAX","__senderName":"Alicer-Cu5h","__syncMode":"global"},"msg":"action_received"} {"level":30,"time":1762284487153,"pid":2531756,"hostname":"ubuntu","timestamp":1762284487153,"socketId":"Cu5hby5GD-b0r-1RAAAX","action":{"type":"TOGGLE_PLAYBACK","__token":"12","__senderId":"Cu5hby5GD-b0r-1RAAAX","__senderName":"Alicer-Cu5h","scheduleAtServerMs":1762284487302,"__syncMode":"global"},"msg":"action_received"} +{"level":30,"time":1762284840368,"pid":2531756,"hostname":"ubuntu","timestamp":1762284840368,"socketId":"QS0MW7pSaRn1ksXiAAAP","action":{"type":"STOP_PLAYBACK","__token":"16","__senderId":"QS0MW7pSaRn1ksXiAAAP","__senderName":"Alicer-QS0M","__syncMode":"global"},"msg":"action_received"} +{"level":30,"time":1762284916197,"pid":2531756,"hostname":"ubuntu","timestamp":1762284916197,"socketId":"QS0MW7pSaRn1ksXiAAAP","action":{"type":"LOAD_PROJECT","xml":"\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Volume\" len=\"9216\" mute=\"0\">\n