I think I may have this wrong can you describe what you want to send over MIDI on a button press and what you want to send when you release the button
Wow, that amazing, thanks!
This pedal is for Player A (there will be Players B+C also) and the 4 switches for Player A are :
REC A - Send Note On 37
DEL A - Send Note On 39
OVERDUB A - Send Note On 54
RESET - Send Note On 46 (common for all 3 Players)
The Tempo LED's are :-
LED1 - Receive Note On 40
LED2 - Receive Note On 41
LED3 - Receive Note On 47
LED4 - Receive Note On 48
(common for all 3 Players)
The same code will be used for Players B+C, with just some Note On changes, so Player B will use Switches :
REC B - Send Note On 42
DEL B - Send Note On 44
OVERDUB - Send Note On 56
RESET - Send Note On 46 (common for all 3 Players)
Sorry if it's a bit confusing, I hope this is making sense!
And thanks so much again, I really can't seem to get my head around C++ at all.
Sorry but no.
You mention the send note on, but you never mention any send note off messages. If you only ever send note on messages, then you will never be able to go back again, because once you send the note on message it is there forever being on. See what I mean?
What are the tempo messages? As I saw it, and wrote the code, you would never need to receive any messages back from your unit. I think the big problem here is that you have not thought out (or maybe communicated) what you actually want to do.
Want to give this another try?
That has me scratching my head as well.
I also think there are too many messages for what you would need to control the peddles, but then I haven't seen the MAX instrument you built.
HI Mike
Thanks for the reply!
Here is a pic of the MAX instrument.
One Looper machine, 3 Players.
And here's a pic of the Pedal Board
So each Player will have a Pedal Board with :
4 Switches for Rec-Del-Overdub-Reset
4 LED's for flashing tempo 1-2-3-4
The switches control the REC-DEL-OVD-RST functions, and the LED's flash to tell the player where the 'Count' for the 'Loop' is (1-2-3-4)
The REC, DEL and OVERDUB Midi Notes must be unique for each Players' Loop channel control.
The RESET switch and the LED's can use the same Midi Notes for all Players.
And yes you are right, the Note On for Switches would need a Note Off following it, probably on a short delay.
I can't remember if MAX can retrigger switches from just a Note On only, or needs a Note Off pairing to work. I'll check today.
Sorry for the confusing info, and thanks for all the help!
What I need to know is how the MAX patch is expecting the signals to arrive.
Is it set up like that video you posted where the receivers are serial driven?
Or do they expect a USB connection? It makes a vast difference as to what library you use and how things are wired up.
I'm hoping the Pedal can be USB PnP compliant, so it is just a Midi Device on USB when plugged in.
Then in the MAX program simply select that Midi port, and the notes pass in and out.
Sorry, that is probably not the info you were asking for, and a vast over-simplification!
that is the relevant part: USB-Midi (not serial Midi)
So I should use the 'USB-Midi' Library?
There are also Libraries called just 'MIDI', and 'MIDIUSB'.
Is one more suitable for this project?
So what you are actually saying is that you can't get the MAX program working, until you get the Arduino code working. And you can't get the Arduino code working until you get the MAX code working.
See the problem you have?
No, the Max program is not the issue.
The MAX program works correctly - if I plug in a Midi Keyboard, I can press keys and the Program will Record, Delete, Reset and Overdub perfectly.
And the LED flashers DO send Midi out and play notes on a synth.
So the Max part is working correctly.
It is just the Pedal programming which is the sticking point.
YES IT IS
the fact that it works with a keyboard is nether here nor there. You are picking up the MIDI interface generated by the keyboard.
What you are attempting to do is to create a MIDI interface from your code. This code is not working because you have no idea how to code. I think we can both agree on that from your first attempt you posted here. You didn't know the very basics, like variable names could not contain spaces, and their decleration had to name what type of variable it is.
Now are you interested in actually solving your problem, or do you want me to go away?
This code is not working because you have no idea how to code.
Wow, and I have said that REPEATEDLY from the very start. You are catching on!
Maybe change your name to Speedy Mike?
So you are saying an Arduino CANNOT be a PnP Class-Compliant Midi Device, and can only be coded to work with just MAX and nothing else.
If that is the case then this project is pointless. I thought Arduino's could be set up to be PnP Midi Devices, and it's surprising they cannot do that as you state.
If your understanding of "setting up an arduino as plug and play-Midi-device" is
- you copy & paste some ready to copy & paste lines of code
- compile and upload
- plug in device
and it shall work.
Sure this does not work this way.
Especially not as you want some specialised buttons to work in a specialised way
These specialised things must be written as code that realisies this specialised behaviour.
If this specialised firmware is written you can finally plug in the arduino-based device into your computer or whatever MIDI-device and the two devices will work together.
MIDI is a standardised interface with definitions on these levels
- electrically
- baudrate
- on the logic level what byte-value has what meaning
additionally there are two interface-types
- serial interface (mostly just called "MIDI")
- native USB (which only works with computers or with other midi-devices like keyboards that are described as USB-Midi-interface
These details must be discussed and defined.
You seem to have the expectation like
"I say some foggy words and then everything will already work"
This all boils down to a fundamental decision:
With the help of the forum:
Do you want to learn coding step by step
and with answering detail questions asked by users ?
or
do you not want to learn coding step by step
and with answering detail questions asked by users ?
maybe it helps to understand to watch this video starting at 10:08 which is automatically done with this pictured link
best regards Stefan
No I am not.
I am saying that you have to have working code first.
You are making the big mistake that a lot of beginners make of trying to do too much too soon.
You start with something that will work for one aspect of the design. You can get this from the examples that come with the library.
Then you have your application try this and see if it works.
I would recommend that you get something like the "MIDI monitor" app. This allows you to see messages being sent and print them out.
So you would see the device that is sending it.
Once you have established that you can then start to add functionality towards your final goal. That way you take small steps and build up what you eventually want to do.
We can help in this process but the key word is baby steps.
One big problem is that "hairless" no longer works on the Mac after macOS Mojave, and I am not sure about windows. It has been abandoned.
Well it seems you both - Mike and Stephan - are very good at saying repeatedly what I stated in my first Post - I CAN'T CODE.
I thought I said it plainly and simply - obviously not simply enough, as you both keep repeating the same thing back to me.
Why just keep saying 'you are wrong' or 'that won't work', if you don't offer REAL SOLUTIONS or ADVICE?
So thanks guys, I give up.
You have made it plain that all I will get here is 'lack of advice'.
I have been using MIDI on computers since 1984 (a Commodore 64 running Steinberg 12-Track), so MIDI Utilities like Hairless I know all about (I use MidiUtils, LoopMidi, VMPK and VMS on PC). Yet you both assume because I know NOTHING ABOUT C++ that I know nothing about Midi Devices, PnP, Class-Compliance, computers etc.
You are both saying that an Arduino Micro CANNOT be a PnP Class-Compliant Midi Device (in the video Stephan posted it is NOT discussed) - fair enough, I'll stop trying to get help and give up in that case, and thanks for - well, not telling me a week ago that it's not possible.
No we are not.
But if you don't want to engage with us that is fine. Because you don't appear to be listening to us.
What is unhelpful about that?
If your description of the wanted functionality is lacking important details
do you really wish that specifications about the functionality shall be assumed by your helpers for the best without saying a word about this fact that assumings were made?
Would you really be happy with a device that is working but the functionality deviates from what you wanted?
best regards Stefan
If your description of the wanted functionality is lacking important details
And what were those details? If I missed something out (I have said many times it must be PnP - Class-Compliant - Midi Device - Sends and Receives notes) what was it? I'm not psychic! What detail did I miss out? What essential information do you need that I 'failed' to know you needed? Please, tell me what you need to know that I haven't provided previously?
What is unhelpful about that?
Can you describe how it helps?
You say 'The Library' as if I know 'which' Library you refer to - there are 5 or 6 Libraries with Midi stuff in. Also you presume examples exist that will help me - as I have said I have tried all the examples from all the Libraries with Midi, and none have helped me - which was why I came here to look for more explicit help.
As I said at the start, I have watched and followed many Video Tutorials, but none describe what I want to build - so how can I 'know' what I need to know?
And if an Arduino CAN be Class-Compliant, then it has NOTHING to do specifically with MAX, as a Class-Compliant device should independently work whatever you plug it into, or whatever Program you run, wether its a DAW or MAX or a Soft Synth or a Looper. That is the Definition of Class-Compliant. MAX is just another program that can send and receive Midi messages.

