Welcome, Guest. Please login or register.

Author Topic: Blitz 2: AHI and MIDI. Is it possible?  (Read 831 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline XDelusionTopic starter

  • Alien Breeder
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 5089
    • Show only replies by XDelusion
    • http://starwarslegacy.net/
Blitz 2: AHI and MIDI. Is it possible?
« on: October 06, 2012, 04:10:11 AM »
I'm wondering if Blitz 2 can be made to support USB, AHI and MIDI?

It would be interesting to write a program that supported XBOX 360 Rock Band Guitars and Drums via USB, and or something that will support PS2 sets via the PS2 to 9pin adapter.

 My interest would be to create a sampler that could be triggered by the drums and guitar. Ideally I'd like to be able to assign each sample to a MIDI channel as well that could be triggered by musick hardware or another Amiga. Lastly, I believe the ability to use it to convert the Guitar and Drums to a MIDI controller would also be nifty, but first things first, a Sampler Controlled by USB inputs from Rock Band products and or a PSX adapter if USB is not possible, but it must support AHI if possible.

Could something like this be done?

http://youtu.be/JbntIQ7W7Ek

http://youtu.be/-1AnfCwl260

http://youtu.be/sAT2OUNuxEU
Earth has a lot of things other folks might want... like the whole planet. And maybe these folks would like a few changes made, like more carbon dioxide in the atmosphere and room for their way of life. - William S. Burroughs
 

Offline platon42

  • Hero Member
  • *****
  • Join Date: Jul 2002
  • Posts: 573
    • Show only replies by platon42
    • http://www.platon42.de/
Re: Blitz 2: AHI and MIDI. Is it possible?
« Reply #1 on: October 09, 2012, 03:50:53 PM »
Quote from: XDelusion;710480
I'm wondering if Blitz 2 can be made to support USB, AHI and MIDI?

It would be interesting to write a program that supported XBOX 360 Rock Band Guitars and Drums via USB, and or something that will support PS2 sets via the PS2 to 9pin adapter.

 My interest would be to create a sampler that could be triggered by the drums and guitar. Ideally I'd like to be able to assign each sample to a MIDI channel as well that could be triggered by musick hardware or another Amiga. Lastly, I believe the ability to use it to convert the Guitar and Drums to a MIDI controller would also be nifty, but first things first, a Sampler Controlled by USB inputs from Rock Band products and or a PSX adapter if USB is not possible, but it must support AHI if possible.


For all I could find out from a little googling the XBOX360 Controllers use -- of course, since this is Microsoft -- a non-approved Interface/Class/Subclass code ('X'/'B'/0) and hence it will not bind to the HID class as a joystick. Turns out, it doesn't even use the HID protocol, so that wouldn't be of any help.

The protocol doesn't seem too complicated though:
http://lxr.free-electrons.com/source/drivers/input/joystick/xpad.c?a=avr32#L90

If Blitz can access Amiga libraries (I'm pretty sure it can) and you feed it with an .FD file or whatever to call the poseidon.library main functions, you will find it rather easy to lock onto the guitar and read out the data coming from it. There's the slightly (ahem) outdated Poseidon SDK, but you can also look into the AROS Sources on how things are done.

For some things, you might need to be able to provide Callback Hooks that are called asynchronously, and as I never programmed Blitz, I cannot say how and if that's supported.

Adding a CAMD MIDI driver is a bit tricky. In fact, it's a pain in the ass, especially when being tied to such dynamic plug/unplugable things like USB devices. You WILL need to code some ASM here (the USB camd class "drops" a MIDI driver file into the supposed directory as soon as a USB MIDI device is connected that will then try to talk back to the USB class (USB classes are libraries aswell)). Unfortunately, not many applications actually support CAMD, so you might be better off doing the playback thing yourself (with AHI).

Sure you don't want to give C a try? It's not that hard if you were thinking of such stuff from Blitz (or maybe, do the driver part in C and let Blitz just talk to the driver through a port or such).
--
Regards, Chris Hodges )-> http://www.platon42.de <-(
hackerkey://v4sw7CJS$hw6/7ln6pr7+8AOP$ck0ma8u2LMw1/4Xm5l3i5TJCOTextPad/e7t2BDMNb7GHLen5a34s5IMr1g3/5ACM
 

Offline XDelusionTopic starter

  • Alien Breeder
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 5089
    • Show only replies by XDelusion
    • http://starwarslegacy.net/
Re: Blitz 2: AHI and MIDI. Is it possible?
« Reply #2 on: October 09, 2012, 08:39:55 PM »
Playsation USB will work in that case. Hmm...

Maybe I should start practicing with C. I've got a lot to learn if I do, and a lot already on my plate. Will see though, it would be interesting.
Earth has a lot of things other folks might want... like the whole planet. And maybe these folks would like a few changes made, like more carbon dioxide in the atmosphere and room for their way of life. - William S. Burroughs