novation nocturn usb protocol
i found my nearly forgotten novation nocturn controller in the corner. after thinking about reimplementing it into my system, i instantly remembered what a pain is the Automap software and setting it up. (unfortunately the nocturn will not work without this software because it does not work as a generic midi controller. why novation, why?)
btw: i'm on windows..
i started to look around if someone already created a custom driver or even a max object. i found this guy on youtube who sniffed and "hacked" the usb protocol of the nocturn with python under linux.
https://www.youtube.com/watch?v=uy4oY5Mkytg
https://github.com/felicitus/nocturn-game
another guy who tried to add the midi part
https://github.com/dewert/nocturn-linux-midi
i thought about doing it in C (long term objective, need more C training first) and there's libusb wich even seems to provide a cross-platform usb lib.
https://github.com/Chronic-Dev/libusb
i was able to create and install the libusb driver for the nocturn, but have some trouble with the header files (no missing files but missing links, probably noobish problems)
anyways, i don't expect me to be able to create a nocturn object in near future but i want to share this for interessted people.
maybe you can tell me if it's possible in general to use the information in the phyton files to create a nocturn-external for max?. O.
A nocturn external would be perfect as I also had forgotten mine in a dusty corner because of automap's pain. This is far from what they told it is...
i've made great progress with this. Seems like i AM able to create a nocturn object in near future :) (for windows) i guess because simplifies it.
at first i focus on the input (nocturn->pc).
the usb read function blocks the thread, so i created an extra thread for the read function. stopping the thread will only work if i use a timeout for the usb read request, so that the thread can check if it's "stop" variable is true. i wonder what time to use for the timeout or if i can stop a thread allthough it's blocked currently..
i understand mutex, but what is the qlem for?
i dunno much about usb specs. Is there another buffer before the application? at some point it seemed to me that i can press the button on nocturn, AFTER THAT executing the read function will still get some values? so it wouldn't miss something if the worker thread stops reading for a moment to do other things?
i will post a beta version when the object is reporting all input and stable on my system. O.
don't know if you see the link above, i don't see it but i also do not see post dates currently. just in case ;)
"because libusb-win32 simplifies it"
http://sourceforge.net/apps/trac/libusb-win32/wiki
please send me mail to 📧 if you want to help me testing the external in it's very early beta state. required is Windows and a Novation Nocturn. no Automap software needed, not even the novation driver. O.
Brilliant! Any plans for a Mac port of the external?
i can't do it without a mac. please send me a new macbook pro ;). i'll share the source with everyone who asks for it. but there're os specific things that won't translate 1:1. maybe there's a mac version of libusb, i didn't do any research into that direction. O.
Does this external work with Max x64?
Bit of a necrobump here, but could I get the source please?
necrobumb? I'll be back every 6 years. Here's a new version with a Mac external inclusive.
If you got a Nocturn you can test the externals or the m4l device. You can test the m4l device without installing the externals (it's all frozen into the device).
The Zip also includes a .maxhelp file, the cross-platform source code of the external in C, the Installer for the WinUSB driver for Windows. This is work in progress, the final version may look different. Your feedback is welcome.http://www.mediafire.com/file/91o0stjp5l7s9v2/11nocturn_2020_05_04.zip/fileEdit: please check my homepage.
Thanks! My Nocturn revived after many years thanks to your external (Live Suite on macOS 11)
Hi, thoeretically yes. though, it would need additional work to adapt it to something else than 9 endless dials and 16 buttons. The libusb nocturn external is closely tied to the specs of the nocturn, another controller would require a new external if it isn't sending MIDI or something we can interpret in Max.
Hi! Firstly, thank you very much for your efforts in trying to keep this little controller alive. The Nocturn became a integral part of my composing and producing setup when paired with Reaper and ReaLearn (only using CCs).
My problem is that I'm a mac user and Automap is only compatible until Mojave. So I'm stuck with it. Your work it's my only hope of keep using my current setup but get rid of Automap and Mojave.
I've tried for 2 days now to make it work in Reaper without success. I'm able to open the external in Max and it connects with Nocturn. In the Max console (with the project's monitoring option enabled) I can see that each rotary and button emits a different CC (can't figure out to what midi channel, though).
In Reaper's MIDI devices it shows "from Max 1", "from Max 2", "to Max 1" and "to Max 2". I've tried every combination of this ports but Reaper do not receive any MIDI input from Nocturn. I even was even able to map different CC's in the external patcher from Reaper with "Assign MIDI Map" in Max. Nothing happens in Reaper.
I wonder if the external is not compatible with Mojave or something. I've run out of ideas to try. Any help will be most welcome.
Kind regards and thank you.
If max can receive midi from that device,then it can also send midi out
Try to use IAC driver instead of that from & to Max virtual ports.
but maybe you also make some mistake when sending midi ?
Hi, what you see in the console is the data stream via usb. there's no midi involved until you take the objects output and translate it to midi and send it out Max. (and vice versa)
Thanks for the fast reply. You have any suggestions in how I should implement this data stream to midi translation? Simply by mapping each rotary and button in patcher to output a specific CC message? Or by editing the .maxhelp file you provided using, for instance, the "midiformat" and "midiout" objects? I've never programmed anything in Max.
@Guilherme Lohmann
You mean something like this?
Note that you can switch a patcher between patching and presentation view.
Wow! That's exacly what I was trying to build yesterday. I was able to make Max and Reaper properly talk and went to bed really happy. But this seems perfect. Trying to make it work with Reaper now. Thank you so much 11 OLSEN!
Let me know when you need further help. I guess you will also need a way to save and recall the setting.
@11OLSEN
You mean like this? :D
Hail the all mighty youtube! hahaha
Also, the "Channel" and "CTRL" labels in presentation mode were inverted.
The next thing I would need help implementing would be Max dealing with the midi feedback from ReaLearn to show the state of the settings on each dial and button leds in Nocturn. Any tips on this would be great. Thanks again.