Posted by ed (ed), 23 March 2005Hello
I wonder if someone can help me
I'm trying to send MIDI sysex data to a vintage Oberheim synthesizer using Win32::MIDI.
I've successfully manged to send notes via MIDI to it and that works fine but I'm now trying to send sysex and I'm not really understanding the documentation that comes with this module.
Have a look at this page:
- you'll see a method called value_of in there where NAME can be 'special'. That's the one I'm interested in. OPT 1 should be a value between 1 and 16, but I'm not at all sure how I'm supposed to know what to enter here. And what does it mean when it says that a hash is returned if nothing is entered for OPT 1 ?
Any help with this would be greatly appreciated.
ps - the kind of message that I'm expecting to send is something like this:
This is a series of HEX values - but I can't work out how Win32::MIDI can sebd this.
Posted by admin (Graham Ellis), 24 March 2005Purely from reading this description, I think that value_of can take any one of the the following parameters, which should be written in quotes in the call (i.e. they are strings):
note, velocity, cc, channel, channel_aftertouch, polyphonic, pitch_wheel, special, note_name_map, null.
In some cases, one or two extra parameters may or must be given - the documentation desribes them, and they differ depending on what you specify as the first parameter. In the case of 'special', you can give the name of a special MIDI command such as SYSEX and it will return the byte number associated with that command; if you don't know all the commands, then you'll get back a structure (a non ordered collection or hash) which tells what they're all called and what theire values are.
I don't have the module (And I'm not on a Win32 machine at present to experiment with it), by the following code snippet (untested) might help by printing a table ...
where $yourobj is a Win32::MIDI object. (And this is an example of returning a hash)
Posted by ed (ed), 7 April 2005Thanks Graham
In the end (and at great cost to my marriage and sanity ) I managed to install Win32api::MIDI instead.
I wanted to ask you about tcl/tk. Now that I've got my perl mod set up and happily sending out sysex data to my synth, I was wanting to build a GUI for it.
I need to make some on-screen controls where if you turn a knob 5 clicks, then Perl will send five lines of data. I heard from a friend that tcl/tk would integrate very well with Perl and be able to provide this. What do you think ?
I had originally intended to make a Flash GUI that sent vars to Perl via a query string - but this is far from ideal as it involves either opening a Perl file repeatedly or sending 'packets' of data to it.
Any advice very gratefully appreciated.
Posted by admin (Graham Ellis), 8 April 2005Tcl is another complete language and Tk is the GUI that sits on top of it / goes with it. Not everyone who uses Tcl also uses Tk, but there's sufficient interest for us to offer a 2 day Tk course that follow on from the three days on Tcl.
Now - interesting - Tk can also be called up and run directly from Perl as well as from Tcl. It's not got the same number of users - it's a niche use - but it does work pretty well. I suspect that it's the solution that would be best for you. There's links to three short code examples on our Perl/Tk training module page and we have 4 books on the subject too.
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: firstname.lastname@example.org • WEB: http://www.wellho.net • SKYPE: wellho