Jump to content

Can I trigger a chord from a cc control change message?


3rddawn

Recommended Posts

Hi

I play guitar on a song but at a certain point I want to kick off a chord on my keyboard without having to play it by hand. I have an iRig Blueboard in CC mode (for other patch needs), and wonder if I can trigger a note from a cc message?

Any ideas?

Thanks

3rddawn

Link to comment
Share on other sites

There aren't a lot of good guides on it unfortunately. Start with this and enjoy the process of learning. There is some information about Scripter in the LogicPro Effects guide (from help menu)

 

var note = new NoteOn;
note.channel = 1;
note.velocity = 100;

var CC_NUM=1;

function HandleMIDI(event) {
   if(event instanceof ControlChange && event.number == CC_NUM && event.value > 0) {
        note.pitch = MIDI.noteNumber("C3");
        note.send();
        note.pitch = MIDI.noteNumber("E3");
        note.send();
        note.pitch = MIDI.noteNumber("G3");
        note.send();
   }
}
Link to comment
Share on other sites

With regards to the above, you will also need to include code to send the NoteOff message. I don't haver time to finish that for you today, so start with that and learn a bit about scripter and feel free to ask questions. Might be something like this following bit, but you have to specify the chord duration somehow...

 

Anyway, this is a starting point for you to tweak it and learn about Scripter. Good luck

 

var note = new NoteOn;
note.channel = 1;
note.velocity = 100;

var CC_NUM=1;

function HandleMIDI(event) {

   if(event instanceof ControlChange 
               && event.number == CC_NUM 
               && event.value > 0) {
               
        PlayFullNote("C3");
        PlayFullNote("E3");
        PlayFullNote("G3");         
    }
}

function PlayFullNote(pitchname) {
   var sav = note.velocity;
   note.pitch = MIDI.noteNumber(pitchname);
   note.send();
   note.velocity = 0;
   note.sendAfterMilliseconds(1000);
   note.velocity = sav;
}
Link to comment
Share on other sites

There might be other ways to accomplish what you want to do in MainStage without Scripter, BTW. For example, there is a built in midiFX plugin that can turn a single note into a chord. But since you want to convert a CC message to NoteOn/NoteOff... I am not sure if there is a midi plugin already that can do that, other than Scripter, which can obviously do it. But if you explore the midiFX plugins that are available you might figure out a way to do that, without having to use Scripter...I'm not entirely sure, I tend to just use scripter for everything because I know it now, but it took a while to learn, and I have a degree in Computer Science...so...
Link to comment
Share on other sites

Thanks - yes I'm all set up to use Chord then Arp then Chord again to play the exact sequence, it's just something to trigger it off that I need, so will look into scripter :)

I don't have a degree in comp sci but I have been an information analyst, so I'm used to programming languages (SQL mainly), VB, VBA, so should be able to find my way through to a solution ... if I can find the time!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...