-
-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for MIDI SDS and TM-1 #64
Comments
More official information at Elektronauts but not related to samples. |
SDS support completed. |
|
A lot of refactoring has been going on lately so the instructions above are obsolete. In order to send a custom SysEx message to the TM-1, the code should be added at the end of this function. Other devices will ignore it so it will be safe. elektroid/src/connectors/sds.c Lines 763 to 785 in aff3aab
Notice that we are assuming that TM-1 has only one MIDI interface and it's reading and bypassing the messages. The code should look like this.
|
I am going to try to test this out tomorrow (PST). I emphasize "try" because my TM-1 is really unstable in my Linux/Lenovo laptop because I have to do this plug/unplug/plug-while-holding-the-turbo-button dance to get it to stay recognized and connected by the machine/OS, and even then, I haven't been able to get a simple command like PS, this is in response to your recent post on Elektronauts. I didn't want to reply there as I think a technical conversation may be more relevant here. |
Abosulutely! Fully agree. I forgot to mention that, for now, you should change the following line.
I think it'a a 12 there in your case. We should set a variable depending on the MIDI identity reply but we'll do it later. |
Any news on this? I've just pushed a few commits that should improve the SDS functionality. It's been tested and works well with my Digitakt (only upload)) and my E-Mu ESI-2000 (except when the device doesn't send the last byte). Now, there are 4 filesystems; for 8, 12, 14 and 16 bits transmissions. I'm still trying to figure out a couple of issues but hopefully this won't affect you if the Machinedrum MIDI SDS code is the same it's in the Digitakt. One of the issues is the Receive SysEx option in the menu, it's not working ATM. |
Hey, sorry about the delay due to unforeseen personal things. I meant to test this exclusively with my TM-1, but with my current Linux setup, the TM-1 just doesn't want to connect permanently. I will keep trying since I have in fact been able to connect it to the laptop well by doing a bunch of brute force connecting and disconnecting maneuvers. That said, in the times that I have managed to keep it connected, Turbo mode hasn't worked. With that in mind, do you need me, or is it possible and beneficial, to test the new changes to Elektriod on the Machinedrum without having to use the TM-1, i.e., can I use it with, say, my Native Instruments Komplete Audio 6 MKII? |
No worries. First things first.
Testing the TM-1 should be the last thing to do. Right now, I need you because I'd like you to test the SDS against the Machinedrum and the integration in Elektroid and using Komplete Audio 6 MKII is perfectly fine. Later, we'll see how to integrate the TM-1 and its turbo mode. As a side note, Elektroid offers direct sample copying with the GUI (and CLI) but also SysEx sending via the app menu (soon via the CLI too). The latter can be used to send the SysEx files found in these sample packs. BTW, SysEx sending only allows to send a single file but I'm working on sending multiple files at once. Regarding a better integration with the Machinedrum, could you post here the output of TIA. |
FYI, the bugs I mentioned a few days ago are fixed. Also, multiple SysEx uploading is now possible as well as using the CLI to send and receive SysEx. |
A couple of bugs have been fixed. Also, an occasional error with an E-Mu ESI-2000 when downloading has been addressed with a little hack. Apparently, the sampler was not transmitting the last packet if it had only a single sample which cancelled the whole download. Now, Elektroid uploads an additional Edit: The additional sample was removed in b5a320f as another workaround was found. |
Any update on this? |
Version 2. 2 is almost ready. I'm planning to release it during the following couple of weeks. For anyone reading this, have you been able to use the SDS connector in Elektroid with the Machinedrum or other SDS supporting sampler? |
Has anyone been able to test SDS or the TM-1 with Elektroid? |
In case anyone is interested, a few improvements have been added to the SDS code. WAIT packages are sent now to better control the device and avoid the 20 ms timeout specified in the protocol that caused devices to continue without further handshakings. Besides, a couple of retry loops have been added to better recover in case of failure. |
I finally got a stable Linux + TM-1 setup. Previously, I couldn't get the TM-1 to stay connect for longer than 30 seconds no matter what I would do. I can properly look into this now that everything seems almost fine. Anyway, to start, a question: I don't seem to see any support for SDS transfers using the UI version. Does Elektroid only support SDS transfers via cli? |
No, it does support SDS transfers from the GUI too. Maybe, your problem is in the detection of the SDS device. Elektroid (GUI) tries its best to detect the appropriate device so the available operations match its capabilities. As the CLI forces a filesystem, the automatic detection is never fully triggered. Probably the In order to know what's actually going on, please, disconnect all your MIDI devices, run This is how the handshake works. In the file Lines 59 to 63 in 9f46c3b
All the available connectors are tested for a handshake if the MIDI device name matches the regex. As soon as a handshake is successful, the process finishes. Note that the SDS connector do not have a regex and it's placed at the next-to-last place in the list. The last place is used for a generic MIDI device that only supports SysEx and preset listing. The goal of the handshake function detect the device and initialize all the needed structures in the elektroid/src/connectors/sds.c Line 1209 in 9f46c3b
What device are you trying to connect to? A Machinedrum? It's also possible to create a new connector, create a new handshake function, register that on the |
Yes, I am doing the test with a Machinedrum and a TM-1. I have a Monomachine as well, but I'll stick to the MD to make testing simple for now. Assuming that I should disconnect all MIDI instruments but leave the TM-1 connected via USB, this is what
|
This section is the interesting part. Let's break it in pieces. Here, the
As this fails, other connectors are tested. But fail too.
Here, during the
Another connector here...
After all of these, the default connector fails to determine the device too but it's the one being selected.
But there is something really weird here. There is no response for the Identity Request Universal SysEx message ( Can you use the By the way, in the right lower corner you can find the detected device. It's just the default. |
I admit that I am confused about the command line implementation and I am not really sure what commands and options to issue in the terminal. If you don't mind, could you give me a few sample command lines to try out?
I just sent a Sysex firmware file through the TM-1 and the Machinedrum is receiving it.
Unfortunately I cannot at the moment since the TM-1 is the only MIDI interface I have on hand at the moment. I am curious though, what is the UI expected to look like for a TM-1 + Machinedrum setup, or for a Machinedrum connected to any other MIDI interface? What functionality should be made available in the UI once a connection is made? Is the expectation to send a Sysex dump of samples or SDS files? Can individual SDS files be transmitted? |
Nice!
Then let's try to send a sample from the CLI. First, list the devices. From version 3.0, the device 0 is always the computer. In my case, device 1 is a MIDI to USB interface hooked up to my E-mu ESI-2000.
Let's try to guess what's in there by running the command
Anyway, let's try to send a sample.
Does that work? Could you post the output of the last command here? Note that you might need to use other filesystem. Isn't the Machinedrum 12 bits? In fact, perhaps this is the issue. I decided to implement the handshake for SDS devices by sending a dump header and listening for a reply. This header contains the bit depth of the sample to be sent. This is the line. elektroid/src/connectors/sds.c Line 1235 in 9f46c3b
Does it make any difference if you change that 16 with a 12 and recompile? Would the |
The GUI should look the same. Depending on the filesystem selected on the device side, on the computer side are shown only the appropriate files. In the case of SDS devices, you should see samples there. And in this case, the sampler editor will be shown too.
You'll just be able to drag and drop samples from left to right to certain slot. All the needed conversions will apply.
You wouldn't work with SDS files but with actual samples. If you wanted to send SDS files, which are just a bunch of SysEx messages, you'd need to use the menu. You could send several SysEx files at once. Just be reminded that you'd have no control over the slot they'd have been sent to. How a device will handle this depends on the particular case. |
Calling
I am assuming that because the only file system available is
In the File Sample Manager, the Machinedrum waits for a sample, I send the commend from the terminal, the MD waits a bit, and then "cancels" the transmission (displays "CANCELLED" on the screen).
16 bit samples can be transferred to the Machinedrum and they are converted internally to 12-bit. I can send 16-bit WAV and SDS files with |
Exactly. That is by design. The GUI won't be able to do anything special but will allow selecting presets and sending and receiving SysEx.
You're right. However, notice the CLI bypasses the connector detection stage and uses the connector indicated by the user. What happens after is that the chosen connector runs the handshake anyway and it fails because no messages are received.
So 16 bits is OK.
Is the Machinedrum showing something on the screen during the connector detection or handshake? I suspect the issue is just that no packages are received. Is the computer receiving MIDI data from the Machinedrum? You said that sending SysEx works, can you use |
When it is in the file manager and I select the sample slot to receive a sample to, the only thing that shows is CANCELLED after the connector routine fails. When the Machinedrum is not in the file manager and its normal view, it displays the message "ERROR INVALID POSITION". That made me think that maybe the syntax for the path was wrong so I tried:
assuming that 1 is the device, 44 is the sample slot position in the Machinedrum where I want a new sample to be stored, and
I can receive data from the Machinedrum to the laptop with |
You don't need to setup anything on the SDS devices. The whole process is controlled from the computer.
Great.
Then, the issue is in the handshake message and no matter what parameters you pass the handshake will be the same. But you guessed out all the parameters correctly. The issue is very likely in the line 1235. At least I added a meaningful comment. Change the elektroid/src/connectors/sds.c Lines 1233 to 1248 in 9f46c3b
|
The first message is interesting. Looks like it is the TM-1 responding based on the information from this Elektronauts post. By the way, there are lots of information about speed negotiation there. Considering that we have the SysEx messages for globals, kits and other types of data, I'm pondering creating a new connector as it would be easier to add new functionalities there. |
A new branch called Anyway, this is a starting point. A few notes:
elektroid/src/connectors/machinedrum.c Lines 25 to 26 in f323db2
Could you post here the output of these commands?
So, is this working for you? |
I forgot to mention that getting the sample names could be possible. As with the renaming functionality, this code is already implemented but has never been tested. If you're interested check if this works.
|
@erroreyes, did you manage to try the We are not in a hurry, it's just that wanted to track the status of this issue. Don't mean to put pressure on you. If, for whatever reason, you can't work on this we might ask in Elektronauts if anyone else is interested. |
I've got 2 working TM-1's, a Machinedrum, Monomachine, Windows PC & Macbook and would be happy to help test this as C6 is getting harder for everyone to use. Especially for those on MacOS, there are no options for getting TurboMIDI speeds from the TM-1. I'm a bit of a novice programmer though & not familiar with autotools, is it possible to compile for Windows and Mac? Or would I need to set up a VM to run this? |
Thanks for wanting to try this. First, a bit of a recap.
Regarding the compilation, there are many options.
Perhaps, the best choice now is going for a Linux VM and, once it's done, then I could help you building this on OSX. Is this good for you? If it is, let's follow this.
Let me know at which point you are so I can help you with that. |
There is the issue #108 related to building on OSX. |
Sounds great, thanks for all of the info. It may be a few days before you hear back from me as I have never set up a Linux VM or build environment before but am eager to figure it out. Is this the comment thread an appropriate place to reach out for troubleshooting/help or should we move to some kind of direct messaging (if needed)? |
Take the time you need. This issue was created almost 2 years ago so we're definitely not in a hurry. As a team, we've done as much as we could but we haven't accomplished much yet. Still, I think we are really close.
I'd say so. If we end up cluttering this issue so much, we'll find another way. |
@johnnywagner, in case it makes things easier for you, support for OSX with Homebrew has been added. |
Great, sorry I haven't had much time to try and set this up. Thanks for the update, I'll post here soon. |
For anyone reading this, has there been any advance in this issue? BTW, branch |
I haven't had a chance to test it yet but I haven't forgotten! |
Hi, I'm a Linux user with a Machinedrum and can help test / debug. I misplaced my TM-1 a while ago but I will look for that. I figured I'd try a non-turbo transfer on the $ ./elektroid-cli machinedrum-sample-ul ~/downloads/untitled.wav 1:/34:34 This uploaded untitled.wav to slot 35 (34 0-indexed). The name appears as "....". This helps me as Elektron C6 crashes under wine. Thanks! Btw I needed the following to compile the diff --git a/src/connectors/system.c b/src/connectors/system.c
index d2e5c83..098ad13 100644
--- a/src/connectors/system.c
+++ b/src/connectors/system.c
@@ -19,6 +19,7 @@
*/
#include <errno.h>
+#include <glib/gstdio.h>
#include <glib/gi18n.h>
#if defined(__linux__)
#include <sys/statvfs.h>
diff --git a/src/editor.c b/src/editor.c
index 4e8c017..2811ac0 100644
--- a/src/editor.c
+++ b/src/editor.c
@@ -19,6 +19,7 @@
*/
#include <gtk/gtk.h>
+#include <glib/gstdio.h>
#include <glib/gi18n.h>
#include "editor.h"
#include "sample.h" You mentioned you need to rebase so maybe that's already fixed. If I find my TM-1 I will test with that and update. |
This is great news! TM-1 is something we can deal with later as this will only speed up the transfers. Regarding sample names, we need to know how the machine names the samples. My guess is that they're using an extension of MIDI SDS for this so 've enabled it in the code. As you're saying the samples are 0-indexed, I've tried to fix it in the last commit. Branch Please, check everything again. |
Branch |
Branch As no more functional changes in the connectors are expected for the next version (3.1), I'm starting to plan the release and I was wondering if anyone here has managed to test the This issue has expanded in time for more than 2.5 years and although it is not a problem, many things have changed. Currently, the idea is to implement a connector for the Elektron Machinedrum. The Elektron TM-1 has proven to be quite elusive and I consider we have very little and reliable information about it. |
Branch A few connector options have been removed as they were redundant and the code has been updated. |
Sorry for my inactivity, I still need to learn how to compile this program to test it for you. It's on my agenda still. In the mean time I did find this information someone wrote up on how the Monomachine DIGIPro files are structured: Maybe Elektron used the same header formatting for samples on the MD. Hope this is helpful for now. |
Nice to know you're on it. 👍 Supposedly, the implementation is ready to be tested. I only need someone to confirm it actually works. The sampling management is based on MIDI SDS (1-based indexing) and I believe it could support the sample renaming standard too. There are 3 use cases to be tested.
|
So I should build the machinedrum branch and test on linux ideally? |
Exactly. I've just rebased the |
So while Elektroid seems to automatically start polling the synth for samples, the Machinedrum is reporting nothing as the user hasn't instructed the Machinedrum to send the data. So, while Elektroid was listening in my case, I set the Machinedrum to send the sample data but since it wasn't synced with Elektroid it all came through as garbled unlistenable data as seen in the screenshot above. Like @adsr above though, I was able to send a sample by dragging from the left column to the right column while the Machinedrum was set to RECV mode in the sample manager menu: The sample came through great on the other end but two issues are present due to the differences in how the machinedrum works I talk about above:
So Ideally, you should create buttons for the Machinedrum mode that allow the user to send and receive MIDI data, mirroring the functionality of C6: Next up, while it is not available in the stock firmware, most power users like myself are running a custom firmware on the Machinedrum called MDX these days that allow the Machinedrum to report sample names, positions, and empty status. Below is a screenshot from the custom firmwares documentation. Incorporating this in Elektroid would let you bring the right column up to parity with how Elektroid functions for other samplers. You can get full documentation of the custom firmware from "Machinedrum_SPS1-UW_OS_X.11.zip" on the latest release: Finally, I unfortunately report that the TM-1 turbo speeds are not working in the Machinedrum branch. I'm happy to help troubleshoot this though and help get it working as this is the main reason I want to use Elektroid one day. Thanks! Hope this is helpful. Now that I have ubuntu set up in my Virtual machine I can help regularly test new versions and provide feedback. Maybe one day you can even fully implement the Monomachine :) |
Thanks for your detailed post! A lot to unravel. I'll take a second read later. Albeit the data being received, it looks like standard SDS name support is not working. We can easily disable this here. elektroid/src/connectors/machinedrum.c Line 161 in 8638869
Set this to FALSE and recompile. If I've understood you well, uploading should work and listing too (without names). I fear that downloading will only be available on request. To do so, use the receive SysEx menu. But it will be a SysEx file and not a sample file. I'll think about this. |
Definitely please read it again later, I think that you maybe misunderstand the reason I got the garbled SDS name information in the right hand column. To your second comment, yes downloading samples will only be available on request. BUT, if you incorporate the sysex sample slot query that is apart of MDX, you will be able to list with the names and sample locations currently on the Machinedrum to allow the user to more clearly see the changes they will be making upon pressing a potential "send" button that I suggested. |
I still haven't got the time to take a proper look at this. But I've just came across this thread where there is a video of the uploading process and I think it's worth mention here. https://www.elektronauts.com/t/transfer-samples-from-to-machinedrum/130337/19 |
Yeah good find, that would probably be much more helpful than my written explanations of how it works. If you ever want me to video myself doing anything on any of my machines (monomachine, machinedrum, tm-1) let me know and I'll be happy to help. |
The goal is to transmit samples to Machinedrum via TM-1.
TM-1 is a standard USB to MIDI (DIN5) interface that can also speed up MIDI transmission if the Elektron devices connected to them allow that.
As it seems that the underlying protocol is standard MIDI SDS, perhaps we could extend this functionality to any other device that supports it too.
Here we have some useful links taken from here.
Format:
http://elektron-users.com/index.php?option=com_openwiki&Itemid=43&id=waveforms_samples 94
Batch conversion:
http://www.elektronauts.com/t/best-software-for-batch-sample-rate-conversion/510
Discussion:
http://www.elektron-users.com/index.php?option=com_fireboard&Itemid=28&func=view&id=30234&catid=9&limit=10&limitstart=0 27
The text was updated successfully, but these errors were encountered: