Skip to content

Commit

Permalink
Note style customization in Cambiare.
Browse files Browse the repository at this point in the history
  • Loading branch information
PoneyClairDeLune committed Sep 20, 2023
1 parent 937f904 commit ba5991d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/cambiare_demo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ self.gDemo = async function ({file, id, artist, title}) {
};
self.gStyle = async function (type) {
visualizer.style = type;
Alpine.store("noteStyle", type);
};

const propsMid = JSON.parse('{"extensions":[".mid",".MID",".kar",".KAR",".syx",".SYX",".s7e",".S7E",".mdat",".MDAT"],"startIn":"music","id":"midiOpener","description":"Open a MIDI file"}'),
Expand Down
6 changes: 5 additions & 1 deletion test/cambiare.htm
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
</template>
<div class="column"></div>
</div>
<div class="columns is-multiline is-mobile is-vcentered" x-data="{ranges:[['port1','16ch'],['compact','Compact'],['port2','32ch'],['port4','64ch']],ports:[0,1,2,3,4,5,6,7],letters:'ABCDEFGH',max:8,size:{port1:1,compact:1,port2:2,port4:4}}">
<div class="columns is-multiline is-mobile is-vcentered" x-data="{ranges:[['port1','16ch'],['compact','Compact'],['port2','32ch'],['port4','64ch']],ports:[0,1,2,3,4,5,6,7],letters:'ABCDEFGH',max:8,size:{port1:1,compact:1,port2:2,port4:4},styles:[['block','Block'],['comb','Comb'],['piano','Piano'],['line','Line']]}">
<div class="column column-option"><b>Display mode</b></div>
<template x-for="range in ranges">
<div class="column column-option column-button" @click="gRange(range[0])" x-text="range[1]" :active="($store.showRange||'port1')==range[0]?'true':'false'"></div>
Expand All @@ -43,6 +43,10 @@
<template x-for="port in ports">
<div class="column column-option column-button" @click="gPort(port)" x-text="letters[port]" :active="($store.startPort||0)==port?'true':'false'"></div>
</template>
<div class="column column-option"><b>Note style</b></div>
<template x-for="style in styles">
<div class="column column-option column-button" @click="gStyle(style[0])" x-text="style[1]" :active="($store.noteStyle||'block')==style[0]?'true':'false'"></div>
</template>
<div class="column"></div>
</div>
<div class="columns is-multiline is-mobile is-vcentered">
Expand Down

0 comments on commit ba5991d

Please sign in to comment.