Tyrrell Posted October 12, 2016 Share Posted October 12, 2016 I'm trying to trigger a long sustained note from a sustain pedal. I'm using Logic's transformer to convert the live sustain pedal data to note on data so that I may play a single note with my foot. However, I can't figure out how to send 'note off' data when the sustain pedal lifts (sends '0') so I've created another transformer in series that sends velocity '0' when the sustain pedal is lifted. But this isn't really stopping the note - it's just sending another note that's so quiet it's basically off. Is there not a way that the sustain pedal can be transformed to send both note on and off messages? Quote Link to comment Share on other sites More sharing options...
rAC Posted October 12, 2016 Share Posted October 12, 2016 Not sure if it can be done in Logic - but expect so. Try mapping your sustain pedal to both note on and note off eg CC64 >= 64 then nOte on as per table 1 at https://www.midi.org/specifications/item/table-1-summary-of-midi-message if CC64<64 then note off as per same table. Quote Link to comment Share on other sites More sharing options...
Fleabag Posted October 12, 2016 Share Posted October 12, 2016 Is there not a way that the sustain pedal can be transformed to send both note on and off messages? I think it can probably be done using a MIDI FX Plugin script. I can write some code if you're interested. Fleabag Quote Link to comment Share on other sites More sharing options...
Tyrrell Posted October 13, 2016 Author Share Posted October 13, 2016 Thanks to both responses! I've just had a look at the midi scripter and that's probably the way to go - plus I think it would be easier to switch on and off I think? I would love a script for that but I don't want you to go to any trouble! Quote Link to comment Share on other sites More sharing options...
Solution Eric Cardenas Posted October 13, 2016 Solution Share Posted October 13, 2016 Hi Tyrell. See if this works for you: //------------------------------------------------------------------------------ // Auth: Eric Cardenas // dCre: 2016-10-13 11:38 // dMod: 2016-10-13 11:58 // Appl: Logic Pro X // Task: Converts Sustain Pedal to Note. // Tags: JavaScript, Logic //------------------------------------------------------------------------------ const TITLE = "EC - Sustain to Note v 1.0"; const AUTHOR = "Script by Eric Cardenas"; const NOTES = MIDI._noteNames; //------------------------------------------------------------------------------ function HandleMIDI(e) { if (e instanceof ControlChange && e.number == 64 && e.value > 63) { var bordune = new NoteOn; bordune.pitch = GetParameter("Note"); bordune.velocity = GetParameter("Velocity"); bordune.send(); } else if (e instanceof ControlChange && e.number == 64 && e.value < 64) { var bOff = new NoteOff; bOff.pitch = GetParameter("Note"); bOff.send(); } else { e.send(); } } function ParameterChanged(p, v) { if (p == 1 ) { MIDI.allNotesOff(); } } var PluginParameters = [{ name: TITLE, type: "text" }, { name: "Note", type: "menu", valueStrings: NOTES, defaultValue: 36 }, { name: "Velocity", type: "lin", numberOfSteps: 127, minValue: 0, maxValue: 127, defaultValue: 90 }, { name: AUTHOR, type: "text" }]; Quote Link to comment Share on other sites More sharing options...
Fleabag Posted October 13, 2016 Share Posted October 13, 2016 Eric's code looks pretty similar to what I would have written, looks like you should be good to go! Thanks for sharing, Eric. ps I'm a software developer by trade, I don't mind writing scripts for fun stuff like Logic Fleabag Quote Link to comment Share on other sites More sharing options...
Tyrrell Posted October 17, 2016 Author Share Posted October 17, 2016 Absolutely brilliant, Eric - many, many thanks. It's channel dependent, which is great so I can use it as a sustain pedal sometimes and a note when needed. BTW, this is for performing a theatre show where I need many live triggers at once and the easiest way was to use a foot with the sustain pedal. A midi foot controller is the obvious next 'step'... Many thanks again - I'm going to be getting into the scripter in future. Quote Link to comment Share on other sites More sharing options...
Eric Cardenas Posted October 17, 2016 Share Posted October 17, 2016 I'm glad that worked for you. Good luck with your show. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.