Hello,
I'm suggesting two new DOS handlers: an USB joystick handler and a MIDI handler. They would provide easy access to joysticks and MIDI devices from any programming language.
Joystick and MIDI handler
Joystick and MIDI handler
- Janne Peräaho
-
- Posts: 314
- Joined: Mon May 14, 2012 10:26 pm
- Location: 日本千葉県松戸市 / Matsudo City, Chiba, Japan
- Contact:
Re: Joystick and MIDI handler
Spektro wrote:Hello,
I'm suggesting two new DOS handlers: an USB joystick handler and a MIDI handler. They would provide easy access to joysticks and MIDI devices from any programming language.
My only questions with these would be...
In what order are devices listed?
Are there any special keywords like the CON: handler to change access details?
Did you have something already in mind?
Re: Joystick and MIDI handler
I had a vague idea that the joysticks would appear as directories in the JOY: device. And in the same way the various MIDI gadgets would be listed as directories in the MIDI: device.
Seeing which joysticks and MIDI devices are available is then just a matter of listing the content of JOY: and MIDI:.
Once you know what joysticks and MIDI devices are available, you can read and write to a device's directory to get a joystick direction, send commands to a force feedback joystick, and send and receive MIDI messages.
Both handlers could accept special keywords, like the CON: handler does, if needed.
Seeing which joysticks and MIDI devices are available is then just a matter of listing the content of JOY: and MIDI:.
Once you know what joysticks and MIDI devices are available, you can read and write to a device's directory to get a joystick direction, send commands to a force feedback joystick, and send and receive MIDI messages.
Both handlers could accept special keywords, like the CON: handler does, if needed.
- Janne Peräaho
-
- Posts: 314
- Joined: Mon May 14, 2012 10:26 pm
- Location: 日本千葉県松戸市 / Matsudo City, Chiba, Japan
- Contact:
Re: Joystick and MIDI handler
so basically,
JOY: would show a device listing as it's directory entries...
and opening the device-file for a given joystick would read that joystick...
MIDI: doing something similar for midi devices attached and valid for camd.library?
I honestly don't know if keywords beyond a basic file open would really work...
devices as files or directory entries...
can readargs() for additional options be used when extensding the file/directory name?
maybe making the device a file and reading/writing options with that somehow?
JOY: would show a device listing as it's directory entries...
and opening the device-file for a given joystick would read that joystick...
MIDI: doing something similar for midi devices attached and valid for camd.library?
I honestly don't know if keywords beyond a basic file open would really work...
devices as files or directory entries...
can readargs() for additional options be used when extensding the file/directory name?
maybe making the device a file and reading/writing options with that somehow?
- LyleHaze
- AmigaOS Core Developer
- Posts: 525
- Joined: Sat Jun 18, 2011 4:06 pm
- Location: North Florida, near the Big Bend
Re: Joystick and MIDI handler
camd is a library, which is a bit more "program" oriented than a handler, but there are command line tools for basic stuff, and enough example code to show how easily it can be used.
os4depot/camdtools/showclusters will show a list of currently available MIDI clusters. It may also be used with a specific cluster name, and will set the WARN flag if found. This makes it easy for a script to detect specific devices and automatically add links to support them.
os4Depot/camdtools.MidiThru can create linkages between MIDI devices and/or programs from a command line. Think "Midi Cable" with options to filter, transpose, shift channels etc..
Other tools provide a configurable mixing console, program change manager that handles standard instrument files, Sys Ex record, SysEx playback, control change generator, Piano display, and lots of stuff like that.
MOST of those tools come witrh complete source, so if you want to play, you've got a running start.
I suppose there's plenty of material there to help you write a handler if you want to.
os4depot/camdtools/showclusters will show a list of currently available MIDI clusters. It may also be used with a specific cluster name, and will set the WARN flag if found. This makes it easy for a script to detect specific devices and automatically add links to support them.
os4Depot/camdtools.MidiThru can create linkages between MIDI devices and/or programs from a command line. Think "Midi Cable" with options to filter, transpose, shift channels etc..
Other tools provide a configurable mixing console, program change manager that handles standard instrument files, Sys Ex record, SysEx playback, control change generator, Piano display, and lots of stuff like that.
MOST of those tools come witrh complete source, so if you want to play, you've got a running start.
I suppose there's plenty of material there to help you write a handler if you want to.
-
- Posts: 314
- Joined: Mon May 14, 2012 10:26 pm
- Location: 日本千葉県松戸市 / Matsudo City, Chiba, Japan
- Contact:
Re: Joystick and MIDI handler
And with that clarifying that a lot more than ( MIDI:<device>/ ) would be possible...LyleHaze wrote:camd is a library, which is a bit more "program" oriented than a handler, but there are command line tools for basic stuff, and enough example code to show how easily it can be used.
os4depot/camdtools/showclusters will show a list of currently available MIDI clusters. It may also be used with a specific cluster name, and will set the WARN flag if found. This makes it easy for a script to detect specific devices and automatically add links to support them.
os4Depot/camdtools.MidiThru can create linkages between MIDI devices and/or programs from a command line. Think "Midi Cable" with options to filter, transpose, shift channels etc..
Other tools provide a configurable mixing console, program change manager that handles standard instrument files, Sys Ex record, SysEx playback, control change generator, Piano display, and lots of stuff like that.
MOST of those tools come witrh complete source, so if you want to play, you've got a running start.
I suppose there's plenty of material there to help you write a handler if you want to.
Thank you LyleHaze for all of the above.
@Spektro: the MIDI: handler looks very practical to me based on LyleHaze camd work and the above camdtools all being source included.
Just need a clear "These are the features" list to define more exactly if you want more than "Device Exists"...
One thing that comes to mind is Linux "/dev/input/joystick#" and "/sys" sysfs... may be something to look at ?
to compare your idea and think about any other features that make sense for a handler to provide?