I am using the code below to play around with scamp and reaper.
Using Tobias Erichsen’s loopmidi I set up a virtual midi channel between the scamp code and the reaper daw. It works as expected except I get a continuous stream of warnings as shown below:
from scamp import *
from collections import namedtuple
s = Session()
s.print_available_midi_output_devices()
s.print_available_midi_input_devices()
piano = s.new_midi_part("piano", midi_output_device=3, num_channels=15)
# dictionary mapping keys that are down to the NoteHandles used to manipulate them.
notes_started = {}
def midi_callback(midi_message):
code, pitch, volume = midi_message
if volume > 0 and 144 <= code <= 159:
notes_started[pitch] = piano.start_note(pitch + 7, volume/127)
elif (volume == 0 and 144 <= code <= 159 or 128 <= code <= 143) and pitch in notes_started:
notes_started[pitch].end()
s.register_midi_listener(3, midi_callback)
s.wait_forever()
WARNING:root:Tried to end a note that was never started!
WARNING:root:Tried to end a note that was never started!
WARNING:root:Tried to end a note that was never started!
WARNING:root:Tried to end a note that was never started!
WARNING:root:Tried to end a note that was never started!
WARNING:root:Tried to end a note that was never started!
WARNING:root:Tried to end a note that was never started!
WARNING:root:Tried to end a note that was never started!
WARNING:root:Tried to end a note that was never started!
WARNING:root:Tried to end a note that was never started!
Any idea why I am seeing this message?