Joystick and MIDI handler

AmigaOS users can make feature requests in this forum.

Joystick and MIDI handler

Postby Spektro » Wed Sep 27, 2017 6:06 pm

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.
- Janne Peräaho
User avatar
Spektro
Beta Tester
Beta Tester
 
Posts: 105
Joined: Sat Jun 18, 2011 7:55 am
Location: Finland

Re: Joystick and MIDI handler

Postby Belxjander » Thu Sep 28, 2017 12:10 am

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?
Belxjander
 
Posts: 262
Joined: Mon May 14, 2012 11:26 pm
Location: 日本千葉県松戸市 / Matsudo City, Chiba, Japan

Re: Joystick and MIDI handler

Postby Spektro » Thu Sep 28, 2017 9:37 pm

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.
- Janne Peräaho
User avatar
Spektro
Beta Tester
Beta Tester
 
Posts: 105
Joined: Sat Jun 18, 2011 7:55 am
Location: Finland

Re: Joystick and MIDI handler

Postby Belxjander » Thu Sep 28, 2017 11:39 pm

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?
Belxjander
 
Posts: 262
Joined: Mon May 14, 2012 11:26 pm
Location: 日本千葉県松戸市 / Matsudo City, Chiba, Japan

Re: Joystick and MIDI handler

Postby LyleHaze » Tue Oct 03, 2017 11:12 pm

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. :)
User avatar
LyleHaze
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 509
Joined: Sat Jun 18, 2011 5:06 pm
Location: Georgia, USA, just North of the Florida border

Re: Joystick and MIDI handler

Postby Belxjander » Thu Oct 05, 2017 12:05 am

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. :)


And with that clarifying that a lot more than ( MIDI:<device>/ ) would be possible...

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?
Belxjander
 
Posts: 262
Joined: Mon May 14, 2012 11:26 pm
Location: 日本千葉県松戸市 / Matsudo City, Chiba, Japan


Return to AmigaOS Feature Requests

Who is online

Users browsing this forum: No registered users and 2 guests