 Okay, back when I was in high school, 20 years ago, back in the 90s, and I was still a Windows user, I used to like to create music just like I do now, but I used open source tools back then. I used these EJ programs, there was Dance EJ, Techno EJ, Trans EJ, Hip Hop EJ, and back then I was running version 2. And the other day I was wondering if it still existed, and they still have a website and they do have newer versions, and they do have some free downloads for some trials and stuff like that, so I thought I'd check it out. One of the great things about these EJ programs is not only do they have sounds, like if you use LMMS you have a lot of drums and synths and all this stuff that you can make your own loops and patterns with. These EJ programs came with thousands of pre-made loops that you can just drop into that or it wasn't really for creating an original song, I mean you could because they had some tools to make your own beats and loops. So for most part you drag and drop the loops they had, they're all set to the same BPM, the same tempo, and they just go together and you can mix these songs and I did that, I made multiple, multiple songs and I used it a lot. That was back in the Windows 98 days when Windows XP came around, the program was no longer compatible. They do have newer versions, I downloaded a free version, I installed it on a Windows machine I had access to, again it wanted me to register and stuff but I didn't do that, I let it install and then I started looking through the files. So wondering if I can take these loops and import them into LMMS and use them there, obviously there would probably be copyright issues so I couldn't legally make songs and distribute them but I was just wondering if it was possible. Well let's go ahead and look here and these are the files that extracted, the program extracted, I copied it over to my Linux machine here and if we look at certain folders like vocal waves you can see there's some wave files here. If I go into drum waves you can see there's a bunch of drum waves in here and these are wave files that I just played, they're just standard wave files but again those are single beats or single notes, those aren't the loops, the patterns, there's also a synth wave kind of the same thing, there's a whole bunch of them that are in here wave. What I want to look at is actually under sound clips. Under sound clips we have all these different folders, we can look at here like in bass loops and they have these SCL files, you can see the icons, my operating system doesn't know what to do with them because they're non-standard files, they're files that were created for the EJ program that other programs don't recognize or know what to do with. The thing is lots of companies do this with their software. They'll take media stuff, sound files, video files, image files and what they normally do, they do a lot of the times is they'll just take those standard files and put their own header before it and if you remove their header you can access the regular file and use it other places and that's what we're going to do today. So I'm going to move into my shell, same thing, I'm going to dance EJ7 folder, you can see that these are the same files and again if I go into something like drum waves and I go into kicks, I can list out the wave files and if I run file on all of them, file is a program that tells you what type of file a file is. For example, you can look here, these are all wave files, wave audio files, you can see they're mono and they're megahertz and you can also see here that this specific type of wave file is a riff wave file. We can back out and go into synth waves and same thing, file out all of them, you can see they're all wave files. Now, how does file know what type of file it is? Well, it looks at the header of the file. I'm going to use hex edit, which should be in repositories on most Linux distributions, just use your package manager to install it. I'm going to choose one of these files such as 001.wave and if we open this up, you can see right away, the very first part of this file says riff and a little bit after that it says wave FMT. If I go out of that, I can grab another one and it's going to do the same thing. It starts with riff and if I look at the next one, you can see riff. So we know that is the header for a wave file at least of this format. Can we find that in our other files? If we back out and I go into sound clips, you can see I have all these different folders with different sound clips and they are labeled as SCL files. If I was to find dash I name asterisk dot SCL, that's going to list all of them in the subdirectories and I can pipe that into WC dash L. It's telling me that there's 3,501 of these loops that if I can access them, they're loops that can be used in music and other programs. So real quick, let's go into or back into the sound clips folder and I'll go into the base loops and you can see there's a bunch of them here. If I was to file on these, it's just going to say that they're data files. There's a few files in here that are script files which are just plain text and you can look at, but we're concerned about these SCL files and they're just data. That's what it lists when it's not a text file. It's some sort of binary file but it doesn't know what type it is. Let's go ahead and use hex edit to look at one of these. I'll just grab this first one here. Now if you look, it's got some information here, some of it's readable. And again, that's something that Dan's EJ knows how to handle, but the rest don't. But if we just start scrolling down here, I'm downpaging, downpaging, downpaging for a little bit after a bit, keep going up, wait, there we go. You can see right here it says riff, wave format. Let's go ahead and X out and grab the next one. So hex edit, if I could type properly. And I'll just grab another one, I'll grab this one down here. Again, I'll go over and I'll just hit down page a bunch, going through some header information here and then eventually, well, right there. It says riff and then wave FMT. Okay, so we know just by glancing at this that there are wave files in here. My first thought when I was looking at this is binwalk, which goes through binary files and pulls out extracts of the files, but it didn't work on these. I'm not sure exactly how that all works, but we can do it manually and it's not that hard. So what we're going to do, you could probably, I bet if I look at these, I wouldn't be surprised if the header that we want to remove is the same number of characters and we can just use some sort of hex command to rip out the first part of that. But I don't know how to do that. And I didn't feel like looking it up, so I'm just going to use said. So let's give that a try. What I'm going to do here is we're looking for riff, right? So if I was to use said and I was, I want to start a line. There's probably a way just to find riff and remove everything before it. But with my knowledge, and again, I'm not saying this is the best way to do it. What I'm going to do is I'm going to find riff is case sensitive. So we'll do that. And when we find riff, what are we going to do? We're going to replace it with new line riff and we're going to do that globally even though it should only happen once. And I'm going to choose one of these files. So I'm just going to choose like this dark tone file, right? If I do that, what it's going to happen is I'm going to get a bunch of binary information on the screen and everything, you know, from that file with that change. I'm going to go ahead and do that just as an example. It didn't happen this time. Last time if you do that, it will mess up your prompt if it will just be gibberish. If that's the case, you can always just type reset and it will reset it. So just giving you a little heads up on that. Okay. So that printed out the file but started riff on a new line. Now I'm going to pipe this into another said command. And what I'm going to do here is I'm going to say, not as, but find riff and delete everything before that. I'll have notes in the description of this video. That should not be a period. That should be a comma. I am looking at notes myself. So we have that and what that's going to do is it's going to, basically I said, look at our file, find riff, move that new line and then delete all the lines before that should probably be able to do it in one said command. But I don't know how to do that. So I'm just going to go with what I know. I'm going to pipe that into a file. I'm just going to call it test.wave. If I did everything right, I should be able to say file test.wave and it should tell me it's an audio file and it does. And I can mpvtest.wave. Let's see. I, my speaker is off. Let me turn it back on. I'm using a Bluetooth speaker right now by my microphone for you to hear this. Once we get that, I'm going to, so we successfully converted that SEL file to a wave file. We can do that for all these files. I'm going to throw it into a quick little script just to make it easier to read. We're going to loop through them. We're going to echo out the file name so we can see the progress even though it only takes a couple seconds. And we're going to strip the extension and put it into a file. So what I'm going to do, I'm going to say vim convert. I'm using vim as my text editor. You can use whatever text editor you like. This is going to be bin bash. And I'm going to make dash p waves. The dash p is just saying I'm using it because I don't want to get an error if waves already exist. So it's going to create it without throwing errors even if it already exists. Then I'm going to say for file in all dot SEL files do done. And then we're going to put inside a loop here. I'm just going to echo out the file name, dollar sign file. Then we're going to run our command from earlier. So what I'm going to do here is I'm going to say our said command, but we're going to pass it our file name here. I'm going to put that in quotations just to make sure we don't have any problems. So there are spaces in some of these files. And then I'm going to say again the same command we ran earlier, but this time we're going to dump it into waves. I'm just copying and pasting some stuff to make it video not too boring for you. This should have brackets around it like so percent dot a strict dot wave. And I will have this script in the link in the description of this video. So what are we doing? We're creating a waves folder. Then we're looping through each of our CSL files in this directory going to echo out the name so we can see the progress. Then we're going to do what we did before add a new line before riff, delete everything before that new line and we're doing that for each file. Then in the waves, we're going to basically dump the output of that into a wave file. We're going to give it the same name, but we're removing SCL and putting wave instead. Save that. Make it executable for the first time. And then I'm going to convert and so far so good. We're going to go waves. And if I file out all of these, they all say riff waves. And I should be able MPV all of these to play them. I'm hoping you're hearing that the speakers near the microphone is the easiest way for me to do this right now. I'm going to stop it there because there's a bunch of them, but we successfully converted all those. And again, just in this one directory, we'll list out the files and count them 153 loops that we can now use elsewhere because we converted them just basically by cutting out that extra information at the header into a standard file, in this case wave format. So if you ever use a program, a proprietary program that tries to hide stuff from you, look at it in a hex editor, see if you see anything that looks like a header to a file. Please visit FilmsByChris.com. That's Chris at the K. There's a link in the description. I also have a Patreon page, a link in the description as well. I would appreciate your support. Be sure to like, share, subscribe, and I hope that you have a great day.