Skip to content

Commit

Permalink
Adjust rast demo
Browse files Browse the repository at this point in the history
  • Loading branch information
infojunkie committed Jun 3, 2024
1 parent fe19f42 commit e38164e
Show file tree
Hide file tree
Showing 9 changed files with 358 additions and 205 deletions.
Binary file added demo/data/rast-tetrachord.mid
Binary file not shown.
85 changes: 78 additions & 7 deletions demo/data/rast-tetrachord.musicxml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
</direction>
<direction placement="above">
<direction-type>
<words>24-TET (Arabic standard tuning)</words>
<words>12-TET (minor)</words>
</direction-type>
</direction>
<note>
Expand All @@ -67,12 +67,12 @@
<note>
<pitch>
<step>E</step>
<alter>-0.5</alter>
<alter>-1</alter>
<octave>4</octave>
</pitch>
<duration>768</duration>
<type>quarter</type>
<accidental>quarter-flat</accidental>
<accidental>flat</accidental>
</note>
<note>
<pitch>
Expand Down Expand Up @@ -117,7 +117,7 @@
<print new-system="yes"/>
<direction placement="above">
<direction-type>
<words>53-TET (Holdrian comma tuning)</words>
<words>24-TET (Arabic standard tuning)</words>
</direction-type>
</direction>
<note>
Expand All @@ -132,7 +132,7 @@
<note>
<pitch>
<step>D</step>
<alter>0.05</alter>
<alter>0</alter>
<octave>4</octave>
</pitch>
<duration>768</duration>
Expand All @@ -141,7 +141,7 @@
<note>
<pitch>
<step>E</step>
<alter>-0.15</alter>
<alter>-0.5</alter>
<octave>4</octave>
</pitch>
<duration>768</duration>
Expand Down Expand Up @@ -191,7 +191,7 @@
<print new-system="yes"/>
<direction placement="above">
<direction-type>
<words>Ederer tuning</words>
<words>53-TET (Holdrian comma tuning)</words>
</direction-type>
</direction>
<note>
Expand Down Expand Up @@ -261,5 +261,76 @@
<bar-style>light-light</bar-style>
</barline>
</measure>
<measure number="7">
<print new-system="yes"/>
<direction placement="above">
<direction-type>
<words>12-TET (major)</words>
</direction-type>
</direction>
<note>
<pitch>
<step>C</step>
<alter>0</alter>
<octave>4</octave>
</pitch>
<duration>768</duration>
<type>quarter</type>
</note>
<note>
<pitch>
<step>D</step>
<octave>4</octave>
</pitch>
<duration>768</duration>
<type>quarter</type>
</note>
<note>
<pitch>
<step>E</step>
<octave>4</octave>
</pitch>
<duration>768</duration>
<type>quarter</type>
</note>
<note>
<pitch>
<step>F</step>
<alter>0</alter>
<octave>4</octave>
</pitch>
<duration>768</duration>
<type>quarter</type>
</note>
</measure>
<measure number="8">
<note>
<pitch>
<step>G</step>
<alter>0</alter>
<octave>4</octave>
</pitch>
<duration>768</duration>
<type>quarter</type>
</note>
<note>
<rest/>
<duration>768</duration>
<type>quarter</type>
</note>
<note>
<rest/>
<duration>768</duration>
<type>quarter</type>
</note>
<note>
<rest/>
<duration>768</duration>
<type>quarter</type>
</note>
<barline location="right">
<bar-style>light-light</bar-style>
</barline>
</measure>
</part>
</score-partwise>
1 change: 1 addition & 0 deletions demo/demo.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@ document.addEventListener('DOMContentLoaded', async () => {
catch {
g_state.params = params;
}
g_state.params['output'] = DEFAULT_OUTPUT; // Too complicated to wait for MIDI output

// Build the UI.
await populateGrooves();
Expand Down
8 changes: 6 additions & 2 deletions dist/musicxml-player.esm.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* musicxml-player v0.16.1
* musicxml-player v0.16.2
* (c) Karim Ratib <[email protected]> (https://github.com/infojunkie)
* Released under the GPL-3.0-only License.
*/
Expand Down Expand Up @@ -12110,6 +12110,10 @@ class WebAudioFontOutput {
if (this._notes.find((note) => Math.abs(note.timestamp - timestamp) < Number.EPSILON)) {
console.warn(`[WebAudioFontOutput] Received a pitch bend for an already scheduled note.`);
}
// Ignore zero pitch bend.
if (event.pitchBend - 8192 === 0) {
return;
}
// Save the current pitch bend value. It will be used at the next noteOn event.
this._pitchBends.push({
channel: event.channel,
Expand All @@ -12124,7 +12128,7 @@ class WebAudioFontOutput {
}

var name = "musicxml-player";
var version = "0.16.1";
var version = "0.16.2";
var description = "A simple JavaScript component that loads and plays MusicXML files in the browser using Web Audio and Web MIDI.";
var main = "dist/musicxml-player.esm.js";
var type = "module";
Expand Down
2 changes: 1 addition & 1 deletion dist/musicxml-player.esm.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/types/WebAudioFontOutput.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e38164e

Please sign in to comment.