Matching an imported drum to the grid

rose62

New member
For reasons of convenience I'm using a Casio keyboard to get basic rhythms down for some tracks. However, it doesn't exactly sync with the grid on Reaper when the BPM and the keyboard are set the same. Is there a way to stretch or shrink the beat track to match the grid? Or to stretch the grid to exactly match the beat?
 
I can't answer you question directly, since I don't use reaper. But, in the future, if you hook the keyboard up via midi (as well as audio), you will be able to sync the clocks and you won't have this problem.
 
Reaper doesn't have anything to do with it. It simply saves the input data (using computer terms as that is all it is), a basic here is note X based on the MIDI standard and your keyboard communicating. Very simple code.

The actual mapping is based on the VSTi that you are using. There is a general MIDI percussion mapping that was more or less agreed to back in the day. But with today's VSTi's general MIDI is often ignored.

What you will need to do is map the software (VSTi) to the MIDI note. If you are using SD, there is a learn function. You can click learn on the kick, hit say C2 on the keyboard and now C2 is the note for the kick.

Check your software VSTi for a learn function or their re-mapping strategy.
 
I'm sorry. I think I confused things by mentioning midi. You need to look for 'time stretching' to change the audio to fit the tempo in the computer. Or, you need to find something to the effect of "find tempo" to find the exact tempo of the drum part you have, so you can set the tempo that it is and the grid will match it.

(super dumb question) Are you sure you lined up the first hit to the grid? Unless the keyboard and the computer are synced, the keyboard won't necessarily start on the beat. If it doesn't then, even if it's the same tempo, nothing will line up to the grid.
 
If I understand correctly, you're using your Casio like a sequencer to record MIDI tracks to its internal memory (or using preset rhythm patterns that are already stored in the Casio). You would like to record those tracks into a song that you have set up in Reaper, with everything aligned to bar and grid. Correct?

No problem at all, provided your Casio can receive and/or transmit Midi Time Code (MTC, or whatever the latest technology is). It's easy. I used to do this on every project back when I was working with drum machines (it was Cakewalk back then, but the principles apply to any DAW).

You'll need to dig into your manuals and menus. You'll need to set your Casio to either send or receive timing information, and Reaper vice versa. One will be the master, the other the slave. Once you're properly set up, the master will control the tempo and timing, while the slave will play back in sync.

Once you get it set up, the best course is to have the Casio send Reaper MIDI data rather than audio. You'll record the MIDI data on a track that is set up send it's output back to the Casio. That allows you to do your editing in Reaper while using the Casio as a MIDI keyboard and tone generator. Then, you'll need to set up a second track to receive the audio output from the Casio for recording.

Sounds more complicated that it is. Let us know if you need help with that once you have got the two synced.
 
Farview's question is important. If it's really just consistently off the grid from beginning to end, then all you need to do is turn off snapping (the button that looks like a horseshoe on the toolbar) and the click and drag the item left or right until they line up. If you can't move it left far enough, then click drag the left edge of the item toward the right so to get rid of the empty space before the first beat and then drag the whole item left.

That might be enough, but probably not. You had them both set to the same beats per minute, but it's very unlikely that they actually agree on how long a minute is. So you'll probably see that now the first beat is on the grid, but each beat after gets further and further away from the grid. So hold down the Alt key while you click and drag the right hand edge of the item. This will do the time stretching and if you align the last beat to the grid this way, it should then be pretty close to perfect sync throughout...unless that keyboard is all screwey with an inconsistent internal clock that drifts around, in which case it gets a lot more complicated and might not even be worth it.

Now, when I said "time stretch" what Reaper actual calls it is "playback rate change". Each item has a parameter for rate change and a toggle parameter to "preserve pitch on rate change". With that disabled, stretching an item out longer than it originally was (reducing the play rate, it's longer because it's playing more slowly) will lower the pitch just like slowing down a tape machine or record player, and shortening the item (raising playrate) will raise the pitch. With "preserve pitch" on, it keeps it at the same pitch (or tries to) by essentially re-synthesizing the sound, which can cause audible artifacts not completely unlike that autotune thing. As long as you're not stretching too far in either direction, it probably won't make much difference, but you should probably try it both ways and see which sounds better for you. Just right click the item, and you'll see the Preserve Pitch option under the Item sub-menu, or in the Item Properties dialog.
 
My mind went there too. If he's having trouble playing in time, then the solution is quantization or practice. But his question would better be addressed as a synchronization question than as a quantization question.

