On Thu, 2014-09-25 at 22:19 +0200, Andreas Schneider wrote: > Thank you for your quick response. Unfortunately I only understand part > of the scripts. > > Do I need to extend the MIDI-shortcut::controller directive in > denemo.scm in order to query for other MIDI CC messages? That is add > code to check for other values of type? You could do, but if you are going to want to capture NoteOn NoteOff messages you would use d-GetMidi which captures any (4-byte) message.
> > I tried to write a script to just show MIDI events in a dialog, using > pieces from the scripts you provided, but it didn't work. Probably I > have misunderstood something. My try was > (set! midi (d-GetMidi)) > (d-InfoDialog ( midi )) > Do I have to attach the script somehow? d-GetMidi returns a number - the four-byte MIDI message as a 32-bit number - it is rather primitive, so you would need (d-InfoDialog (number->string (d-GetMidi))) but there is a procedure "disp" inside denemo for just looking at values: (disp "midi got is " (d-GetMidi) "\n\n") would print out on the console (once a MIDI signal was received). > > If the above works, I can extend it to some shortcuts. For example, I > want to use the trigger pads to set the note duration. To this end, I > have to check MIDI channel and pitch, and call the built-in function > (which I guess to find out which command it is, use the Notes/Rests menu - find the command you want then right click to get the command name, and put d- in front of it to get the scheme procedure name. > to be (d-Append1) etc.). Do I also have to prevent the > MIDI event to be further processed, so that no note is inserted in the > score? On the contrary if you want further processing you have to do something (I think perhaps d-PutMidi) > > How can I get MMC (MIDI Machine Control) events? You will need to look up the documentation to find out what these are as a sequence of bytes. I may have only intercepted 4-byte MIDI messages at the moment, but that is easily alterable. > > A very comfortable way would be to be able to assign MIDI events in the > command center similar to PC keyboard shortcuts. Well, as a first move, if you are going to work on this, I will extend d-GetMidi to ask for the MIDI message is an easier to use form (a list of bytes would be easy to do). I didn't pursue this myself because it's not so clear to me that it is a good way to go - you can have more than one usb pc-keyboard attached, so you could have one specifically for entering the commands you want mounted right over your MIDI-keyboard. The keys on a pc-keyboard are better for this than the squashy piano keys of a controller. But I have wondered about this myself. I don't do enough editing of music (as opposed to sheer music-entry) to judge. (And I have only a very basic controller). Let me know if you need any help. Richard _______________________________________________ Denemo-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/denemo-devel
