Skip to content

Commit

Permalink
fix pitch range again
Browse files Browse the repository at this point in the history
  • Loading branch information
spessasus committed Jul 28, 2024
1 parent fa9fd38 commit 900cd17
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/website/js/renderer/compute_note_positions.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,6 @@ export function computeNotePositions(renderImmediately=false)
const correctedNote = note.midiNote - this.keyRange.min;
let noteX = keyStep * correctedNote + NOTE_MARGIN;

if(this.showVisualPitch)
{
noteX += pitchBendXShift[channelNumder];
}

let finalX, finalY, finalWidth, finalHeight;
if(this.sideways)
{
Expand Down Expand Up @@ -140,7 +135,9 @@ export function computeNotePositions(renderImmediately=false)
// save the notes to draw
// determine if notes are active or not (i.e. currently playing)
// not active notes
if ((note.start > currentSeqTime || noteSum < currentSeqTime)) {
if ((note.start > currentSeqTime || noteSum < currentSeqTime))
{
// this note is not presed
if(this.sideways)
{
if(this.drawActiveNotes)
Expand Down Expand Up @@ -174,12 +171,21 @@ export function computeNotePositions(renderImmediately=false)
}
else
{
// this note is pressed
if(this.sideways)
{
if(this.showVisualPitch)
{
finalY += pitchBendXShift[channelNumder];
}
color = this.sidewaysChannelColors[channelNumder];
}
else
{
if(this.showVisualPitch)
{
finalX += pitchBendXShift[channelNumder];
}
color = this.channelColors[channelNumder];
}
// determine for how long the note has been pressed
Expand Down

0 comments on commit 900cd17

Please sign in to comment.