[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] MIDIdef Not Responding to Note-Ons



Thank you Patrick. I knew it had to be something incredibly simple. Makes perfect sense.

Warm winter wishes

On Fri, Jan 4, 2019 at 3:30 PM <p.dupuis@xxxxxxxx> wrote:
Hi Lawton,

The solution to your problem is to give your MIDIdef's unique names (or keys). You're creating two MIDIdef's with the same name so one gets overwritten by the other. Try this:

MIDIdef.noteOn(\on, {arg val, num, chan, src; ["NOTE ON", chan, num, val].postln});
MIDIdef.noteOff(\off , {arg val, num, chan, src; ["NOTE OFF", chan, num, val].postln});

Cheers,
Patrick


From: owner-sc-users@xxxxxxxxxxxxxxxx <owner-sc-users@xxxxxxxxxxxxxxxx> on behalf of lawton.g.hall@xxxxxxxxx <lawton.g.hall@xxxxxxxxx>
Sent: January 4, 2019 4:16 PM
To: sc-users@xxxxxxxxxxxxxxxx
Subject: [sc-users] MIDIdef Not Responding to Note-Ons
 
Hello all,

I apologize in advance for asking what's probably a very simple question. I'm new to SC (coming from Max, PD, and Processing) and am working through Eli Fieldsteel's excellent YouTube tutorials.

MIDIdef is not working for me. I am using the following (super simple) code to troubleshoot (after initializing and connecting MIDI): 

MIDIdef.noteOn(\print, {arg val, num, chan, src; ["NOTE ON", chan, num, val].postln});
MIDIdef.noteOff(\print , {arg val, num, chan, src; ["NOTE OFF", chan, num, val].postln});

If I only run the first line (noteOn), everything works as it should (prints noteOn messages). And if I free the MIDIdef and run the second line (noteOff), this works as well (only prints noteOffs). However, if I run both lines SC only prints the noteOff messages and doesn't seem to be receiving the noteOns. It's almost as though MIDIdef.noteOff is somehow cancelling out MIDIdef.noteOn.

I used the freeware MIDI Monitor to check the input from my keyboard and it is indeed sending both note-ons and note-offs as it should.

Obviously this makes it impossible to build a polyphonic synth with an array of note numbers, gates, etc. I feel like I have a pretty good grasp on the MIDIdef idea and how to use it for polyphony but I can't move forward until I figure this out. I suspect it may have something to do with my MIDI keyboard. Here is my relevant system info:

macOS Sierra 10.12.6
27" iMac w 3.4 GHz i5 processor
SuperCollider 3.10.0
M-Audio Oxygen 49 MIDI keyboard connected via USB

Thanks for your patience with such a newbie question. Excited to continue my dive into SC after I figure this out.