openAVproductions / openAV-Fabla2

The repository of the Fabla2 sampler by OpenAV. http://openavproductions.com/fabla2
GNU General Public License v2.0
54 stars 13 forks source link

Recorded sounds always apply to the most bottom-left pad. #79

Closed Qualphey closed 4 years ago

Qualphey commented 4 years ago

I use Fabla2 in Ardour. When I select a pad, then click REC and click on it again to stop recording the sample, the sample is always applied to the bottom-left pad, no matter which one I selected before recording.

Qualphey commented 4 years ago

At line 120 in src/dsp/fabla2.cxx a startRecordToPad function is called:

            startRecordToPad( recordBank, recordPad );

I've added an additional line before this one, that prints out the value of recordPad:

            printf("PAD: %i\n", recordPad );

The output is always PAD: 0, no matter which pad I actually selected. Do you know where is the value of recordPad assigned? I'm trying to fix this myself.

Qualphey commented 4 years ago

You can fix this simply by adding this line:

    recordPad = p;

at the start of Fabla2DSP::uiMessage method in src/dsp/fabla2.cxx.

I don't know if this causes any other problems though...

harryhaaren commented 4 years ago

I remember this part of the codebase was not really clean and stable. Note that the MIDI based recordPad would always update - for future reads, the above fix is specifically talking about clicking the UI and then having the record_to_last_played_pad control port operating on the pad clicked in the UI.

Qualphey - nice work, glad you got this working!