Compare commits
3 Commits
f50bd236ca
...
e6ed178aac
| Author | SHA1 | Date |
|---|---|---|
|
|
e6ed178aac | |
|
|
10b8111517 | |
|
|
9de15ba9f8 |
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
31
notes.txt
31
notes.txt
|
|
@ -1,31 +0,0 @@
|
||||||
stop zooming issue - resize rules
|
|
||||||
mishka gonna send an x icon for the back behaviour
|
|
||||||
look at memory leak??
|
|
||||||
make the sound and menu icons part of an 'app bar' along with the conductor logo
|
|
||||||
make the mid size the default size but double check the size on the phone isnt too small
|
|
||||||
refactor when it's all done
|
|
||||||
format the key as per the pdf
|
|
||||||
sort out the title size
|
|
||||||
sort out the blitzortung connection issue
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
make the text max size smaller
|
|
||||||
|
|
||||||
about page make title smaller
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
lOOK AT SPACING BETWEEN THE TITLE AND STAVES AND THEN MAYBE ALSO THE STAVE SPACING
|
|
||||||
|
|
||||||
TRY BOTH THE SVG RENDER AND THE RASTER RENDERING APPROACH...
|
|
||||||
|
|
||||||
SCROLL BAR MUST GO (VERTICAL)
|
|
||||||
|
|
||||||
Remove all passwords and google accounts from laptop.
|
|
||||||
|
|
||||||
Ensure it boots into landscape mode
|
|
||||||
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
placeIcon method:
|
|
||||||
Now img is an <img> element - does it have a img.naturalHeight/Width property?
|
|
||||||
Check because we are using these values to draw the img.
|
|
||||||
|
|
||||||
What is the sheetWindow.offsetHeight? - This is probably okay but take a look.
|
|
||||||
|
|
||||||
Moving forward:
|
|
||||||
We need to measure the stavewrapper and place the icons using an offset factor based on the stave number.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -44,6 +44,8 @@ export async function loadInstruments() {
|
||||||
const instruments = {};
|
const instruments = {};
|
||||||
|
|
||||||
for (const [instrument, config] of Object.entries(instrumentsConfig)) {
|
for (const [instrument, config] of Object.entries(instrumentsConfig)) {
|
||||||
|
const numSamples = config.filenames.length;
|
||||||
|
|
||||||
const svgText = await fetchSvgText(
|
const svgText = await fetchSvgText(
|
||||||
`${config.directory}/${config.image.filename}`
|
`${config.directory}/${config.image.filename}`
|
||||||
);
|
);
|
||||||
|
|
@ -56,6 +58,7 @@ export async function loadInstruments() {
|
||||||
);
|
);
|
||||||
|
|
||||||
instruments[instrument] = {
|
instruments[instrument] = {
|
||||||
|
numSamples: numSamples,
|
||||||
image: img,
|
image: img,
|
||||||
yPos: config.image.yPos,
|
yPos: config.image.yPos,
|
||||||
midiChannelName: config["midi-channel-name"],
|
midiChannelName: config["midi-channel-name"],
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
export async function sendMidiMessage(midiChannelName, sampleNumber ) {
|
export async function sendMidiMessage(midiChannelName, sampleNumber) {
|
||||||
try {
|
try {
|
||||||
const midiAccess = await navigator.requestMIDIAccess();
|
const midiAccess = await navigator.requestMIDIAccess();
|
||||||
const availableMidiOutputs = midiAccess.outputs.values();
|
const availableMidiOutputs = midiAccess.outputs.values();
|
||||||
|
|
@ -9,8 +9,8 @@ export async function sendMidiMessage(midiChannelName, sampleNumber ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( const availableMidiOutput of availableMidiOutputs){
|
for (const availableMidiOutput of availableMidiOutputs) {
|
||||||
if (availableMidiOutput.name === midiChannelName){
|
if (availableMidiOutput.name === midiChannelName) {
|
||||||
midiOut = availableMidiOutput;
|
midiOut = availableMidiOutput;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -23,7 +23,6 @@ export async function sendMidiMessage(midiChannelName, sampleNumber ) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
midiOut.send([0x80, 36 + sampleNumber, 0]); // Stop Note
|
midiOut.send([0x80, 36 + sampleNumber, 0]); // Stop Note
|
||||||
}, 500);
|
}, 500);
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Failed to get MIDI access:", error);
|
console.error("Failed to get MIDI access:", error);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Conductor } from "./conductor";
|
import { Conductor } from "./conductor.js";
|
||||||
|
|
||||||
export class Renderer {
|
export class Renderer {
|
||||||
timeIndicator;
|
timeIndicator;
|
||||||
|
|
|
||||||
|
|
@ -10,18 +10,22 @@ document.addEventListener("DOMContentLoaded", async () => {
|
||||||
await conductor.init();
|
await conductor.init();
|
||||||
const dataStream = new DataStream();
|
const dataStream = new DataStream();
|
||||||
const instruments = await conductor.instruments;
|
const instruments = await conductor.instruments;
|
||||||
console.log(instruments);
|
|
||||||
|
|
||||||
const renderer = new Renderer();
|
const renderer = new Renderer();
|
||||||
|
|
||||||
dataStream.addEventListener("strike", () => {
|
dataStream.addEventListener("strike", () => {
|
||||||
|
//** select instrument */
|
||||||
const keys = Object.keys(instruments);
|
const keys = Object.keys(instruments);
|
||||||
const randomIndex = Math.floor(Math.random() * keys.length);
|
const randomIndex = Math.floor(Math.random() * keys.length);
|
||||||
const selectedInstrument = instruments[keys[randomIndex]];
|
const selectedInstrument = instruments[keys[randomIndex]];
|
||||||
|
|
||||||
renderer.placeIcon(selectedInstrument);
|
//** select sample */
|
||||||
|
const numSamples = selectedInstrument.numSamples;
|
||||||
|
const randomSampleNumber = Math.floor(Math.random() * numSamples);
|
||||||
|
|
||||||
// **** add midi trigger +++++++++ ///
|
renderer.placeIcon(selectedInstrument);
|
||||||
|
sendMidiMessage(selectedInstrument.midiChannelName, randomSampleNumber + 1);
|
||||||
|
console.log(selectedInstrument.midiChannelName, randomSampleNumber + 1);
|
||||||
});
|
});
|
||||||
|
|
||||||
dataStream.init();
|
dataStream.init();
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { BrowserSocketFactory, Client } from "./blitz";
|
import { BrowserSocketFactory, Client } from "./blitz.js";
|
||||||
|
|
||||||
export class DataStream extends EventTarget {
|
export class DataStream extends EventTarget {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ html {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 20vh;
|
height: 10vh;
|
||||||
background-color: rgb(24,24,24);
|
background-color: rgb(24,24,24);
|
||||||
padding-top: 30px;
|
padding-top: 30px;
|
||||||
padding-bottom: 20px;
|
padding-bottom: 20px;
|
||||||
|
|
@ -214,6 +214,7 @@ html {
|
||||||
top: 0;
|
top: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
width: 2px;
|
width: 2px;
|
||||||
|
height: 82%;
|
||||||
background-color: red;
|
background-color: red;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
animation: moveRight 10s linear infinite;
|
animation: moveRight 10s linear infinite;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue