Author Topic: Interfacing with a sustain pedal via BassAsio  (Read 161 times)

Fr_bp

  • Posts: 9
Hi,

I connected my guitar and a sustain pedal (for a keyboard) to my audio interface (it has two input ports). I currently use BassAsio (Bass.Net) to playback my guitar and I want to use the sustain pedal to toggle FX effects on the guitar line. The problem is that I don't know how to access the second input port of my audio interface. BassAsio only seems to retrieve data from the first input port, because when I connect the pedal to the first port it produces a distorted tone when I press it.

So is there any way I can retrieve data from both ports at the same time? And if so, how do I know the pedal state?

Thanks in advance

Ian @ un4seen

  • Administrator
  • Posts: 20393
Re: Interfacing with a sustain pedal via BassAsio
« Reply #1 on: 15 Sep '17 - 17:35 »
You can retrieve data from both inputs by calling BASS_ASIO_ChannelEnable for each of them. You can use the same ASIOPROC callback function in both calls if wanted, and have that check the "channel" parameter to determine if it's the guitar or pedal channel. If the pedal is sending a signal when pressed, you could detect that in the data received by the ASIOPROC or by using BASS_ASIO_ChannelGetLevel on the channel.

saga

  • Posts: 2179
Re: Interfacing with a sustain pedal via BassAsio
« Reply #2 on: 16 Sep '17 - 11:21 »
Quote
And if so, how do I know the pedal state?
There is no single standard and sustain pedals are not exactly meant to be connected to soundcards; when connected to the keyboard, the keyboard would send to a voltage to the pedal and if the circuit is closed (the pedal is held down), the voltage is sent back to the keyboard, which then measures the voltage. An expresssion pedal would have a potentiometer resistance to be able to send a whole range of different values.
The correct, reliable and vendor-independent way would be to connect the pedal to your keyboard, and then connect the keyboard to your PC via MIDI, and then monitor the recieved MIDI data for CC64 (0=63 = no sustain, 64=127 = sustain).

Fr_bp

  • Posts: 9
Re: Interfacing with a sustain pedal via BassAsio
« Reply #3 on: 16 Sep '17 - 19:52 »
I ended up connecting the pedal to my keyboard and reading the MIDI messages with BassMIDI!

Thanks for your help!