Hello, I want to make an audio mixer that works on midi.
I ran into a problem. If the mixer has controllers only for 8 tracks at a time, but the project has more than 8 tracks, then I need to somehow move along them. For example, first I control track 1 to 8, then move to the right (or down) and control track 2 to 9. How to program it? Is it possible to do this by midi, or should I make additional software?
An audio mixer that works on MIDI doesn't make much sense. MIDI isn't audio. Or if you mean some aspects of the mixing are CONTROLLED by MIDI perhaps you can give more details of what exactly you intend to control.
And if you show us some code which works to control tracks 1 to 8 then we can probably help extending it to more tracks. It may be as simple as a couple of buttons to move up and down the track counts. But the problem is that "track" has no meaning in MIDI so we need to see what you're actually doing.
Steve
slipstick:
An audio mixer that works on MIDI doesn't make much sense. MIDI isn't audio. Or if you mean some aspects of the mixing are CONTROLLED by MIDI perhaps you can give more details of what exactly you intend to control.And if you show us some code which works to control tracks 1 to 8 then we can probably help extending it to more tracks. It may be as simple as a couple of buttons to move up and down the track counts. But the problem is that "track" has no meaning in MIDI so we need to see what you're actually doing.
Steve
Excuse me. I'll explain now. For each track, I want to adjust the volume, pan, single and mute buttons. But I can only place 8 of these control units. How do I switch control from one track to another.
{ // Tracks in the brackets are controlling. I can change volume, pan, etc.
1: ------------------
2: ------------------
3: ------------------
4: ------------------
5: ------------------
6: ------------------
7: ------------------
8: ------------------
} // Tracks outside the brackets aren't controlling right now.
9: ------------------
10: ------------------
1: ------------------
{
2: ------------------
3: ------------------
4: ------------------
5: ------------------
6: ------------------
7: ------------------
8: ------------------
9: ------------------
}
10: ------------------
Now I haven't code to show. But it should just get values from potentiometers and send they to PC.
The Control Surface library should support this:
See highlighted part of this example
Basically, you declare a Bank with a given number of tracks to shift per bank (1 in your case), and the number of banks you need (3 in your case).
Bank<3> bank = {1};
Next, you add a bank selector to change the setting of the bank. When the bank setting is 0, tracks 1-8 are used, when the bank setting is 1, tracks 2-9 are used (because the number of tracks to shift was set to one), when the setting is 2, tracks 3-10 are used. It stops at setting 2, because there are only 3 banks.
Here I'll use the easiest bank selector: just two push buttons: when the first button, the bank setting is incremented by one, if you press the other button, it is decremented by one. If you hold either button for long enough, it cycles through all bank settings more quickly. If you hold both buttons, the bank setting resets to zero (tracks 1-8).
There are many other selectors to choose from, like rotary encoders, with or without LEDs, etc.
The first argument to the constructor on the line below is the bank to control, and the other two are the pin numbers of the push buttons. Connect them between those pins and ground. The pull-up resistor will be enabled automatically.
IncrementDecrementSelector<4> bankselector(bank, {8, 9});
Finally, you have to create some MIDI output elements that use the bank. Use all elements in the Bankable namespace for this purpose. The first argument is always the bank that determines their output and the banking config (whether you want the bank to change the channel or the address/controller number).
For example, some volume potentiometers:
Bankable::CCPotentiometer volumePots[] = {
{{bank, BankType::CHANGE_CHANNEL}, A0, {MIDI_CC::Channel_Volume, CHANNEL_1}},
{{bank, BankType::CHANGE_CHANNEL}, A0, {MIDI_CC::Channel_Volume, CHANNEL_2}},
{{bank, BankType::CHANGE_CHANNEL}, A0, {MIDI_CC::Channel_Volume, CHANNEL_3}},
{{bank, BankType::CHANGE_CHANNEL}, A0, {MIDI_CC::Channel_Volume, CHANNEL_4}},
{{bank, BankType::CHANGE_CHANNEL}, A0, {MIDI_CC::Channel_Volume, CHANNEL_5}},
{{bank, BankType::CHANGE_CHANNEL}, A0, {MIDI_CC::Channel_Volume, CHANNEL_6}},
{{bank, BankType::CHANGE_CHANNEL}, A0, {MIDI_CC::Channel_Volume, CHANNEL_7}},
{{bank, BankType::CHANGE_CHANNEL}, A0, {MIDI_CC::Channel_Volume, CHANNEL_8}},
};
The same approach can be applied to other MIDI output elements, such as Bankable::NoteButton.
Note that you're basically creating overlapping banks. This is perfectly fine for MIDI output elements, but for MIDI input elements, it is currently not supported. So if you want LEDs, for example, you'll have to change the number of tracks from 1 to 8.
Hope this helps,
Pieter
PieterP:
Basically, you declare a Bank with a given number of tracks to shift per bank (1 in your case), and the number of banks you need (3 in your case).
But what if I don't have a certain number of tracks?
User can create 5 or 50 tracks.
GooseDB:
But what if I don't have a certain number of tracks?User can create 5 or 50 tracks.
Then the user has to change the parameters.
Or you just program the upper limit, and only use the channels you need.
How is the Arduino supposed to know how many tracks there are?