Skip to content

Commit

Permalink
Removed test.py from repo. Updated docs for rep
Browse files Browse the repository at this point in the history
  • Loading branch information
Buddy28911 committed May 5, 2021
1 parent e1bccf2 commit 6465207
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 352 deletions.
7 changes: 7 additions & 0 deletions representation.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,13 @@ def get_new_pitch(prev_pitch: int, ascend_or_descend: int, scale: list) -> int:


def get_new_note_pitch(prev_pitch: int, ascend_or_descend: int, scale: list) -> int:
"""
Helper function for next_note(). Generates the next note's pitch by considering the previous note and ascend_or_descend.
Verifies that the new pitch within the bounds of the treble clef.
Input: prev_pitch: int, the previous pitch value | ascend_or_descend: int, dictates if the pitch is shifted up or down (0 = descend, 1 = ascend)
scale: list, the note pitches available in the current scale
Output: new_pitch: int, the pitch of the new note
"""

new_pitch = get_new_pitch(prev_pitch, ascend_or_descend, scale)
while MIDI_TO_NOTE[new_pitch] not in NOTE_RANGE:
Expand Down
352 changes: 0 additions & 352 deletions test.py

This file was deleted.

0 comments on commit 6465207

Please sign in to comment.