If he is trying to record patterns from the Casio to Reaper, he should be thinking about MIDI even if he is not. I'm having trouble imagining a scenario when I would EVER want to record audio from a MIDI-capable external instrument without first transferring the MIDI data into Reaper.

Sometimes a forum can help a user more by answering the question he didn't think to ask, than by answering the question he did ask.
 
We just need the OP to show up and tell us what exactly he did and what he's trying to do. obviously, there are any number of ways to screw this up and just as many solutions...
 
Obviously, I didn't give enough info. I'm bad about that. What I have done is to simply connect the headphone line out to the Focusrite input. Strictly analog, right? The question was asked if I missed the beat at the beginning. Perhaps, a bit. But it drifts over time: i.e. if I miss it before the grid it eventually drifts past the grid. The keyboard is midi capable but there are so many drum options that is is just easier for me to choose something that works with the song and go with it, for a live drummer to add later. And thanks for the input.
 
"Sometimes a forum can help a user more by answering the question he didn't think to ask, than by answering the question he did ask."
Truer words have been seldom spoken.
 
If I understand correctly, you're using your Casio like a sequencer to record MIDI tracks to its internal memory (or using preset rhythm patterns that are already stored in the Casio). You would like to record those tracks into a song that you have set up in Reaper, with everything aligned to bar and grid. Correct?

No problem at all, provided your Casio can receive and/or transmit Midi Time Code (MTC, or whatever the latest technology is). It's easy. I used to do this on every project back when I was working with drum machines (it was Cakewalk back then, but the principles apply to any DAW).

You'll need to dig into your manuals and menus. You'll need to set your Casio to either send or receive timing information, and Reaper vice versa. One will be the master, the other the slave. Once you're properly set up, the master will control the tempo and timing, while the slave will play back in sync.

Once you get it set up, the best course is to have the Casio send Reaper MIDI data rather than audio. You'll record the MIDI data on a track that is set up send it's output back to the Casio. That allows you to do your editing in Reaper while using the Casio as a MIDI keyboard and tone generator. Then, you'll need to set up a second track to receive the audio output from the Casio for recording.

Sounds more complicated that it is. Let us know if you need help with that once you have got the two synced.

The Casio is MIDI equipped. Can I get the presets (that I'm currently importing as analog) to import as MIDI?
 
Yes, assuming the Casio will receive MIDI program change information. Once you set up a Reaper track to record MIDI data coming from the Casio, there's a native VST called ReaControlMIDI. Insert that into the track. There are probably other ways of doing it as well. Usually Reaper gives you multiple ways to do the same thing.

I'll occasionally use ReaControlMIDI to set up a patch for my external keyboard synth. However, for what I am doing I rarely bother. I'll usually import the MIDI data into Reaper, do whatever editing I'm going to do there, then make the program changes by hand on the synth and immediately record the audio output back into Reaper. Just saves me having to fire up the synth when I want to give it a quick listen, and frees my audio inputs for other things.

EDIT: Re-reading your post, you want to import the preset into Reaper? Ordinarily I'd think you would want to create and save the preset in the Casio, then use ReaControlMIDI to select that preset for playback--or just select it by hand as described above. If you wanted to have the patch itself saved in Reaper, I guess you would have to record the patch data into Reaper as SysEx data--can others confirm? I've done that rarely but never saw much advantage.
 
Last edited:
OP, what is your Casio model, we can help you search for it. Usually the manufacturer doesn't let the internal MIDI export. Your keyboard may be an exception.

It appears if you are recording analog, and you have the BPMs set the same, and you are seeing drift, then it is a sync problem. If that is the case, record the analog until it repeats. Then use Reapers loop feature and correct the analog to sync up. You probably have maybe 4 bars of drum beats? If you use the loop feature, then the drift will be minimal and you can correct. You could even start your loop at the beginning of the second repeat so you don't have to worry where you start. See if this helps with understanding looping: https://www.youtube.com/watch?v=K-3k9gO-eYE
 
If you want to use the internal sounds and patterns, you can do it the way you have been doing it. The only difference is to have it hooked up via midi and sync the midi time code, so both the computer and the keyboard will agree on how long a minute is.

That's the problem you having. The internal clock on the keyboard is not running at the exact same speed as the internal clock in the computer. You just have to lock them together via midi.
 
The keyboard is a CT-670. And I'd like to say that I appreciate all the input, especially as none of it is wrapped around the not unusual, "well, if you only took a more professional approach, blah blah blah." I'm doing this as a learning experience and to help a couple of friends put their ideas down, digitally. Thanks again.
 
Back
Top